Skip to content
Snippets Groups Projects
Commit 0b707db9 authored by Marek Chrastina's avatar Marek Chrastina
Browse files

Add python safety to CI

parent d3a5400a
Branches
Tags 0.0.6
1 merge request!7If only bdist is available, check if python_version satisfied python platform version
Pipeline #11157 passed
......@@ -48,7 +48,19 @@ build:
- gitchangelog | sed -r '1,/^# Changelog$/s/^(# Changelog)$/#\1/' >> README.md
- python setup.py sdist
Install test:
python safety:
stage: check
image: it4innovations/docker-pycheck:latest
before_script:
- virtualenv .venv
script:
- source .venv/bin/activate
- pip install --upgrade pip setuptools
- pip install dist/pipdeps*tar.gz
- pip list
- pip freeze | safety check --stdin --full-report
install test:
stage: check
image: it4innovations/docker-pypi:latest
before_script:
......@@ -62,7 +74,7 @@ Install test:
- pipdeps --table || true
- pipdeps --upgrade
versioncheck:
version check:
stage: check
image: it4innovations/docker-pypi:latest
before_script:
......
......@@ -24,7 +24,7 @@ dependencies.
optional arguments:
-h, --help show this help message and exit
-e [EXCLUDE [EXCLUDE ...]], --exclude [EXCLUDE [EXCLUDE ...]]
Comma separated list of excluded package (and
Space-separated list of excluded package (and
version). Format package==version or package for all
versions
-l, --list show list of upgradeable packages and versions
......
......@@ -458,7 +458,7 @@ def get_available_vers(package):
try:
data = get_json("https://pypi.python.org/pypi/%s/json" % (package))
except urllib2.HTTPError, err:
print "%s %s" % (err, err.url)
print "{} {}".format(err, err.url)
raise urllib2.HTTPError(err.url, err.code, None, err.hdrs, err.fp)
releases = data["releases"].keys()
for release in releases:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment