Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #6 from kytos-ng/fix/install_req_deps
Browse files Browse the repository at this point in the history
[Fix] setup.py `install_requires` dependencies housekeeping
  • Loading branch information
viniarck authored Jan 6, 2022
2 parents ab9d50c + 63199fd commit 50c52cb
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pylint==2.4.4 # via yala
pytest==5.4.1 # via pytest
pyparsing==2.4.6 # via packaging
pytest==5.4.1 # via -r dev.in
six==1.15.0 # via astroid, packaging, pip-tools, tox, virtualenv
six==1.16.0 # via astroid, packaging, pip-tools, tox, virtualenv
toml==0.10.0 # via tox
tox==3.15.0 # via -r dev.in
typed-ast==1.4.1 # via astroid
Expand Down
3 changes: 2 additions & 1 deletion requirements/run.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
filelock
filelock==3.0.12
etcd3==0.12.0
19 changes: 19 additions & 0 deletions requirements/run.txt
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@
#
# This file is autogenerated by pip-compile with python 3.6
# To update, run:
#
# pip-compile --output-file=requirements/run.txt requirements/run.in
#
etcd3==0.12.0
# via -r requirements/run.in
filelock==3.0.12
# via -r requirements/run.in
grpcio==1.43.0
# via etcd3
protobuf==3.19.1
# via etcd3
six==1.16.0
# via
# etcd3
# grpcio
tenacity==8.0.1
# via etcd3
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-public-methods,too-many-instance-attributes,super-init-not-called
linters=pylint,pycodestyle,isort

[pydocstyle]
add-ignore = D105,D107
Expand Down
14 changes: 12 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,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 @@ -267,14 +267,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 the Kytos Team',
url=f'http://github.com/kytos/{NAPP_NAME}',
author='Kytos Team',
author_email='[email protected]',
license='MIT',
install_requires=['etcd3', 'filelock', 'flask', 'kytos'],
install_requires=read_requirements(),
setup_requires=['pytest-runner'],
tests_require=['pytest'],
extras_require={
Expand Down

0 comments on commit 50c52cb

Please sign in to comment.