1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 22:50:49 +00:00

pythonPackages: fix native / check inputs

This commit is contained in:
Frederik Rietdijk 2019-01-05 11:54:27 +01:00 committed by Frederik Rietdijk
parent 15396247ca
commit 5a3670b83c
34 changed files with 77 additions and 59 deletions

View file

@ -9,7 +9,7 @@ buildPythonPackage rec {
sha256 = "90f8e61121d6ae58362ce3bed8cd997efb00c914eae0ff3d363c32f9a9822d10";
};
buildInputs = [ nose ];
checkInputs = [ nose ];
checkPhase = ''
nosetests build
'';

View file

@ -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

View file

@ -4,7 +4,7 @@ buildPythonPackage rec {
pname = "distro";
version = "1.3.0";
buildInputs = [ pytest pytestcov tox];
checkInputs = [ pytest pytestcov tox];
checkPhase = ''
touch tox.ini

View file

@ -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";

View file

@ -14,7 +14,7 @@ buildPythonPackage rec {
sha256="0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1";
};
buildInputs = [ lxml pytest ];
checkInputs = [ lxml pytest ];
checkPhase = ''
py.test $out
'';

View file

@ -11,6 +11,8 @@
, urllib3
, rednose
, nose-randomly
, six
, mock
}:
buildPythonPackage rec {
@ -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/";

View file

@ -10,7 +10,7 @@ buildPythonPackage rec {
sha256 = "15v69rg2lkcykb2spnq6vbbirv9sfq480fnwmfppw9gn3h95pi7k";
};
buildInputs = [ pytest mock ];
checkInputs = [ pytest mock ];
checkPhase = ''
py.test tests.py

View file

@ -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;

View file

@ -1,7 +1,7 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, pkgs
, kerberos
}:
buildPythonPackage rec {
@ -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";

View file

@ -1,4 +1,4 @@
{ stdenv, fetchPypi, fetchFromGitHub, buildPythonPackage, gssapi, pyasn1 }:
{ stdenv, fetchPypi, fetchFromGitHub, buildPythonPackage, pyasn1 }:
buildPythonPackage rec {
version = "2.5.2";
@ -17,8 +17,6 @@ buildPythonPackage rec {
sha256 = "0p5l4bhy6j2nvvlxz5zvznbaqb72x791v9la2jr2wpwr60mzz9hw";
};
buildInputs = [ gssapi ];
propagatedBuildInputs = [ pyasn1 ];
doCheck = false; # requires network

View file

@ -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/;

View file

@ -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

View file

@ -14,6 +14,7 @@ buildPythonPackage rec {
sha256 = "36720698c29e7a9626a0dc802ef8885f8f0239bfd1689628ecd459a061f2807f";
};
nativeBuildInputs = [ libxml2.dev libxslt.dev ];
buildInputs = [ libxml2 libxslt ];
hardeningDisable = stdenv.lib.optional stdenv.isDarwin "format";

View file

@ -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";

View file

@ -2,7 +2,8 @@
, buildPythonPackage
, fetchPypi
, pytest
, pkgs
, fetchpatch
, glibcLocales
}:
buildPythonPackage rec {
@ -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
@ -25,7 +26,7 @@ buildPythonPackage rec {
'';
patches = [
(pkgs.fetchpatch {
(fetchpatch {
url = https://github.com/drkjam/netaddr/commit/2ab73f10be7069c9412e853d2d0caf29bd624012.patch;
sha256 = "0s1cdn9v5alpviabhcjmzc0m2pnpq9dh2fnnk2x96dnry1pshg39";
})

View file

@ -14,10 +14,7 @@ buildPythonPackage rec {
sha256 = "361f4c2fbb090ec2bc8e5e4151e21409a09ac13f364e3448247cc01f326d89b3";
};
checkInputs = [ numpy ];
propagatedBuildInputs = [
nose
];
checkInputs = [ numpy nose ];
checkPhase = ''
nosetests

View file

@ -18,6 +18,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [ nose ];
checkInputs = [ nose ];
checkPhase = ''
nosetests -v
'';

View file

@ -13,7 +13,7 @@ buildPythonPackage rec {
sha256 = "0qrhkd3sga56qf6k0sqyhwfcladwi05gl6aqmr0xriiq1sgva5dy";
};
buildInputs = [ nose ];
checkInputs = [ nose ];
checkPhase = ''
nosetests -v

View file

@ -8,7 +8,7 @@ buildPythonPackage rec {
sha256 = "1ldpgil0kaf6wz5gvl9xdx35a62vc6bmgi3wbh9320dj5v2qk4wh";
};
buildInputs = [ pytest mock ];
checkInputs = [ pytest mock ];
checkPhase = ''
py.test

View file

@ -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.";

View file

@ -13,7 +13,7 @@ buildPythonPackage rec {
sha256 = "1bswbmhlbqdxlgbxlb6xrlm4k253sg8nvpl1whgsys8p3fg0cw2m";
};
buildInputs = [ pytest ];
checkInputs = [ pytest ];
checkPhase = ''
py.test

View file

@ -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 ];

View file

@ -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 ];

View file

@ -4,7 +4,7 @@ buildPythonPackage rec {
version = "0.2.0";
pname = "pytest-cram";
buildInputs = [ pytest ];
checkInputs = [ pytest ];
propagatedBuildInputs = [ cram ];
src = fetchPypi {

View file

@ -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.

View file

@ -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 {

View file

@ -9,7 +9,7 @@ buildPythonPackage rec {
sha256 = "d23f117be39919f00dd91bffeb4f15e031ec797501b717a245e377aee0f577be";
};
buildInputs = [ setuptools_scm pytest ];
nativeBuildInputs = [ setuptools_scm pytest ];
postPatch = ''
rm pytest.ini

View file

@ -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 = ''

View file

@ -14,7 +14,7 @@ buildPythonPackage rec {
sha256 = "ce028444cfab83be538752a2ffdb56bc417b7784ff35bb9a3062413717807dec";
};
buildInputs = [ pytest ];
checkInputs = [ pytest ];
checkPhase = ''
py.test
'';

View file

@ -1,7 +1,7 @@
{ stdenv
, buildPythonPackage
, fetchFromGitHub
, pkgs
, cmake
}:
buildPythonPackage rec {
@ -15,7 +15,7 @@ buildPythonPackage rec {
sha256 = "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll";
};
buildInputs = [ pkgs.cmake ];
nativeBuildInputs = [ cmake ];
# no test data
doCheck = false;

View file

@ -7,7 +7,8 @@ buildPythonPackage rec {
inherit pname version;
sha256 = "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw";
};
buildInputs = [ pytest ];
checkInputs = [ pytest ];
# Wrong encoding
postPatch = ''

View file

@ -13,7 +13,7 @@ buildPythonPackage rec {
sha256 = "8a21885513e6d915fe33a8ee5fdfa675433b61405ba13e2a69e62ee36828d7e2";
};
buildInputs = [ nose ];
checkInputs = [ nose ];
checkPhase = ''
nosetests -v

View file

@ -11,7 +11,7 @@ python3Packages.buildPythonApplication rec {
sha256 = "03db49188f4v1946c8mqqj30ah10x68hbg3a58js0syai32v12pm";
};
buildInputs = with python3Packages; [ nose pytest ];
checkInputs = with python3Packages; [ nose pytest ];
checkPhase = ''
py.test .

View file

@ -534,7 +534,9 @@ in {
pyaxmlparser = callPackage ../development/python-modules/pyaxmlparser { };
pycairo = callPackage ../development/python-modules/pycairo { };
pycairo = callPackage ../development/python-modules/pycairo {
inherit (pkgs) pkgconfig;
};
pycangjie = disabledIf (!isPy3k) (callPackage ../development/python-modules/pycangjie { });
@ -572,9 +574,13 @@ in {
pygmo = callPackage ../development/python-modules/pygmo { };
pygobject2 = callPackage ../development/python-modules/pygobject { };
pygobject2 = callPackage ../development/python-modules/pygobject {
inherit (pkgs) pkgconfig;
};
pygobject3 = callPackage ../development/python-modules/pygobject/3.nix { };
pygobject3 = callPackage ../development/python-modules/pygobject/3.nix {
inherit (pkgs) pkgconfig;
};
pygtail = callPackage ../development/python-modules/pygtail { };
@ -2839,7 +2845,9 @@ in {
jsonpath_rw = callPackage ../development/python-modules/jsonpath_rw { };
kerberos = callPackage ../development/python-modules/kerberos { };
kerberos = callPackage ../development/python-modules/kerberos {
inherit (pkgs) kerberos;
};
lazy-object-proxy = callPackage ../development/python-modules/lazy-object-proxy { };
@ -2902,7 +2910,7 @@ in {
livereload = callPackage ../development/python-modules/livereload { };
llfuse = callPackage ../development/python-modules/llfuse {
fuse = pkgs.fuse; # use "real" fuse, not the python module
inherit (pkgs) fuse pkgconfig; # use "real" fuse and pkgconfig, not the python modules
};
locustio = callPackage ../development/python-modules/locustio { };
@ -4625,7 +4633,7 @@ in {
};
libvirt = callPackage ../development/python-modules/libvirt {
inherit (pkgs) libvirt;
inherit (pkgs) libvirt pkgconfig;
};
rpdb = callPackage ../development/python-modules/rpdb { };