baking in requirements and README to setup.py rather than reading at install time

release/4.3a0
Matthew Broadway 2019-02-13 14:38:46 +00:00
parent fe9ede47d1
commit 135ef5a0d0
2 changed files with 7 additions and 2 deletions

View File

@ -28,6 +28,9 @@ if (GTSAM_INSTALL_CYTHON_TOOLBOX)
) )
endif() endif()
file(READ "${PROJECT_SOURCE_DIR}/cython/requirements.txt" CYTHON_INSTALL_REQUIREMENTS)
file(READ "${PROJECT_SOURCE_DIR}/README.md" README_CONTENTS)
# Install the custom-generated __init__.py # Install the custom-generated __init__.py
# This is to make the build/cython/gtsam folder a python package, so gtsam can be found while wrapping gtsam_unstable # This is to make the build/cython/gtsam folder a python package, so gtsam can be found while wrapping gtsam_unstable
configure_file(${PROJECT_SOURCE_DIR}/cython/gtsam/__init__.py ${PROJECT_BINARY_DIR}/cython/gtsam/__init__.py COPYONLY) configure_file(${PROJECT_SOURCE_DIR}/cython/gtsam/__init__.py ${PROJECT_BINARY_DIR}/cython/gtsam/__init__.py COPYONLY)

View File

@ -14,7 +14,7 @@ setup(
version='${GTSAM_VERSION_STRING}', # https://www.python.org/dev/peps/pep-0440/ version='${GTSAM_VERSION_STRING}', # https://www.python.org/dev/peps/pep-0440/
license='Simplified BSD license', license='Simplified BSD license',
keywords='slam sam', keywords='slam sam',
long_description=open('${PROJECT_SOURCE_DIR}/README.md', 'r').read(), long_description='''${README_CONTENTS}''',
# https://pypi.org/pypi?%3Aaction=list_classifiers # https://pypi.org/pypi?%3Aaction=list_classifiers
classifiers=[ classifiers=[
'Development Status :: 5 - Production/Stable', 'Development Status :: 5 - Production/Stable',
@ -30,5 +30,7 @@ setup(
[f for f in os.listdir(package.replace('.', os.path.sep)) if os.path.splitext(f)[1] in ('.so', '.dll')] [f for f in os.listdir(package.replace('.', os.path.sep)) if os.path.splitext(f)[1] in ('.so', '.dll')]
for package in packages for package in packages
}, },
install_requires=open('${PROJECT_SOURCE_DIR}/cython/requirements.txt', 'r').read().splitlines() install_requires=[line.strip() for line in '''
${CYTHON_INSTALL_REQUIREMENTS}
'''.splitlines() if len(line) > 0 and not line.strip().startswith('#')]
) )