From 2e7447cf1deb3a1ac08f2fe90cd780901da65016 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Mon, 3 Jul 2017 13:16:54 +0000 Subject: Rename cythonize_gudhi.py in setup.py to be conform with Python convention (for easy_install and pip) git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@2578 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: c514a7c5096293380254339e7e60782194040823 --- src/cython/CMakeLists.txt | 6 ++--- src/cython/cythonize_gudhi.py.in | 49 ---------------------------------------- src/cython/setup.py.in | 49 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 52 deletions(-) delete mode 100644 src/cython/cythonize_gudhi.py.in create mode 100644 src/cython/setup.py.in diff --git a/src/cython/CMakeLists.txt b/src/cython/CMakeLists.txt index d801fb0b..99badffb 100644 --- a/src/cython/CMakeLists.txt +++ b/src/cython/CMakeLists.txt @@ -197,15 +197,15 @@ if(CYTHON_FOUND) configure_file(doc/Makefile.in "${CMAKE_CURRENT_BINARY_DIR}/doc/Makefile" @ONLY) configure_file(doc/make.bat.in "${CMAKE_CURRENT_BINARY_DIR}/doc/make.bat" @ONLY) - # Generate cythonize_gudhi.py file to cythonize Gudhi - configure_file(cythonize_gudhi.py.in "${CMAKE_CURRENT_BINARY_DIR}/cythonize_gudhi.py" @ONLY) + # Generate setup.py file to cythonize Gudhi - This file must be named setup.py by convention + configure_file(setup.py.in "${CMAKE_CURRENT_BINARY_DIR}/setup.py" @ONLY) # Generate gudhi.pyx - Gudhi cython file configure_file(gudhi.pyx.in "${CMAKE_CURRENT_BINARY_DIR}/gudhi.pyx" @ONLY) add_custom_command( OUTPUT gudhi.so WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/cythonize_gudhi.py" "build_ext" "--inplace") + COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/setup.py" "build_ext" "--inplace") add_custom_target(cython ALL DEPENDS gudhi.so COMMENT "Do not forget to add ${CMAKE_CURRENT_BINARY_DIR}/ to your PYTHONPATH before using examples or tests") diff --git a/src/cython/cythonize_gudhi.py.in b/src/cython/cythonize_gudhi.py.in deleted file mode 100644 index c1a1717a..00000000 --- a/src/cython/cythonize_gudhi.py.in +++ /dev/null @@ -1,49 +0,0 @@ -from distutils.core import setup, Extension -from Cython.Build import cythonize - -"""This file is part of the Gudhi Library. The Gudhi library - (Geometric Understanding in Higher Dimensions) is a generic C++ - library for computational topology. - - Author(s): Vincent Rouvreau - - Copyright (C) 2016 INRIA - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -""" - -__author__ = "Vincent Rouvreau" -__copyright__ = "Copyright (C) 2016 INRIA" -__license__ = "GPL v3" - -gudhi = Extension( - "gudhi", - sources = ['gudhi.pyx',], - language = 'c++', - extra_compile_args=[@GUDHI_CYTHON_EXTRA_COMPILE_ARGS@], - extra_link_args=[@GUDHI_CYTHON_EXTRA_LINK_ARGS@], - libraries=[@GUDHI_CYTHON_LIBRARIES@], - library_dirs=[@GUDHI_CYTHON_LIBRARY_DIRS@], - include_dirs = [@GUDHI_CYTHON_INCLUDE_DIRS@], - runtime_library_dirs=[@GUDHI_CYTHON_RUNTIME_LIBRARY_DIRS@], -) - -setup( - name = 'gudhi', - author='Vincent Rouvreau', - author_email='gudhi-contact@lists.gforge.inria.fr', - version='@GUDHI_VERSION@', - url='http://gudhi.gforge.inria.fr/', - ext_modules = cythonize(gudhi), -) diff --git a/src/cython/setup.py.in b/src/cython/setup.py.in new file mode 100644 index 00000000..c1a1717a --- /dev/null +++ b/src/cython/setup.py.in @@ -0,0 +1,49 @@ +from distutils.core import setup, Extension +from Cython.Build import cythonize + +"""This file is part of the Gudhi Library. The Gudhi library + (Geometric Understanding in Higher Dimensions) is a generic C++ + library for computational topology. + + Author(s): Vincent Rouvreau + + Copyright (C) 2016 INRIA + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +""" + +__author__ = "Vincent Rouvreau" +__copyright__ = "Copyright (C) 2016 INRIA" +__license__ = "GPL v3" + +gudhi = Extension( + "gudhi", + sources = ['gudhi.pyx',], + language = 'c++', + extra_compile_args=[@GUDHI_CYTHON_EXTRA_COMPILE_ARGS@], + extra_link_args=[@GUDHI_CYTHON_EXTRA_LINK_ARGS@], + libraries=[@GUDHI_CYTHON_LIBRARIES@], + library_dirs=[@GUDHI_CYTHON_LIBRARY_DIRS@], + include_dirs = [@GUDHI_CYTHON_INCLUDE_DIRS@], + runtime_library_dirs=[@GUDHI_CYTHON_RUNTIME_LIBRARY_DIRS@], +) + +setup( + name = 'gudhi', + author='Vincent Rouvreau', + author_email='gudhi-contact@lists.gforge.inria.fr', + version='@GUDHI_VERSION@', + url='http://gudhi.gforge.inria.fr/', + ext_modules = cythonize(gudhi), +) -- cgit v1.2.3