Merge pull request #39236 from ckauhaus/vulnix-update-1.6

vulnix: 1.4.0 -> 1.6.1
This commit is contained in:
Jörg Thalheim 2018-04-21 12:08:25 +01:00 committed by GitHub
commit c0eaaaef33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 49 additions and 8 deletions

View File

@ -1,16 +1,17 @@
{ stdenv, pythonPackages, fetchurl, callPackage, nix }:
{ stdenv, pythonPackages, fetchurl, callPackage, nix, ronn }:
pythonPackages.buildPythonApplication rec {
name = "${pname}-${version}";
pname = "vulnix";
version = "1.4.0";
version = "1.6.1";
src = pythonPackages.fetchPypi {
inherit pname version;
sha256 = "19kfqxlrigrgwn74x06m70ar2fhyhic5kfmdanjwjcbaxblha3l8";
sha256 = "0j6v6phq3naqnpvzxxnynsyv9y7bhig1gzvg594qpknqgyzj16bf";
};
buildInputs = with pythonPackages; [ flake8 pytest pytestcov ];
buildInputs =
[ ronn ] ++
(with pythonPackages; [ freezegun pytest pytestcov ]);
propagatedBuildInputs = [
nix
@ -20,14 +21,31 @@ pythonPackages.buildPythonApplication rec {
lxml
pyyaml
requests
toml
zodb
]);
postPatch = ''
sed -i -e 's/==\([^=]\+\)/>=\1/g' setup.py
outputs = [ "out" "doc" ];
# pytest-flake8 is currently broken
# re-enable after it has been fixed
# https://github.com/NixOS/nixpkgs/issues/39206
patches = [ ./disable-flake8.patch ];
postBuild = ''
make -C doc
'';
checkPhase = "py.test";
checkPhase = "py.test src/vulnix";
postInstall = ''
install -D -t $out/share/man/man1 doc/vulnix.1
install -D -t $out/share/man/man5 doc/vulnix-whitelist.5
install -D -t $doc/share/doc/vulnix README.rst CHANGES.rst
gzip $doc/share/doc/vulnix/*.rst
'';
dontStrip = true;
meta = with stdenv.lib; {
description = "NixOS vulnerability scanner";

View File

@ -0,0 +1,23 @@
diff --git a/setup.cfg b/setup.cfg
index a9e37ce..41b9886 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
[tool:pytest]
-addopts = --flake8 --tb=native --cov=src --cov-report=html --junitxml=report.xml -m 'not jenkinsonly' src/vulnix
+addopts = --tb=native --cov=src --cov-report=html --junitxml=report.xml -m 'not jenkinsonly' src/vulnix
markers = slow: This is a non-unit test and thus is not run by default. Use ``-m slow`` to run these, or ``-m 1`` to run all tests.
[aliases]
diff --git a/setup.py b/setup.py
index a9315e5..d14ad59 100644
--- a/setup.py
+++ b/setup.py
@@ -35,7 +35,6 @@ setup(
'freezegun>0.3',
'pytest>=3.2',
'pytest-cov>=2.5',
- 'pytest-flake8',
'pytest-runner>=2.11,<3dev',
'pytest-timeout>=1.2',
'setuptools_scm>=1.15',