From de3f5c22703ba82c6c59cb94ae3af15a2239b01f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 19 Apr 2022 16:30:24 +0200 Subject: [PATCH] python310Packages.txtorcon: fix test execution, cleanup --- .../python-modules/txtorcon/default.nix | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/txtorcon/default.nix b/pkgs/development/python-modules/txtorcon/default.nix index c5fc7e1c6a44..167e090fca06 100644 --- a/pkgs/development/python-modules/txtorcon/default.nix +++ b/pkgs/development/python-modules/txtorcon/default.nix @@ -1,31 +1,24 @@ { lib, stdenv, python, buildPythonPackage, pythonOlder, fetchPypi, isPy3k, incremental, ipaddress, twisted -, automat, zope_interface, idna, pyopenssl, service-identity, pytest, mock, lsof -, GeoIP}: +, automat, zope_interface, idna, pyopenssl, service-identity, pytestCheckHook, mock, lsof +, GeoIP }: buildPythonPackage rec { pname = "txtorcon"; 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 { inherit pname version; sha256 = "sha256-iaG2XjKks2nWfmwWY4f7xGjMXQUidEjSOaXn6XGKoFM="; }; - # Based on what txtorcon tox.ini will automatically test, allow back as far - # as Python 3.5. - disabled = pythonOlder "3.5"; + propagatedBuildInputs = [ + incremental twisted automat zope_interface + ] ++ twisted.extras.tls + ++ lib.optionals (!isPy3k) [ ipaddress ]; + + checkInputs = [ pytestCheckHook mock lsof GeoIP ]; doCheck = !(stdenv.isDarwin && stdenv.isAarch64); - checkPhase = '' - ${python.interpreter} -m twisted.trial -j $NIX_BUILD_CORES ./test - ''; meta = { description = "Twisted-based Tor controller client, with state-tracking and configuration abstractions";