Created
April 29, 2016 10:32
-
-
Save Duologic/fe1bafd30c4a2e2a2d97431518aaa0d9 to your computer and use it in GitHub Desktop.
Base setup.py using requirements.txt and MANIFEST.in
This file contains hidden or 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
| from setuptools import setup, find_packages | |
| from pip.req import parse_requirements | |
| from pip.download import PipSession | |
| import os | |
| requirements_file = parse_requirements(os.path.join('deployment', 'requirements.txt'), session=PipSession()) | |
| install_requires = [] | |
| dependency_links = [] | |
| for req in requirements_file: | |
| install_requires.append(str(req.req)) | |
| if req.link: | |
| dependency_links.append(str(req.link)) | |
| setup( | |
| name="package_name", | |
| version='0.0.1', | |
| url='https://github.com/org/package_name/', | |
| license='commercial', | |
| description='Short description', | |
| long_description=open('README.md', 'r').read(), | |
| author='author/org name', | |
| packages=find_packages('.'), | |
| include_package_data=True, | |
| install_requires=install_requires, | |
| dependency_links=dependency_links, | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment