diff --git a/requirements/run.txt b/requirements/run.txt new file mode 100644 index 00000000..198983db --- /dev/null +++ b/requirements/run.txt @@ -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 diff --git a/setup.cfg b/setup.cfg index 4b416af8..0832c895 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 diff --git a/setup.py b/setup.py index 573422b9..82b208e1 100644 --- a/setup.py +++ b/setup.py @@ -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): @@ -278,6 +278,16 @@ 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', @@ -285,10 +295,7 @@ def symlink_if_different(path, target): author='Kytos Team', author_email='of-ng-dev@ncc.unesp.br', license='MIT', - install_requires=[ - 'kytos>=2017.2b1', - 'networkx' - ], + install_requires=read_requirements(), setup_requires=['pytest-runner'], tests_require=['pytest'], extras_require={