git.iko.soy/typeable/nixpkgs
on master help sign in
python3Packages.docker: fix darwin tests
commita87c803cf980272314fb4877047af6006f039bf7 authorJonathan Ringer <jonringer117@gmail.com> dateMon 9 Dec 2019, 22:34 (7 years ago) parent2e44944
1 file changed+13−12
pkgs/development/python-modules/docker/default.nix+13−12
pkgs/development/python-modules/docker/default.nix+13−12
@@ -1,8 +1,9 @@
1−{ stdenv, buildPythonPackage, fetchPypi, isPy27
1+{ lib, stdenv, buildPythonPackage, fetchPypi, isPy27
22, backports_ssl_match_hostname
33, mock
44, paramiko
55, pytest
6+, pytestCheckHook
67, requests
78, six
89, websocket_client
@@ -17,25 +18,25 @@ buildPythonPackage rec {
1718 sha256 = "1hdgics03fz2fbhalzys7a7kjj54jnl5a37h6lzdgym41gkwa1kf";
1819 };
1920
21+ nativeBuildInputs = [
22+ pytestCheckHook
23+ ] ++ lib.optional isPy27 mock;
24+
2025 propagatedBuildInputs = [
2126 paramiko
2227 requests
2328 six
2429 websocket_client
25− ] ++ stdenv.lib.optional isPy27 backports_ssl_match_hostname;
26−
27− checkInputs = [
28− mock
29− pytest
30− ];
30+ ] ++ lib.optional isPy27 backports_ssl_match_hostname;
3131
32− # Other tests touch network
32+ pytestFlagsArray = [ "tests/unit" ];
3333 # Deselect socket tests on Darwin because it hits the path length limit for a Unix domain socket
34− checkPhase = ''
35− ${pytest}/bin/pytest tests/unit/ ${stdenv.lib.optionalString stdenv.isDarwin "--deselect=tests/unit/api_test.py::TCPSocketStreamTest"}
36− '';
34+ disabledTests = lib.optionals stdenv.isDarwin [ "stream_response" "socket_file" ];
35+
36+ # skip setuptoolsCheckPhase
37+ doCheck = false;
3738
38− meta = with stdenv.lib; {
39+ meta = with lib; {
3940 description = "An API client for docker written in Python";
4041 homepage = "https://github.com/docker/docker-py";
4142 license = licenses.asl20;