Vastly improved setup.py template
							parent
							
								
									453d3a7416
								
							
						
					
					
						commit
						4f6f821611
					
				|  | @ -7,6 +7,22 @@ except ImportError: | ||||||
| 
 | 
 | ||||||
| packages = find_packages() | packages = find_packages() | ||||||
| 
 | 
 | ||||||
|  | package_data = { | ||||||
|  |     package: | ||||||
|  |         [f for f in os.listdir(package.replace('.', os.path.sep)) if os.path.splitext(f)[1] in ('.so', '.pyd')] | ||||||
|  |         for package in packages | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | cython_install_requirements = open("${CYTHON_INSTALL_REQUIREMENTS_FILE}").readlines() | ||||||
|  | 
 | ||||||
|  | install_requires = [line.strip() \ | ||||||
|  |     for line in cython_install_requirements \ | ||||||
|  |     if len(line.strip()) > 0 and not line.strip().startswith('#') | ||||||
|  | ] | ||||||
|  | 
 | ||||||
|  | # Cleaner to read in the contents rather than copy them over. | ||||||
|  | readme_contents = open("${PROJECT_SOURCE_DIR}/README.md").read() | ||||||
|  | 
 | ||||||
| setup( | setup( | ||||||
|     name='gtsam', |     name='gtsam', | ||||||
|     description='Georgia Tech Smoothing And Mapping library', |     description='Georgia Tech Smoothing And Mapping library', | ||||||
|  | @ -16,7 +32,7 @@ setup( | ||||||
|     author_email='frank.dellaert@gtsam.org', |     author_email='frank.dellaert@gtsam.org', | ||||||
|     license='Simplified BSD license', |     license='Simplified BSD license', | ||||||
|     keywords='slam sam robotics localization mapping optimization', |     keywords='slam sam robotics localization mapping optimization', | ||||||
|     long_description='''${README_CONTENTS}''', |     long_description=readme_contents, | ||||||
|     long_description_content_type='text/markdown', |     long_description_content_type='text/markdown', | ||||||
|     python_requires='>=2.7', |     python_requires='>=2.7', | ||||||
|     # https://pypi.org/pypi?%3Aaction=list_classifiers |     # https://pypi.org/pypi?%3Aaction=list_classifiers | ||||||
|  | @ -34,11 +50,6 @@ setup( | ||||||
|     ], |     ], | ||||||
| 
 | 
 | ||||||
|     packages=packages, |     packages=packages, | ||||||
|     package_data={package: |     package_data=package_data, | ||||||
|         [f for f in os.listdir(package.replace('.', os.path.sep)) if os.path.splitext(f)[1] in ('.so', '.pyd')] |     install_requires=install_requires | ||||||
|         for package in packages |  | ||||||
|     }, |  | ||||||
|     install_requires=[line.strip() for line in ''' |  | ||||||
| ${CYTHON_INSTALL_REQUIREMENTS} |  | ||||||
| '''.splitlines() if len(line.strip()) > 0 and not line.strip().startswith('#')] |  | ||||||
| ) | ) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue