Skip to content

Commit

Permalink
tweak the project to better match example
Browse files Browse the repository at this point in the history
  • Loading branch information
phlptp committed Dec 20, 2024
1 parent e931ec1 commit f3ba606
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,12 @@ if(NOT UNITS_HEADER_ONLY AND UNITS_BUILD_PYTHON_LIBRARY)
)
find_package(nanobind CONFIG REQUIRED)

nanobind_add_module(units_llnl NB_STATIC STABLE_ABI python/units_python.cpp)
nanobind_add_module(units_llnl_ext NB_STATIC STABLE_ABI python/units_python.cpp)

target_link_libraries(units_llnl PRIVATE units::units)
target_link_libraries(units_llnl_ext PRIVATE units::units)

# Install directive for scikit-build-core
install(TARGETS units_llnl LIBRARY DESTINATION units_llnl)
install(TARGETS units_llnl_ext LIBRARY DESTINATION units_llnl)

endif()

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ build-dir = "build/{wheel_tag}"

# The build targets to use when building the project. Empty builds the default
# target.
build.targets = ["units_llnl"]
build.targets = ["units_llnl_ext"]

# The components to install. If empty, all default components are installed.
install.components = ["units_llnl"]
install.components = []

# Build stable ABI wheels for CPython 3.12+
wheel.py-api = "cp312"
Expand Down
2 changes: 1 addition & 1 deletion python/units_llnl/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from .units_llnl import unit, measurement,convert,convert_pu,default_unit, __doc__
from .units_llnl_ext import unit, measurement,convert,convert_pu,default_unit, __doc__

0 comments on commit f3ba606

Please sign in to comment.