Merge pull request #169335 from SuperSandro2000/txtorcon
python310Packages.txtorcon: fix test execution, cleanup
This commit is contained in:
commit
bc586e1fe8
1 changed files with 8 additions and 15 deletions
|
@ -1,31 +1,24 @@
|
||||||
{ lib, stdenv, python, buildPythonPackage, pythonOlder, fetchPypi, isPy3k, incremental, ipaddress, twisted
|
{ lib, stdenv, python, buildPythonPackage, pythonOlder, fetchPypi, isPy3k, incremental, ipaddress, twisted
|
||||||
, automat, zope_interface, idna, pyopenssl, service-identity, pytest, mock, lsof
|
, automat, zope_interface, idna, pyopenssl, service-identity, pytestCheckHook, mock, lsof
|
||||||
, GeoIP }:
|
, GeoIP }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "txtorcon";
|
pname = "txtorcon";
|
||||||
version = "22.0.0";
|
version = "22.0.0";
|
||||||
|
|
||||||
checkInputs = [ pytest mock lsof GeoIP ];
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
incremental twisted automat zope_interface
|
|
||||||
# extra dependencies required by twisted[tls]
|
|
||||||
idna pyopenssl service-identity
|
|
||||||
] ++ lib.optionals (!isPy3k) [ ipaddress ];
|
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "sha256-iaG2XjKks2nWfmwWY4f7xGjMXQUidEjSOaXn6XGKoFM=";
|
sha256 = "sha256-iaG2XjKks2nWfmwWY4f7xGjMXQUidEjSOaXn6XGKoFM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Based on what txtorcon tox.ini will automatically test, allow back as far
|
propagatedBuildInputs = [
|
||||||
# as Python 3.5.
|
incremental twisted automat zope_interface
|
||||||
disabled = pythonOlder "3.5";
|
] ++ twisted.extras.tls
|
||||||
|
++ lib.optionals (!isPy3k) [ ipaddress ];
|
||||||
|
|
||||||
|
checkInputs = [ pytestCheckHook mock lsof GeoIP ];
|
||||||
|
|
||||||
doCheck = !(stdenv.isDarwin && stdenv.isAarch64);
|
doCheck = !(stdenv.isDarwin && stdenv.isAarch64);
|
||||||
checkPhase = ''
|
|
||||||
${python.interpreter} -m twisted.trial -j $NIX_BUILD_CORES ./test
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Twisted-based Tor controller client, with state-tracking and configuration abstractions";
|
description = "Twisted-based Tor controller client, with state-tracking and configuration abstractions";
|
||||||
|
|
Loading…
Reference in a new issue