git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #22280 from lsix/pytest_defaults_to_30

python*Packages.pytest: defaults to pytest_30

commit18ac28b45d5fae8f8f04a519b4dc6f5cf2e7d7c5 authorFrederik Rietdijk <freddyrietdijk@fridh.nl> dateTue 31 Jan 2017, 09:48 (10 years ago) parent01751a94cf8ae3
3 files changed+61−55
pkgs/development/python-modules/hypothesis.nix+38 pkgs/tools/misc/tmuxp/default.nix+1−1 pkgs/top-level/python-packages.nix+22−54
pkgs/development/python-modules/hypothesis.nixnew file+38
@@ -0,0 +1,38 @@
1+{ stdenv, buildPythonPackage, fetchFromGitHub, python
2+, isPy27, enum34
3+, doCheck ? true, pytest, flake8, flaky
4+}:
5+buildPythonPackage rec {
6+ # http://hypothesis.readthedocs.org/en/latest/packaging.html
7+
8+ # Hypothesis has optional dependencies on the following libraries
9+ # pytz fake_factory django numpy pytest
10+ # If you need these, you can just add them to your environment.
11+
12+ name = "hypothesis-${version}";
13+ version = "3.6.0";
14+
15+ # Upstream prefers github tarballs
16+ src = fetchFromGitHub {
17+ owner = "HypothesisWorks";
18+ repo = "hypothesis";
19+ rev = "${version}";
20+ sha256 = "0a3r4c8sr9jn7sv419vdzrzfc9sp7zf105f1lgyiwyzi3cgyvcvg";
21+ };
22+
23+ buildInputs = stdenv.lib.optionals doCheck [ pytest flake8 flaky ];
24+ propagatedBuildInputs = stdenv.lib.optionals isPy27 [ enum34 ];
25+
26+ inherit doCheck;
27+
28+ # https://github.com/DRMacIver/hypothesis/issues/300
29+ checkPhase = ''
30+ ${python.interpreter} -m pytest tests/cover
31+ '';
32+
33+ meta = with stdenv.lib; {
34+ description = "A Python library for property based testing";
35+ homepage = https://github.com/DRMacIver/hypothesis;
36+ license = licenses.mpl20;
37+ };
38+}
pkgs/tools/misc/tmuxp/default.nix+1−1
@@ -16,7 +16,7 @@ pythonPackages.buildPythonApplication rec {
1616 '';
1717
1818 buildInputs = with pythonPackages; [
19− pytest
19+ pytest_29
2020 pytest-rerunfailures
2121 ];
2222
pkgs/top-level/python-packages.nix+22−54
@@ -896,7 +896,7 @@ in {
896896 sha256 = "1ybywzkd840v1qvb1p2bs08js260vq1jscjg8182hv7bmwacqy0k";
897897 };
898898
899− buildInputs = with self; [ pytest_30 case ];
899+ buildInputs = with self; [ pytest case ];
900900 propagatedBuildInputs = with self; [ vine ];
901901
902902 meta = {
@@ -2670,7 +2670,7 @@ in {
26702670 sha256 = "1anw68rkja1dbgvndxz5mq6f89hmxwaha0fjcdnsl5j1wj7imc1y";
26712671 };
26722672
2673− buildInputs = with self; [ pytest_30 case ];
2673+ buildInputs = with self; [ pytest case ];
26742674
26752675 meta = {
26762676 homepage = https://github.com/celery/billiard;
@@ -3586,7 +3586,7 @@ in {
35863586 sha256 = "0kgmbs3fl9879n48p4m79nxy9by2yhvxq1jdvlnqzzvkdb2sdmg3";
35873587 };
35883588
3589− buildInputs = with self; [ pytest_30 case ];
3589+ buildInputs = with self; [ pytest case ];
35903590 propagatedBuildInputs = with self; [ kombu billiard pytz anyjson amqp eventlet ];
35913591
35923592 meta = {
@@ -3832,7 +3832,7 @@ in {
38323832 sha256 = "400b0bb63d9096b6bf2806efaf742a1cc8b6c88e0484f0afe7d7a7f0e9870609";
38333833 };
38343834
3835− checkInputs = with self; [ pytest ];
3835+ checkInputs = with self; [ pytest_29 ];
38363836 propagatedBuildInputs = with self; [ click ] ++ optional (!isPy3k) futures;
38373837
38383838 checkPhase = ''
@@ -4692,7 +4692,7 @@ in {
46924692 sha256 = "0aw1zxmyvx6gfmmnixbqmdaah28jl7rmqkzhxv53091asc23iw9k";
46934693 };
46944694
4695− buildInputs = with self; [ pytest ];
4695+ buildInputs = with self; [ pytest_29 ];
46964696 propagatedBuildInputs = with self; [ future numpy ];
46974697
46984698 doCheck = true;
@@ -4964,7 +4964,7 @@ in {
49644964 };
49654965 };
49664966
4967− pytest = self.pytest_29;
4967+ pytest = self.pytest_30;
49684968
49694969 pytest_27 = callPackage ../development/python-modules/pytest/2_7.nix {};
49704970
@@ -4972,7 +4972,13 @@ in {
49724972
49734973 pytest_29 = callPackage ../development/python-modules/pytest/2_9.nix {};
49744974
4975− pytest_30 = callPackage ../development/python-modules/pytest {};
4975+ pytest_30 = callPackage ../development/python-modules/pytest{
4976+ hypothesis = self.hypothesis.override {
4977+ # hypothesis requires pytest that causes dependency cycle
4978+ doCheck = false;
4979+ pytest = null;
4980+ };
4981+ };
49764982
49774983 pytestcache = buildPythonPackage rec {
49784984 name = "pytest-cache-1.0";
@@ -4998,9 +5004,7 @@ in {
49985004 };
49995005 };
50005006
5001− pytestdjango = callPackage ../development/python-modules/pytestdjango.nix {
5002− pytest = self.pytest_30;
5003− };
5007+ pytestdjango = callPackage ../development/python-modules/pytestdjango.nix { };
50045008
50055009 pytest-fixture-config = buildPythonPackage rec {
50065010 name = "${pname}-${version}";
@@ -5589,7 +5593,7 @@ in {
55895593 sha256 = "117savw47c2givq9vxr5m02nyxmsk34l2ihxyy5axlaiqyxyf20s";
55905594 };
55915595
5592− buildInputs = with self; [ pytest ];
5596+ buildInputs = with self; [ pytest_29 ];
55935597 patchPhase = ''
55945598 sed -i 's/==.*$//' requirements/test.txt
55955599 '';
@@ -10344,9 +10348,7 @@ in {
1034410348 };
1034510349 };
1034610350
10347− django_guardian = callPackage ../development/python-modules/django_guardian.nix {
10348− pytest = self.pytest_30;
10349− };
10351+ django_guardian = callPackage ../development/python-modules/django_guardian.nix { };
1035010352
1035110353 django_tagging = buildPythonPackage rec {
1035210354 name = "django-tagging-0.4.5";
@@ -12586,41 +12588,7 @@ in {
1258612588 propagatedBuildInputs = with self; [ requests2 ];
1258712589 };
1258812590
12589− hypothesis = buildPythonPackage rec {
12590− # http://hypothesis.readthedocs.org/en/latest/packaging.html
12591−
12592− # Hypothesis has optional dependencies on the following libraries
12593− # pytz fake_factory django numpy pytest
12594− # If you need these, you can just add them to your environment.
12595−
12596− name = "hypothesis-${version}";
12597− version = "3.5.2";
12598−
12599− # Upstream prefers github tarballs
12600− src = pkgs.fetchFromGitHub {
12601− owner = "HypothesisWorks";
12602− repo = "hypothesis";
12603− rev = "${version}";
12604− sha256 = "030rf4gn4b0hylr90wazilwa3bc038fcqng0wibcx67mqaq035n4";
12605− };
12606−
12607− buildInputs = with self; [ flake8 pytest flaky ];
12608− propagatedBuildInputs = with self; ([ uncompyle6 ] ++ optionals isPy27 [ enum34 ]);
12609−
12610− # Fails randomly in tests/cover/test_conjecture_engine.py::test_interleaving_engines.
12611− doCheck = false;
12612−
12613− # https://github.com/DRMacIver/hypothesis/issues/300
12614− checkPhase = ''
12615− ${python.interpreter} -m pytest tests/cover
12616− '';
12617−
12618− meta = {
12619− description = "A Python library for property based testing";
12620− homepage = https://github.com/DRMacIver/hypothesis;
12621− license = licenses.mpl20;
12622− };
12623− };
12591+ hypothesis = callPackage ../development/python-modules/hypothesis.nix { };
1262412592
1262512593 colored = buildPythonPackage rec {
1262612594 name = "colored-${version}";
@@ -13557,7 +13525,7 @@ in {
1355713525 sha256 = "18hiricdnbnlz6hx3hbaa4dni6npv8rbid4dhf7k02k16qm6zz6h";
1355813526 };
1355913527
13560− buildInputs = with self; [ pytest_30 case pytz ];
13528+ buildInputs = with self; [ pytest case pytz ];
1356113529
1356213530 propagatedBuildInputs = with self; [ amqp ];
1356313531
@@ -18460,7 +18428,7 @@ in {
1846018428 sha256 = "0v8aq0xzsa7clazszxl42904c3jpq69lg8a5hg754bqcqf72hfrn";
1846118429 };
1846218430 LC_ALL="en_US.UTF-8";
18463− buildInputs = with self; [ pkgs.glibcLocales pytest ];
18431+ buildInputs = with self; [ pkgs.glibcLocales pytest_29 ];
1846418432
1846518433 checkPhase = ''
1846618434 py.test
@@ -23424,7 +23392,7 @@ in {
2342423392 url = "mirror://pypi/s/${pname}/${name}.tar.gz";
2342523393 sha256 = "14220f8f761c48ba1e2526f087195077cf54fad7098b382ce220422f0ff59b12";
2342623394 };
23427− buildInputs = with self; [ pytest virtualenv pytestrunner pytest-virtualenv ];
23395+ buildInputs = with self; [ pytest_29 virtualenv pytestrunner pytest-virtualenv ];
2342823396 propagatedBuildInputs = with self; [ twisted pathlib2 ];
2342923397 postPatch = ''
2343023398 sed -i '12,$d' tests/test_main.py
@@ -31650,7 +31618,7 @@ EOF
3165031618 url = "mirror://pypi/a/${pname}/${name}.tar.gz";
3165131619 sha256 = "1158ml8h3g0vlsgw2jmy579glbg7dn0mjij8xibdl509b8qv9p51";
3165231620 };
31653− buildInputs = with self; [ unittest2 mock pytest trollius ];
31621+ buildInputs = with self; [ unittest2 mock pytest_29 trollius ];
3165431622 propagatedBuildInputs = with self; [ six twisted txaio ];
3165531623 checkPhase = ''
3165631624 py.test $out
@@ -31884,7 +31852,7 @@ EOF
3188431852 sha256 = "0h94x9mc9bspg23lb1f73h7smdzc39ps7z7sm0q38ds9jahmvfc7";
3188531853 };
3188631854
31887− buildInputs = with self; [ case pytest_30 ];
31855+ buildInputs = with self; [ case pytest ];
3188831856
3188931857 meta = {
3189031858 homepage = https://github.com/celery/vine;