-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Unify python dependency installation and update to vulnerability…
… free versions (#222) * Dependency cleanup and Postgres conn modifications * Removed changes done for transaction error * Including requirements.in into tests/requirements.in Co-authored-by: Arunprasad Rajkumar <[email protected]> * Including main requirements.in into tests/requirements.in Co-authored-by: Arunprasad Rajkumar <[email protected]>
- Loading branch information
Showing
8 changed files
with
221 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,8 @@ | ||
pytest | ||
flask | ||
six | ||
Flask | ||
gunicorn | ||
flask-cors | ||
requests | ||
pytest-cov | ||
coverage | ||
gevent | ||
sqlalchemy | ||
pytest-mock | ||
codecov | ||
radon | ||
boto3 | ||
sentry-sdk | ||
requests-futures | ||
psycopg2 | ||
Flask_Cors | ||
sentry_sdk | ||
psycopg2-binary | ||
f8a_worker @ git+https://github.com/fabric8-analytics/fabric8-analytics-worker.git@066c2f6#egg=f8a_worker | ||
fabric8a_auth @ git+https://github.com/fabric8-analytics/fabric8-analytics-auth.git@5ff9438#egg=fabric8a_auth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,29 +6,27 @@ | |
|
||
|
||
def get_requirements(): | ||
"""Parse all packages mentioned in the 'requirements.txt' file.""" | ||
with open('requirements.txt') as fd: | ||
lines = fd.read().splitlines() | ||
reqs, dep_links = [], [] | ||
for line in lines: | ||
if line.startswith('git+'): | ||
dep_links.append(line) | ||
else: | ||
reqs.append(line) | ||
return reqs, dep_links | ||
""" | ||
Parse dependencies from 'requirements.in' file. | ||
Collecting dependencies from 'requirements.in' as a list, | ||
this list will be used by 'install_requires' to specify minimal dependencies | ||
needed to run the application. | ||
""" | ||
with open('requirements.in') as fd: | ||
return fd.read().splitlines() | ||
|
||
|
||
# pip doesn't install from dependency links by default, so one should install dependencies by | ||
# `pip install -r requirements.txt`, not by `pip install .` | ||
# See https://github.com/pypa/pip/issues/2023 | ||
reqs, dep_links = get_requirements() | ||
install_requires = get_requirements() | ||
|
||
setup( | ||
name='gemini-server', | ||
version='0.1', | ||
packages=find_packages(exclude=['tests', 'tests.*']), | ||
install_requires=reqs, | ||
dependency_links=dep_links, | ||
install_requires=install_requires, | ||
include_package_data=True, | ||
author='Samuzzal Choudhury', | ||
author_email='[email protected]', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
pytest | ||
pytest-cov | ||
coverage | ||
pytest-mock | ||
codecov | ||
radon | ||
pydocstyle | ||
-r ../requirements.in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# | ||
# This file is autogenerated by pip-compile | ||
# To update, run: | ||
# | ||
# pip-compile | ||
# | ||
amqp==5.0.2 # via kombu | ||
anymarkup-core==0.8.1 # via anymarkup | ||
anymarkup==0.8.1 # via f8a-worker | ||
attrs==20.3.0 # via jsonschema, pytest | ||
babel==2.9.0 # via flask-babelex | ||
beautifulsoup4==4.9.3 # via bs4, f8a-worker | ||
billiard==3.6.3.0 # via celery | ||
blinker==1.4 # via flask-mail, flask-principal | ||
boto3==1.16.25 # via f8a-worker | ||
botocore==1.19.25 # via boto3, f8a-worker, s3transfer | ||
bs4==0.0.1 # via f8a-utils | ||
celery==5.0.2 # via selinon | ||
certifi==2020.11.8 # via requests, sentry-sdk | ||
cffi==1.14.4 # via cryptography | ||
chardet==3.0.4 # via requests | ||
click-didyoumean==0.0.3 # via celery | ||
click-repl==0.1.6 # via celery | ||
click==7.1.2 # via anymarkup, celery, click-didyoumean, click-repl, flask, selinon | ||
codecov==2.1.10 # via -r requirements.in | ||
codegen==1.0 # via selinon | ||
colorama==0.4.4 # via radon, rainbow-logging-handler | ||
configobj==5.0.6 # via anymarkup | ||
coverage==5.3 # via -r requirements.in, codecov, pytest-cov | ||
cryptography==3.2.1 # via f8a-utils, fabric8a-auth | ||
git+https://github.com/fabric8-analytics/fabric8-analytics-utils.git@5a5ce60#egg=f8a_utils # via f8a-worker | ||
git+https://github.com/fabric8-analytics/fabric8-analytics-version-comparator.git@8a57ac7#egg=f8a_version_comparator # via f8a-utils | ||
git+https://github.com/fabric8-analytics/fabric8-analytics-worker.git@066c2f6#egg=f8a_worker # via -r ../requirements.in | ||
git+https://github.com/fabric8-analytics/fabric8-analytics-auth.git@5ff9438#egg=fabric8a_auth # via -r ../requirements.in | ||
flask-babelex==0.9.4 # via flask-security | ||
flask-cors==3.0.9 # via -r ../requirements.in | ||
flask-login==0.5.0 # via flask-security | ||
flask-mail==0.9.1 # via flask-security | ||
flask-principal==0.4.0 # via flask-security | ||
flask-security==3.0.0 # via fabric8a-auth | ||
flask-wtf==0.14.3 # via flask-security | ||
flask==1.1.2 # via -r ../requirements.in, fabric8a-auth, flask-babelex, flask-cors, flask-login, flask-mail, flask-principal, flask-security, flask-wtf | ||
future==0.18.2 # via radon | ||
git2json==0.2.3 # via f8a-worker | ||
gitdb==4.0.5 # via gitpython | ||
gitpython==3.1.11 # via f8a-worker | ||
graphviz==0.15 # via selinon | ||
gunicorn==20.0.4 # via -r ../requirements.in | ||
idna==2.10 # via requests | ||
importlib-metadata==3.1.0 # via jsonschema, kombu, pluggy, pytest | ||
iniconfig==1.1.1 # via pytest | ||
itsdangerous==1.1.0 # via flask, flask-security, flask-wtf | ||
jinja2==2.11.2 # via flask, flask-babelex | ||
jmespath==0.10.0 # via boto3, botocore | ||
jsl==0.2.4 # via f8a-worker | ||
json5==0.9.5 # via anymarkup | ||
jsonschema==3.2.0 # via f8a-worker, selinon | ||
kombu==5.0.2 # via celery | ||
logutils==0.3.5 # via rainbow-logging-handler | ||
lxml==4.6.2 # via f8a-utils, f8a-worker | ||
mando==0.6.4 # via radon | ||
markupsafe==1.1.1 # via jinja2, wtforms | ||
packaging==20.4 # via pytest | ||
passlib==1.7.4 # via flask-security | ||
pluggy==0.13.1 # via pytest | ||
prompt-toolkit==3.0.8 # via click-repl | ||
psycopg2-binary==2.8.6 # via -r ../requirements.in | ||
py==1.9.0 # via pytest | ||
pycparser==2.20 # via cffi | ||
pydocstyle==5.1.1 # via -r requirements.in | ||
pyjwt==1.7.1 # via fabric8a-auth | ||
pyparsing==2.4.7 # via packaging | ||
pyrsistent==0.17.3 # via jsonschema | ||
pytest-cov==2.10.1 # via -r requirements.in | ||
pytest-mock==3.3.1 # via -r requirements.in | ||
pytest==6.1.2 # via -r requirements.in, pytest-cov, pytest-mock | ||
python-dateutil==2.8.1 # via botocore | ||
pytz==2020.4 # via babel, celery | ||
pyyaml==5.3.1 # via anymarkup, f8a-worker, selinon | ||
radon==4.3.2 # via -r requirements.in | ||
rainbow-logging-handler==2.2.2 # via selinon | ||
raven==6.10.0 # via f8a-worker | ||
requests-futures==1.0.0 # via f8a-worker | ||
requests==2.25.0 # via codecov, f8a-utils, f8a-worker, fabric8a-auth, requests-futures | ||
s3transfer==0.3.3 # via boto3 | ||
selinon[celery]==1.0.0 # via f8a-worker | ||
semantic-version==2.8.5 # via f8a-worker | ||
semver==2.13.0 # via f8a-utils | ||
sentry-sdk==0.19.4 # via -r ../requirements.in | ||
six==1.15.0 # via -r ../requirements.in, anymarkup-core, click-repl, configobj, cryptography, flask-cors, jsonschema, mando, packaging, python-dateutil, tenacity | ||
smmap==3.0.4 # via gitdb | ||
snowballstemmer==2.0.0 # via pydocstyle | ||
soupsieve==2.0.1 # via beautifulsoup4 | ||
speaklater==1.3 # via flask-babelex | ||
sqlalchemy==1.3.20 # via f8a-worker | ||
tenacity==6.2.0 # via f8a-utils, f8a-worker | ||
toml==0.9.4 # via anymarkup, f8a-worker, pytest | ||
urllib3==1.26.2 # via botocore, requests, sentry-sdk | ||
vine==5.0.0 # via amqp, celery | ||
wcwidth==0.2.5 # via prompt-toolkit | ||
werkzeug==1.0.1 # via f8a-worker, flask | ||
wtforms==2.3.3 # via flask-wtf | ||
xmltodict==0.12.0 # via anymarkup | ||
zipp==3.4.0 # via importlib-metadata | ||
|
||
# The following packages are considered to be unsafe in a requirements file: | ||
# setuptools |