mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 22:53:42 +00:00
175 lines
11 KiB
Diff
175 lines
11 KiB
Diff
diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt
|
|
index 5c1402a..48a1250 100644
|
|
--- a/src/python/CMakeLists.txt
|
|
+++ b/src/python/CMakeLists.txt
|
|
@@ -271,9 +271,6 @@ if(PYTHONINTERP_FOUND)
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/setup.py" "build_ext" "--inplace")
|
|
|
|
- add_custom_target(python ALL DEPENDS gudhi.so
|
|
- COMMENT "Do not forget to add ${CMAKE_CURRENT_BINARY_DIR}/ to your PYTHONPATH before using examples or tests")
|
|
-
|
|
install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/setup.py install)")
|
|
|
|
# Documentation generation is available through sphinx - requires all modules
|
|
@@ -295,14 +292,14 @@ if(PYTHONINTERP_FOUND)
|
|
# sphinx target requires gudhi.so, because conf.py reads gudhi version from it
|
|
add_custom_target(sphinx
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doc
|
|
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
|
+ COMMAND ${CMAKE_COMMAND} -E env
|
|
${SPHINX_PATH} -b html ${CMAKE_CURRENT_SOURCE_DIR}/doc ${CMAKE_CURRENT_BINARY_DIR}/sphinx
|
|
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/gudhi.so"
|
|
COMMENT "${GUDHI_SPHINX_MESSAGE}" VERBATIM)
|
|
|
|
add_test(NAME sphinx_py_test
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
|
+ COMMAND ${CMAKE_COMMAND} -E env
|
|
${SPHINX_PATH} -b doctest ${CMAKE_CURRENT_SOURCE_DIR}/doc ${CMAKE_CURRENT_BINARY_DIR}/doctest)
|
|
|
|
# Set missing or not modules
|
|
@@ -346,13 +343,13 @@ if(PYTHONINTERP_FOUND)
|
|
# Bottleneck and Alpha
|
|
add_test(NAME alpha_rips_persistence_bottleneck_distance_py_test
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
|
+ COMMAND ${CMAKE_COMMAND} -E env
|
|
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/alpha_rips_persistence_bottleneck_distance.py"
|
|
-f ${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off -t 0.15 -d 3)
|
|
# Tangential
|
|
add_test(NAME tangential_complex_plain_homology_from_off_file_example_py_test
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
|
+ COMMAND ${CMAKE_COMMAND} -E env
|
|
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/tangential_complex_plain_homology_from_off_file_example.py"
|
|
--no-diagram -i 2 -f ${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off)
|
|
|
|
@@ -361,13 +358,13 @@ if(PYTHONINTERP_FOUND)
|
|
# Witness complex
|
|
add_test(NAME euclidean_strong_witness_complex_diagram_persistence_from_off_file_example_py_test
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
|
+ COMMAND ${CMAKE_COMMAND} -E env
|
|
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/euclidean_strong_witness_complex_diagram_persistence_from_off_file_example.py"
|
|
--no-diagram -f ${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off -a 1.0 -n 20 -d 2)
|
|
|
|
add_test(NAME euclidean_witness_complex_diagram_persistence_from_off_file_example_py_test
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
|
+ COMMAND ${CMAKE_COMMAND} -E env
|
|
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/euclidean_witness_complex_diagram_persistence_from_off_file_example.py"
|
|
--no-diagram -f ${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off -a 1.0 -n 20 -d 2)
|
|
|
|
@@ -379,7 +376,7 @@ if(PYTHONINTERP_FOUND)
|
|
# Bottleneck
|
|
add_test(NAME bottleneck_basic_example_py_test
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
|
+ COMMAND ${CMAKE_COMMAND} -E env
|
|
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/bottleneck_basic_example.py")
|
|
|
|
if (PYBIND11_FOUND)
|
|
@@ -392,26 +389,26 @@ if(PYTHONINTERP_FOUND)
|
|
file(COPY ${CMAKE_SOURCE_DIR}/data/points/COIL_database/lucky_cat_PCA1 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
|
|
add_test(NAME cover_complex_nerve_example_py_test
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
|
+ COMMAND ${CMAKE_COMMAND} -E env
|
|
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/nerve_of_a_covering.py"
|
|
-f human.off -c 2 -r 10 -g 0.3)
|
|
|
|
add_test(NAME cover_complex_coordinate_gic_example_py_test
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
|
+ COMMAND ${CMAKE_COMMAND} -E env
|
|
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/coordinate_graph_induced_complex.py"
|
|
-f human.off -c 0 -v)
|
|
|
|
add_test(NAME cover_complex_functional_gic_example_py_test
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
|
+ COMMAND ${CMAKE_COMMAND} -E env
|
|
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/functional_graph_induced_complex.py"
|
|
-o lucky_cat.off
|
|
-f lucky_cat_PCA1 -v)
|
|
|
|
add_test(NAME cover_complex_voronoi_gic_example_py_test
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
|
+ COMMAND ${CMAKE_COMMAND} -E env
|
|
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/voronoi_graph_induced_complex.py"
|
|
-f human.off -n 700 -v)
|
|
|
|
@@ -422,11 +419,11 @@ if(PYTHONINTERP_FOUND)
|
|
# Alpha
|
|
add_test(NAME alpha_complex_from_points_example_py_test
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
|
+ COMMAND ${CMAKE_COMMAND} -E env
|
|
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/alpha_complex_from_points_example.py")
|
|
add_test(NAME alpha_complex_diagram_persistence_from_off_file_example_py_test
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
|
+ COMMAND ${CMAKE_COMMAND} -E env
|
|
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/alpha_complex_diagram_persistence_from_off_file_example.py"
|
|
--no-diagram -f ${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off -a 0.6)
|
|
add_gudhi_py_test(test_alpha_complex)
|
|
@@ -441,13 +438,13 @@ if(PYTHONINTERP_FOUND)
|
|
# Cubical
|
|
add_test(NAME periodic_cubical_complex_barcode_persistence_from_perseus_file_example_py_test
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
|
+ COMMAND ${CMAKE_COMMAND} -E env
|
|
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/periodic_cubical_complex_barcode_persistence_from_perseus_file_example.py"
|
|
--no-barcode -f ${CMAKE_SOURCE_DIR}/data/bitmap/CubicalTwoSphere.txt)
|
|
|
|
add_test(NAME random_cubical_complex_persistence_example_py_test
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
|
+ COMMAND ${CMAKE_COMMAND} -E env
|
|
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/random_cubical_complex_persistence_example.py"
|
|
10 10 10)
|
|
|
|
@@ -456,19 +453,19 @@ if(PYTHONINTERP_FOUND)
|
|
# Rips
|
|
add_test(NAME rips_complex_diagram_persistence_from_distance_matrix_file_example_py_test
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
|
+ COMMAND ${CMAKE_COMMAND} -E env
|
|
${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/example/rips_complex_diagram_persistence_from_distance_matrix_file_example.py"
|
|
--no-diagram -f ${CMAKE_SOURCE_DIR}/data/distance_matrix/lower_triangular_distance_matrix.csv -e 12.0 -d 3)
|
|
|
|
add_test(NAME rips_complex_diagram_persistence_from_off_file_example_py_test
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
|
+ COMMAND ${CMAKE_COMMAND} -E env
|
|
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/example/rips_complex_diagram_persistence_from_off_file_example.py
|
|
--no-diagram -f ${CMAKE_SOURCE_DIR}/data/points/tore3D_300.off -e 0.25 -d 3)
|
|
|
|
add_test(NAME rips_complex_from_points_example_py_test
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
|
+ COMMAND ${CMAKE_COMMAND} -E env
|
|
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/example/rips_complex_from_points_example.py)
|
|
|
|
add_gudhi_py_test(test_rips_complex)
|
|
@@ -476,7 +473,7 @@ if(PYTHONINTERP_FOUND)
|
|
# Simplex tree
|
|
add_test(NAME simplex_tree_example_py_test
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
|
+ COMMAND ${CMAKE_COMMAND} -E env
|
|
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/example/simplex_tree_example.py)
|
|
|
|
add_gudhi_py_test(test_simplex_tree)
|
|
@@ -485,7 +482,7 @@ if(PYTHONINTERP_FOUND)
|
|
# Witness
|
|
add_test(NAME witness_complex_from_nearest_landmark_table_py_test
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
|
|
+ COMMAND ${CMAKE_COMMAND} -E env
|
|
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/example/witness_complex_from_nearest_landmark_table.py)
|
|
|
|
add_gudhi_py_test(test_witness_complex)
|