-
Notifications
You must be signed in to change notification settings - Fork 45
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 (#912) * Resolve vulnerabilities, unified dependency handling. * Unify python dependency installation and update to vulnerability free versions * Unify python dependency installation and update to vulnerability free versions * [APPAI-1432] Unify python dependency installation and update to vulnerability free versions. * [APPAI-1432] Adding radon to fix PR build. * [APPAI-1432] Removed indirect dependencies from requiremnts.in * [APPAI-1432] Removed indirect dependencies from requiremnts.in * Removed usage of deprecated dependency_links from setup.py
- Loading branch information
Showing
7 changed files
with
115 additions
and
120 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ ENV LANG=en_US.UTF-8 \ | |
WORKER_DATA_DIR='/var/lib/f8a_worker/worker_data' \ | ||
# home directory | ||
HOME='/workdir' \ | ||
F8A_UTILS_VERSION=3bca34e \ | ||
# place for alembic migrations | ||
ALEMBIC_DIR='/alembic' | ||
|
||
|
@@ -21,8 +20,6 @@ COPY requirements.txt /tmp/f8a_worker/ | |
RUN cd /tmp/f8a_worker/ && \ | ||
pip3 install -r requirements.txt | ||
|
||
RUN pip3 install git+https://github.com/fabric8-analytics/fabric8-analytics-utils.git@${F8A_UTILS_VERSION} | ||
RUN pip3 install git+https://[email protected]/fabric8-analytics/fabric8-analytics-version-comparator.git#egg=f8a_version_comparator | ||
COPY alembic.ini hack/run-db-migrations.sh ${ALEMBIC_DIR}/ | ||
COPY alembic/ ${ALEMBIC_DIR}/alembic | ||
|
||
|
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 |
---|---|---|
|
@@ -5,7 +5,6 @@ ENV LANG=en_US.UTF-8 \ | |
WORKER_DATA_DIR='/var/lib/f8a_worker/worker_data' \ | ||
# home directory | ||
HOME='/workdir' \ | ||
F8A_UTILS_VERSION=3bca34e \ | ||
# place for alembic migrations | ||
ALEMBIC_DIR='/alembic' | ||
|
||
|
@@ -21,8 +20,6 @@ COPY requirements.txt /tmp/f8a_worker/ | |
RUN cd /tmp/f8a_worker/ && \ | ||
pip3 install -r requirements.txt | ||
|
||
RUN pip3 install git+https://github.com/fabric8-analytics/fabric8-analytics-utils.git@${F8A_UTILS_VERSION} | ||
RUN pip3 install git+https://[email protected]/fabric8-analytics/fabric8-analytics-version-comparator.git#egg=f8a_version_comparator | ||
COPY alembic.ini hack/run-db-migrations.sh ${ALEMBIC_DIR}/ | ||
COPY alembic/ ${ALEMBIC_DIR}/alembic | ||
|
||
|
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,26 +1,20 @@ | ||
# normally pulled in by kombu, but version 2.2.0 is broken | ||
amqp<=2.1.4 | ||
# also handles Celery as a requirement | ||
selinon[celery] | ||
sqlalchemy | ||
psycopg2 | ||
lxml | ||
beautifulsoup4 | ||
# We install a patched version from dnf as we cannot use requests from PyPI - we need own certificates | ||
#requests | ||
anymarkup | ||
jsl | ||
jsonschema | ||
unidiff | ||
requests | ||
requests-futures | ||
anymarkup | ||
beautifulsoup4 | ||
boto3 | ||
botocore | ||
git2json | ||
gitpython | ||
# Amazon AWS SQS | ||
# Celery transparently uses boto | ||
boto | ||
boto3 | ||
semantic_version | ||
radon==3.0.1 | ||
watchdog | ||
jsl | ||
jsonschema | ||
lxml | ||
pyyaml | ||
raven | ||
requests-futures | ||
selinon[celery]==1.0.0 | ||
semantic-version | ||
sqlalchemy | ||
tenacity | ||
toml<=0.9.4 | ||
werkzeug | ||
f8a_utils @ git+https://github.com/fabric8-analytics/fabric8-analytics-utils.git@44c123b#egg=f8a_utils |
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 |
---|---|---|
|
@@ -7,9 +7,16 @@ | |
|
||
|
||
def get_requirements(): | ||
"""Parse all packages mentioned in the 'requirements.txt' file.""" | ||
with open('requirements.txt') as fd: | ||
return fd.read().splitlines() | ||
"""Parse dependencies from 'requirements.in' file.""" | ||
with open('requirements.in') as fd: | ||
lines = fd.read().splitlines() | ||
requires = [] | ||
for line in lines: | ||
requires.append(line) | ||
return requires | ||
|
||
|
||
install_requires = get_requirements() | ||
|
||
|
||
setup( | ||
|
@@ -30,7 +37,7 @@ def get_requirements(): | |
}, | ||
packages=find_packages(exclude=['tests', 'tests.*']), | ||
include_package_data=True, | ||
install_requires=get_requirements(), | ||
install_requires=install_requires, | ||
author='Pavel Odvody', | ||
author_email='[email protected]', | ||
description='fabric8-analytics workers & utilities', | ||
|
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,10 +1,6 @@ | ||
datadiff | ||
pytest<=3.10.1 | ||
radon | ||
flexmock | ||
pylint | ||
pytest==3.* | ||
pytest-timeout | ||
pytest-rerunfailures | ||
pytest-cov | ||
pytest-mock | ||
codecov | ||
requests | ||
toml<=0.9.4 | ||
pytest-cov<=2.6.0 | ||
codecov |
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