Skip to content

Moving requirements list into setup.py #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
tqdm
nltk
petl
numpy
pandas
tweepy
mailbox
gitpython
sphinx_rtd_theme
.
23 changes: 13 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,25 @@
from os import path
from codecs import open
from setuptools import setup, find_packages
from pip.req import parse_requirements

INSTALL_REQS = [
'tqdm',
'nltk',
'petl',
'numpy',
'pandas',
'tweepy',
'mailbox',
'gitpython',
'sphinx_rtd_theme',
]


here = path.abspath(path.dirname(__file__))

# !!! Update version here!
version_string = '0.3.4'

# Parse requirements
# parse_requirements() returns generator of pip.req.InstallRequirement objects
install_reqs = parse_requirements('requirements.txt', session=pip.download.PipSession())

# reqs is a list of requirement
# e.g. ['django==1.5.1', 'mezzanine==1.4.6']
reqs = [str(ir.req) for ir in install_reqs]

# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
Expand Down Expand Up @@ -104,7 +107,7 @@
# your project is installed. For an analysis of "install_requires" vs pip's
# requirements files see:
# https://packaging.python.org/en/latest/requirements.html
install_requires=reqs,
install_requires=INSTALL_REQS,

# List additional groups of dependencies here (e.g. development
# dependencies). You can install these using the following syntax,
Expand Down