Skip to content
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

[Fix] setup.py install_requires dependencies housekeeping #6

Merged
merged 4 commits into from
Jan 6, 2022
Merged
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: 10 additions & 0 deletions requirements/run.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# This file is autogenerated by pip-compile with python 3.6
# To update, run:
#
# pip-compile --output-file=requirements/run.txt requirements/run.in
#
decorator==4.4.2
# via networkx
networkx==2.5.1
# via -r requirements/run.in
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ exclude = .eggs,ENV,build,docs/conf.py,venv
[yala]
radon mi args = --min C
pylint args = --disable=too-few-public-methods,too-many-instance-attributes,super-init-not-called,too-many-branches,attribute-defined-outside-init,raise-missing-from,no-name-in-module
linters=pylint,pycodestyle,isort

[pydocstyle]
add-ignore = D105,D107
Expand Down
17 changes: 12 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def _install_deps_wheels():
"""Python wheels are much faster (no compiling)."""
print('Installing dependencies...')
check_call([sys.executable, '-m', 'pip', 'install', '-r',
'requirements/run.in'])
'requirements/run.txt'])


class DevelopMode(develop):
Expand Down Expand Up @@ -278,17 +278,24 @@ def symlink_if_different(path, target):
path.symlink_to(target)


def read_requirements(path="requirements/run.txt"):
"""Read requirements file and return a list."""
with open(path, "r", encoding="utf8") as file:
return [
line.strip()
for line in file.readlines()
if not line.startswith("#")
]


setup(name=f'kytos_{NAPP_NAME}',
version=NAPP_VERSION,
description='Core NApps developed by Kytos Team',
url='http://github.com/kytos/{NAPP_NAME}',
author='Kytos Team',
author_email='[email protected]',
license='MIT',
install_requires=[
'kytos>=2017.2b1',
'networkx'
],
install_requires=read_requirements(),
setup_requires=['pytest-runner'],
tests_require=['pytest'],
extras_require={
Expand Down