Skip to content

Commit

Permalink
pythonPackages: fix native / check inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
FRidh committed Jan 15, 2019
1 parent 1539624 commit 5a3670b
Show file tree
Hide file tree
Showing 34 changed files with 77 additions and 59 deletions.
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/beautifulsoup4/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildPythonPackage rec {
sha256 = "90f8e61121d6ae58362ce3bed8cd997efb00c914eae0ff3d363c32f9a9822d10";
};

buildInputs = [ nose ];
checkInputs = [ nose ];
checkPhase = ''
nosetests build
'';
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/cffi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if isPyPy then null else buildPythonPackage rec {
outputs = [ "out" "dev" ];

propagatedBuildInputs = [ libffi pycparser ];
buildInputs = [ pytest ];
checkInputs = [ pytest ];

# On Darwin, the cffi tests want to hit libm a lot, and look for it in a global
# impure search path. It's obnoxious how much repetition there is, and how difficult
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/distro/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildPythonPackage rec {
pname = "distro";
version = "1.3.0";

buildInputs = [ pytest pytestcov tox];
checkInputs = [ pytest pytestcov tox];

checkPhase = ''
touch tox.ini
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/ecdsa/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ buildPythonPackage rec {
};

# Only needed for tests
buildInputs = [ pkgs.openssl ];
checkInputs = [ pkgs.openssl ];

meta = with stdenv.lib; {
description = "ECDSA cryptographic signature library";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/et_xmlfile/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ buildPythonPackage rec {
sha256="0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1";
};

buildInputs = [ lxml pytest ];
checkInputs = [ lxml pytest ];
checkPhase = ''
py.test $out
'';
Expand Down
9 changes: 7 additions & 2 deletions pkgs/development/python-modules/httpretty/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
, urllib3
, rednose
, nose-randomly
, six
, mock
}:

buildPythonPackage rec {
Expand All @@ -22,8 +24,11 @@ buildPythonPackage rec {
sha256 = "01b52d45077e702eda491f4fe75328d3468fd886aed5dcc530003e7b2b5939dc";
};

checkInputs = [ tornado requests httplib2 sure nose nose-randomly rednose coverage certifi ];
propagatedBuildInputs = [ urllib3 ];
checkInputs = [ nose sure coverage mock rednose
# Following not declared in setup.py
nose-randomly requests tornado httplib2
];
propagatedBuildInputs = [ six ];

meta = with stdenv.lib; {
homepage = "https://falcao.it/HTTPretty/";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/jsonref/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildPythonPackage rec {
sha256 = "15v69rg2lkcykb2spnq6vbbirv9sfq480fnwmfppw9gn3h95pi7k";
};

buildInputs = [ pytest mock ];
checkInputs = [ pytest mock ];

checkPhase = ''
py.test tests.py
Expand Down
10 changes: 6 additions & 4 deletions pkgs/development/python-modules/jsonschema/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ buildPythonPackage rec {
sha256 = "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg";
};

buildInputs = [ nose mock vcversioner ];
checkInputs = [ nose mock vcversioner ];
propagatedBuildInputs = [ functools32 ];

patchPhase = ''
postPatch = ''
substituteInPlace jsonschema/tests/test_jsonschema_test_suite.py \
--replace "python" "${python}/bin/${python.executable}"
--replace "python" "${python.pythonForBuild.interpreter}"
'';

checkPhase = "nosetests";
checkPhase = ''
nosetests
'';

meta = with stdenv.lib; {
homepage = https://github.com/Julian/jsonschema;
Expand Down
7 changes: 5 additions & 2 deletions pkgs/development/python-modules/kerberos/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, pkgs
, kerberos
}:

buildPythonPackage rec {
Expand All @@ -13,7 +13,10 @@ buildPythonPackage rec {
sha256 = "19663qxmma0i8bfbjc2iwy5hgq0g4pfb75r023v5dps68zfvffgh";
};

buildInputs = [ pkgs.kerberos ];
nativeBuildInputs = [ kerberos ];

# No tests in archive
doCheck = false;

meta = with stdenv.lib; {
description = "Kerberos high-level interface";
Expand Down
4 changes: 1 addition & 3 deletions pkgs/development/python-modules/ldap3/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchPypi, fetchFromGitHub, buildPythonPackage, gssapi, pyasn1 }:
{ stdenv, fetchPypi, fetchFromGitHub, buildPythonPackage, pyasn1 }:

buildPythonPackage rec {
version = "2.5.2";
Expand All @@ -17,8 +17,6 @@ buildPythonPackage rec {
sha256 = "0p5l4bhy6j2nvvlxz5zvznbaqb72x791v9la2jr2wpwr60mzz9hw";
};

buildInputs = [ gssapi ];

propagatedBuildInputs = [ pyasn1 ];

doCheck = false; # requires network
Expand Down
8 changes: 3 additions & 5 deletions pkgs/development/python-modules/llfuse/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,15 @@ buildPythonPackage rec {
};

nativeBuildInputs = [ pkgconfig ];
buildInputs = [ pytest fuse attr which ];
buildInputs = [ fuse ];
checkInputs = [ pytest attr which ];

propagatedBuildInputs = [ contextlib2 ];

checkPhase = ''
py.test
py.test -k "not test_listdir"
'';

# FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin'
doCheck = false;

meta = with stdenv.lib; {
description = "Python bindings for the low-level FUSE API";
homepage = https://code.google.com/p/python-llfuse/;
Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/python-modules/llvmlite/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ buildPythonPackage rec {
sha256 = "fd64def9a51dd7dc61913a7a08eeba5b9785522740bec5a7c5995b2a90525025";
};

propagatedBuildInputs = [ llvm ] ++ stdenv.lib.optional (pythonOlder "3.4") enum34;
nativeBuildInputs = [ llvm ];
propagatedBuildInputs = [ ] ++ stdenv.lib.optional (pythonOlder "3.4") enum34;

# Disable static linking
# https://github.com/numba/llvmlite/issues/93
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/python-modules/lxml/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ buildPythonPackage rec {
sha256 = "36720698c29e7a9626a0dc802ef8885f8f0239bfd1689628ecd459a061f2807f";
};

nativeBuildInputs = [ libxml2.dev libxslt.dev ];
buildInputs = [ libxml2 libxslt ];

hardeningDisable = stdenv.lib.optional stdenv.isDarwin "format";
Expand Down
6 changes: 4 additions & 2 deletions pkgs/development/python-modules/minimock/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ buildPythonPackage rec {
sha256 = "c88fa8a7120623f23990a7f086a9657f6ced09025a55e3be8649a30b4945441a";
};

buildInputs = [ nose ];
checkInputs = [ nose ];

checkPhase = "./test";
checkPhase = ''
./test
'';

meta = with stdenv.lib; {
description = "A minimalistic mocking library for python";
Expand Down
7 changes: 4 additions & 3 deletions pkgs/development/python-modules/netaddr/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
, buildPythonPackage
, fetchPypi
, pytest
, pkgs
, fetchpatch
, glibcLocales
}:

buildPythonPackage rec {
Expand All @@ -15,7 +16,7 @@ buildPythonPackage rec {
};

LC_ALL = "en_US.UTF-8";
buildInputs = [ pkgs.glibcLocales pytest ];
checkInputs = [ glibcLocales pytest ];

checkPhase = ''
# fails on python3.7: https://github.com/drkjam/netaddr/issues/182
Expand All @@ -25,7 +26,7 @@ buildPythonPackage rec {
'';

patches = [
(pkgs.fetchpatch {
(fetchpatch {
url = https://github.com/drkjam/netaddr/commit/2ab73f10be7069c9412e853d2d0caf29bd624012.patch;
sha256 = "0s1cdn9v5alpviabhcjmzc0m2pnpq9dh2fnnk2x96dnry1pshg39";
})
Expand Down
5 changes: 1 addition & 4 deletions pkgs/development/python-modules/nose-randomly/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ buildPythonPackage rec {
sha256 = "361f4c2fbb090ec2bc8e5e4151e21409a09ac13f364e3448247cc01f326d89b3";
};

checkInputs = [ numpy ];
propagatedBuildInputs = [
nose
];
checkInputs = [ numpy nose ];

checkPhase = ''
nosetests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ buildPythonPackage rec {

propagatedBuildInputs = [ nose ];

checkInputs = [ nose ];
checkPhase = ''
nosetests -v
'';
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/nosejs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildPythonPackage rec {
sha256 = "0qrhkd3sga56qf6k0sqyhwfcladwi05gl6aqmr0xriiq1sgva5dy";
};

buildInputs = [ nose ];
checkInputs = [ nose ];

checkPhase = ''
nosetests -v
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/pep257/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildPythonPackage rec {
sha256 = "1ldpgil0kaf6wz5gvl9xdx35a62vc6bmgi3wbh9320dj5v2qk4wh";
};

buildInputs = [ pytest mock ];
checkInputs = [ pytest mock ];

checkPhase = ''
py.test
Expand Down
8 changes: 4 additions & 4 deletions pkgs/development/python-modules/podcastparser/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ buildPythonPackage rec {
sha256 = "10bk93fqsws360q1gkjvfzjda3351169zbr6v5lq9raa3mg1ln52";
};

propagatedBuildInputs = [ ];
checkInputs = [ nose ];

buildInputs = [ nose ];

checkPhase = "nosetests test_*.py";
checkPhase = ''
nosetests test_*.py
'';

meta = {
description = "podcastparser is a simple, fast and efficient podcast parser written in Python.";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/pydispatcher/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildPythonPackage rec {
sha256 = "1bswbmhlbqdxlgbxlb6xrlm4k253sg8nvpl1whgsys8p3fg0cw2m";
};

buildInputs = [ pytest ];
checkInputs = [ pytest ];

checkPhase = ''
py.test
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/pygobject/3.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ buildPythonPackage rec {
"-Dpython=python${if isPy3k then "3" else "2" }"
];

nativeBuildInputs = [ pkgconfig meson ninja ];
nativeBuildInputs = [ pkgconfig meson ninja gobject-introspection ];
buildInputs = [ glib gobject-introspection ]
++ stdenv.lib.optionals stdenv.isDarwin [ which ncurses ];
propagatedBuildInputs = [ pycairo cairo ];
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/pyopenssl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ buildPythonPackage rec {
# for one example, but I've also seen ContextTests.test_set_verify_callback_exception fail.
doCheck = !stdenv.isDarwin;

buildInputs = [ openssl ];
nativeBuildInputs = [ openssl ];
propagatedBuildInputs = [ cryptography pyasn1 idna ];

checkInputs = [ pytest pretend flaky glibcLocales ];
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/pytest-cram/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildPythonPackage rec {
version = "0.2.0";
pname = "pytest-cram";

buildInputs = [ pytest ];
checkInputs = [ pytest ];
propagatedBuildInputs = [ cram ];

src = fetchPypi {
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/pytest-django/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ buildPythonPackage rec {
sha256 = "07zl2438gavrcykva6i2lpxmzgf90h4xlm3nqgd7wsqz2yh727zy";
};

buildInputs = [ pytest setuptools_scm ];
checkInputs = [ django-configurations pytest_xdist six ];
nativeBuildInputs = [ pytest setuptools_scm ];
checkInputs = [ pytest django-configurations pytest_xdist six ];
propagatedBuildInputs = [ django ];

# Complicated. Requires Django setup.
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/pytest-flake8/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildPythonPackage rec {
# although pytest is a runtime dependency, do not add it as
# propagatedBuildInputs in order to allow packages depend on another version
# of pytest more easily
buildInputs = [ pytest ];
checkInputs = [ pytest ];
propagatedBuildInputs = [ flake8 ];

src = fetchPypi {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/pytestrunner/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildPythonPackage rec {
sha256 = "d23f117be39919f00dd91bffeb4f15e031ec797501b717a245e377aee0f577be";
};

buildInputs = [ setuptools_scm pytest ];
nativeBuildInputs = [ setuptools_scm pytest ];

postPatch = ''
rm pytest.ini
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/pyudev/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ buildPythonPackage rec {
--replace "find_library(name)" "'${systemd.lib}/lib/libudev.so'"
'';

buildInputs = [ pytest mock hypothesis docutils ];
checkInputs = [ pytest mock hypothesis docutils ];
propagatedBuildInputs = [ systemd six ];

checkPhase = ''
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/sqlparse/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ buildPythonPackage rec {
sha256 = "ce028444cfab83be538752a2ffdb56bc417b7784ff35bb9a3062413717807dec";
};

buildInputs = [ pytest ];
checkInputs = [ pytest ];
checkPhase = ''
py.test
'';
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/tlsh/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ stdenv
, buildPythonPackage
, fetchFromGitHub
, pkgs
, cmake
}:

buildPythonPackage rec {
Expand All @@ -15,7 +15,7 @@ buildPythonPackage rec {
sha256 = "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll";
};

buildInputs = [ pkgs.cmake ];
nativeBuildInputs = [ cmake ];

# no test data
doCheck = false;
Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/python-modules/whoosh/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ buildPythonPackage rec {
inherit pname version;
sha256 = "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw";
};
buildInputs = [ pytest ];

checkInputs = [ pytest ];

# Wrong encoding
postPatch = ''
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/xlrd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildPythonPackage rec {
sha256 = "8a21885513e6d915fe33a8ee5fdfa675433b61405ba13e2a69e62ee36828d7e2";
};

buildInputs = [ nose ];
checkInputs = [ nose ];

checkPhase = ''
nosetests -v
Expand Down
2 changes: 1 addition & 1 deletion pkgs/tools/backup/tarsnapper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ python3Packages.buildPythonApplication rec {
sha256 = "03db49188f4v1946c8mqqj30ah10x68hbg3a58js0syai32v12pm";
};

buildInputs = with python3Packages; [ nose pytest ];
checkInputs = with python3Packages; [ nose pytest ];

checkPhase = ''
py.test .
Expand Down
Loading

0 comments on commit 5a3670b

Please sign in to comment.