-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from borglab/feature/package-improvements
Packaging Improvements
- Loading branch information
Showing
4 changed files
with
59 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,55 @@ | ||
import os | ||
import sys | ||
|
||
try: | ||
from setuptools import setup, find_packages | ||
except ImportError: | ||
from distutils.core import setup, 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 | ||
} | ||
|
||
dependencies = ["gtsam", "Cython>=0.25.2", "backports_abc>=0.5", "numpy>=1.12.0"] | ||
|
||
setup( | ||
name='example', | ||
description='Simple example of wrapping projects with Python and GTSAM', | ||
url='https://gtsam.org/', | ||
version='1.0.0', | ||
author='Varun Agrawal', | ||
author_email='[email protected]', | ||
license='Simplified BSD license', | ||
keywords='wrapper tutorial example', | ||
name="gtsam_example", | ||
description="Simple example of wrapping projects with GTSAM", | ||
url="https://github.com/borglab/gtsam-project-python/", | ||
version="1.0.0", | ||
author="Varun Agrawal", | ||
author_email="[email protected]", | ||
license="Simplified BSD license", | ||
keywords="gtsam wrapper tutorial example", | ||
long_description="", | ||
long_description_content_type='text/markdown', | ||
python_requires='>=3.6', | ||
long_description_content_type="text/markdown", | ||
python_requires=">=3.6", | ||
# https://pypi.org/pypi?%3Aaction=list_classifiers | ||
classifiers=[ | ||
'Development Status :: 5 - Production/Stable', | ||
'Intended Audience :: Education', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: Science/Research', | ||
'Operating System :: MacOS', | ||
'Operating System :: Microsoft :: Windows', | ||
'Operating System :: POSIX', | ||
'License :: OSI Approved :: BSD License', | ||
'Programming Language :: Python :: 2', | ||
'Programming Language :: Python :: 3', | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Education", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"Operating System :: MacOS", | ||
"Operating System :: Microsoft :: Windows", | ||
"Operating System :: POSIX", | ||
"License :: OSI Approved :: BSD License", | ||
"Programming Language :: Python :: 2", | ||
"Programming Language :: Python :: 3", | ||
], | ||
|
||
packages=packages, | ||
# Load the built shared object files | ||
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 | ||
}, | ||
install_requires=[line.strip() for line in ''' | ||
Cython>=0.25.2 | ||
backports_abc>=0.5 | ||
numpy>=1.12.0 | ||
'''.splitlines() if len(line.strip()) > 0 and not line.strip().startswith('#')] | ||
package_data=package_data, | ||
include_package_data=True, | ||
# Ensure that the compiled .so file is properly packaged | ||
zip_safe=False, | ||
platforms="any", | ||
install_requires=dependencies, | ||
) |