Skip to content

Commit 6deab0d

Browse files
committed
Merge zero_finder
2 parents dfac52d + 5289868 commit 6deab0d

12 files changed

+703
-739
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,3 +193,6 @@ skbuild/*
193193

194194
# temporary files for vim users
195195
*.swp
196+
197+
# helper files
198+
*TMP.py

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.12)
22

33
project(QR_binding VERSION 1.0
4-
DESCRIPTION "QR method"
4+
DESCRIPTION "Python bindings of some helper functions written in C++."
55
LANGUAGES CXX)
66

77
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pyclassify)
@@ -35,8 +35,8 @@ set(CMAKE_CXX_EXTENSIONS OFF)
3535

3636
add_compile_options(-O3 -Wall -Werror -Wpedantic)
3737

38-
pybind11_add_module(QR_cpp ${CMAKE_SOURCE_DIR}/src/pyclassify/QR_bindings.cpp)
39-
set_target_properties(QR_cpp PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
38+
pybind11_add_module(cxx_utils ${CMAKE_SOURCE_DIR}/src/pyclassify/cxx_utils.cpp)
39+
set_target_properties(cxx_utils PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
4040

41-
target_compile_features(QR_cpp PUBLIC cxx_std_17)
42-
install(TARGETS QR_cpp LIBRARY DESTINATION ${CMAKE_SOURCE_DIR}/src/pyclassify)
41+
target_compile_features(cxx_utils PUBLIC cxx_std_17)
42+
install(TARGETS cxx_utils LIBRARY DESTINATION ${CMAKE_SOURCE_DIR}/src/pyclassify)

docs/pyclassify.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Submodule: utils
2222
Submodule: helpers_secular
2323
================
2424

25-
.. automodule:: pyclassify.helpers_secular
25+
.. automodule:: pyclassify.zero_finder
2626
:members:
2727
:undoc-members:
2828
:show-inheritance:

setup.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ def build_extension(self, ext):
2020
# Run CMake build
2121
os.makedirs(build_temp, exist_ok=True)
2222
self.spawn(["cmake", ext.sourcedir, "-B", build_temp])
23-
self.spawn(["cmake", "--build", build_temp, "--target", "QR_cpp"])
23+
self.spawn(["cmake", "--build", build_temp, "--target", "cxx_utils"])
2424

2525
# Dynamically find the compiled shared library
2626
matches = glob.glob(
27-
os.path.join(ext.sourcedir, "src", "pyclassify", "QR_cpp*.so")
27+
os.path.join(ext.sourcedir, "src", "pyclassify", "cxx_utils*.so")
2828
)
2929
if not matches:
3030
raise RuntimeError(
31-
"Could not find compiled QR_cpp shared library in expected location."
31+
"Could not find compiled cxx_utils shared library in expected location."
3232
)
3333

3434
src_lib = os.path.abspath(matches[0])
@@ -41,14 +41,14 @@ def build_extension(self, ext):
4141
setup(
4242
name="pyclassify",
4343
version="0.0.1",
44-
author="Lorenzo Tomada, Gaspare Li Causi",
44+
author="Gaspare Li Causi, Lorenzo Tomada",
4545
author_email="ltomada@sissa.it, glicausi@sissa.it",
4646
description="Final project",
4747
long_description="Eigenvalue computation",
48-
ext_modules=[CMakeExtension("pyclassify.QR_cpp")],
48+
ext_modules=[CMakeExtension("pyclassify.cxx_utils")],
4949
packages=find_packages(where="src/"),
5050
package_dir={"": "src/"},
51-
package_data={"pyclassify": ["QR_cpp*.so"]},
51+
package_data={"pyclassify": ["cxx_utils*.so"]},
5252
include_package_data=True,
5353
cmdclass={"build_ext": CMakeBuild},
5454
zip_safe=False,

0 commit comments

Comments
 (0)