Skip to content

Commit

Permalink
Update requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
thombashi committed Jul 31, 2017
1 parent d20f04d commit 61e1fcd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
3 changes: 3 additions & 0 deletions requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
enum34;python_version<"3.4"
ipaddress;python_version<"3.3"
mbstrdecoder>=0.2.2
python-dateutil>=2.6.1
pytz>=2017.2
setuptools>=20.2.2
six>=1.10
25 changes: 10 additions & 15 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,11 @@
with open(os.path.join(REQUIREMENT_DIR, "requirements.txt")) as f:
install_requires = [line.strip() for line in f if line.strip()]

if any([
sys.version_info.major < 3,
sys.version_info.major == 3 and sys.version_info.minor < 4,
]):
install_requires.append("enum34")

if any([
sys.version_info.major < 3,
sys.version_info.major == 3 and sys.version_info.minor < 3,
]):
install_requires.append("ipaddress")

with open(os.path.join(REQUIREMENT_DIR, "test_requirements.txt")) as f:
tests_require = [line.strip() for line in f if line.strip()]
tests_requires = [line.strip() for line in f if line.strip()]

with open(os.path.join(REQUIREMENT_DIR, "docs_requirements.txt")) as f:
docs_requires = [line.strip() for line in f if line.strip()]

needs_pytest = set(["pytest", "test", "ptr"]).intersection(sys.argv)
pytest_runner = ["pytest-runner"] if needs_pytest else []
Expand All @@ -61,8 +52,12 @@
license="MIT License",
long_description=long_description,
packages=setuptools.find_packages(exclude=["test*"]),
setup_requires=[] + pytest_runner,
tests_require=tests_require,
setup_requires=pytest_runner,
tests_require=tests_requires,
extras_require={
"test": tests_requires,
"docs": docs_requires,
},

classifiers=[
"Development Status :: 3 - Alpha",
Expand Down

0 comments on commit 61e1fcd

Please sign in to comment.