Skip to content

Commit

Permalink
fixup! setup.py: Move all configuration to setup.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
nbraud committed Apr 1, 2019
1 parent cc5db73 commit 80d72c1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
2 changes: 0 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,3 @@ setup_requires =
pytest-runner

python_requires = >= 3.6
install_requires = file: requirements.txt
tests_require = file: requirements-tests.txt
17 changes: 16 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
#!/usr/bin/env python3
from setuptools import setup


def requirements(section=None):
"""Helper for loading dependencies from requirements files."""
if section is None:
filename = "requirements.txt"
else:
filename = f"requirements-{section}.txt"

with open(filename) as file:
return [line.strip() for line in file]


# See setup.cfg for the actual configuration.
setup()
setup(
install_requires=requirements(),
tests_require=requirements('tests'),
)

0 comments on commit 80d72c1

Please sign in to comment.