From f3ba606b1e74535913f7758784dd9b0e40f0ebdb Mon Sep 17 00:00:00 2001 From: Philip Top Date: Fri, 20 Dec 2024 05:42:08 -0800 Subject: [PATCH] tweak the project to better match example --- CMakeLists.txt | 6 +++--- pyproject.toml | 4 ++-- python/units_llnl/__init__.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 20b4539f..b441fefd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/pyproject.toml b/pyproject.toml index bd81a042..18804520 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/python/units_llnl/__init__.py b/python/units_llnl/__init__.py index a37464cb..0fa49eed 100644 --- a/python/units_llnl/__init__.py +++ b/python/units_llnl/__init__.py @@ -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__