Keep awxkit's requirements on the setup.py

awxkit's setup.py was making use of pip internal structures to parse the
requirements.txt file. This is not a good thing as they may change,
actually that just happened.

To avoid this in the future, move the list of requirements to setup.py
and make requirements.txt list `.` as the only item. This way we keep a
single place to update requirements in the future and avoid accessing
pip's internals.
This commit is contained in:
Elyézer Rezende 2020-04-29 13:55:35 -04:00 committed by Ryan Petrello
parent 5e223db945
commit 5c91f66316
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777
2 changed files with 5 additions and 9 deletions

View File

@ -1,2 +1 @@
PyYAML
requests
.

View File

@ -2,12 +2,6 @@ import os
import glob
import shutil
from setuptools import setup, find_packages, Command
try: # for pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
from pip.req import parse_requirements
requirements = [str(r.req) for r in parse_requirements('requirements.txt', session=False)]
def get_version():
@ -66,7 +60,10 @@ setup(
'clean': CleanCommand,
},
include_package_data=True,
install_requires=requirements,
install_requires=[
'PyYAML',
'requests',
],
python_requires=">=3.6",
extras_require={
'formatting': ['jq'],