diff options
| author | Alexis Metaireau <alexis@notmyidea.org> | 2017-11-01 18:36:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-01 18:36:44 +0100 |
| commit | 9d67c32a8475ec3522524445aada95cf1b2146dc (patch) | |
| tree | 293c6b3f52d0360ffabe490336f02738e4133880 | |
| parent | 9d7376d46bb764aaa8f66bef62c9ca09bac08764 (diff) | |
| download | ihatemoney-mirror-9d67c32a8475ec3522524445aada95cf1b2146dc.zip ihatemoney-mirror-9d67c32a8475ec3522524445aada95cf1b2146dc.tar.gz ihatemoney-mirror-9d67c32a8475ec3522524445aada95cf1b2146dc.tar.bz2 | |
Parse requirements.txt in setup.py. Fix #273 (#284)
| -rw-r--r-- | MANIFEST.in | 2 | ||||
| -rw-r--r-- | setup.py | 38 |
2 files changed, 16 insertions, 24 deletions
diff --git a/MANIFEST.in b/MANIFEST.in index 9ba34ba..91d0edb 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,3 @@ include *.rst recursive-include ihatemoney *.rst *.py *.yaml *.po *.mo *.html *.css *.js *.eot *.svg *.woff *.txt *.png *.ini *.cfg -include LICENSE CONTRIBUTORS CHANGELOG.rst +include LICENSE CONTRIBUTORS CHANGELOG.rst requirements.txt @@ -2,6 +2,16 @@ import codecs import os from setuptools import setup, find_packages +try: + from pip.req import parse_requirements + from pip.download import PipSession +except ImportError: + print('[libbmc] pip not found.') + raise + +# Get requirements from the requirements.txt file. +pip_requirements = parse_requirements("requirements.txt", session=PipSession()) +install_requires = [str(ir.req) for ir in pip_requirements] here = os.path.abspath(os.path.dirname(__file__)) @@ -16,25 +26,6 @@ def read_file(filename): README = read_file('README.rst') CHANGELOG = read_file('CHANGELOG.rst') -REQUIREMENTS = [ - 'flask>=0.11', - 'flask-wtf>=0.13', - 'flask-sqlalchemy', - 'flask-mail>=0.8', - 'Flask-Migrate>=1.8.0', - 'Flask-script', - 'flask-babel', - 'flask-rest', - 'jinja2>=2.6', - 'raven', - 'blinker', - 'six>=1.10', - 'itsdangerous>=0.24', -] - -DEPENDENCY_LINKS = [ -] - ENTRY_POINTS = { 'paste.app_factory': [ 'main = ihatemoney.run:main', @@ -52,9 +43,11 @@ setup(name='ihatemoney', license='Custom BSD Beerware', classifiers=[ "Programming Language :: Python", - "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", @@ -66,6 +59,5 @@ setup(name='ihatemoney', packages=find_packages(), include_package_data=True, zip_safe=False, - install_requires=REQUIREMENTS, - dependency_links=DEPENDENCY_LINKS, -entry_points=ENTRY_POINTS) + install_requires=install_requires, + entry_points=ENTRY_POINTS) |
