Merge pull request #169335 from SuperSandro2000/txtorcon

python310Packages.txtorcon: fix test execution, cleanup

authored by Sandro and committed by GitHub bc586e1f 0a0cf3d2

+8 -15
+8 -15
pkgs/development/python-modules/txtorcon/default.nix
··· 1 1 { lib, stdenv, python, buildPythonPackage, pythonOlder, fetchPypi, isPy3k, incremental, ipaddress, twisted 2 - , automat, zope_interface, idna, pyopenssl, service-identity, pytest, mock, lsof 3 - , GeoIP}: 2 + , automat, zope_interface, idna, pyopenssl, service-identity, pytestCheckHook, mock, lsof 3 + , GeoIP }: 4 4 5 5 buildPythonPackage rec { 6 6 pname = "txtorcon"; 7 7 version = "22.0.0"; 8 8 9 - checkInputs = [ pytest mock lsof GeoIP ]; 10 - propagatedBuildInputs = [ 11 - incremental twisted automat zope_interface 12 - # extra dependencies required by twisted[tls] 13 - idna pyopenssl service-identity 14 - ] ++ lib.optionals (!isPy3k) [ ipaddress ]; 15 - 16 9 src = fetchPypi { 17 10 inherit pname version; 18 11 sha256 = "sha256-iaG2XjKks2nWfmwWY4f7xGjMXQUidEjSOaXn6XGKoFM="; 19 12 }; 20 13 21 - # Based on what txtorcon tox.ini will automatically test, allow back as far 22 - # as Python 3.5. 23 - disabled = pythonOlder "3.5"; 14 + propagatedBuildInputs = [ 15 + incremental twisted automat zope_interface 16 + ] ++ twisted.extras.tls 17 + ++ lib.optionals (!isPy3k) [ ipaddress ]; 18 + 19 + checkInputs = [ pytestCheckHook mock lsof GeoIP ]; 24 20 25 21 doCheck = !(stdenv.isDarwin && stdenv.isAarch64); 26 - checkPhase = '' 27 - ${python.interpreter} -m twisted.trial -j $NIX_BUILD_CORES ./test 28 - ''; 29 22 30 23 meta = { 31 24 description = "Twisted-based Tor controller client, with state-tracking and configuration abstractions";