Skip to content

Commit

Permalink
refactor requirement parsing in setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gronke committed Nov 13, 2020
1 parent 551071e commit a04bc9e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,9 @@ def _read_requirements(
filename: str="requirements.txt"
) -> typing.Dict[str, typing.List[str]]:
reqs = list(parse_requirements(filename, session="libioc"))
return dict(
install_requires=[_resolve_requirement(req) for req in reqs]
)
return [_resolve_requirement(req) for req in reqs]


ioc_requirements = _read_requirements("requirements.txt")

if sys.version_info < (3, 6):
exit("Only Python 3.6 and higher is supported.")

Expand All @@ -75,7 +71,7 @@ def _read_requirements(
packages=find_packages(include=["libioc", "libioc.*"]),
package_data={'': ['VERSION']},
include_package_data=True,
install_requires=ioc_requirements["install_requires"],
install_requires=_read_requirements("requirements.txt"),
# setup_requires=['pytest-runner'],
tests_require=['pytest', 'pytest-cov', 'pytest-pep8']
)
Expand Down

0 comments on commit a04bc9e

Please sign in to comment.