Merge pull request #132900 from PrivateStorageio/twisted-to-21.7.0

This commit is contained in:
Sandro
2021-08-22 22:29:24 +02:00
committed by GitHub
9 changed files with 68 additions and 43 deletions

View File

@@ -1,35 +1,29 @@
{ lib, buildPythonPackage, fetchPypi, fetchpatch
, six, twisted, werkzeug, incremental
, mock }:
{ lib, buildPythonPackage, fetchPypi, python
, attrs, enum34, hyperlink, incremental, six, twisted, typing, tubes, werkzeug, zope_interface
, hypothesis, treq
}:
buildPythonPackage rec {
pname = "klein";
version = "17.10.0";
version = "21.8.0";
src = fetchPypi {
inherit pname version;
sha256 = "30aaf0d78a987d5dbfe0968a07367ad0c73e02823cc8eef4c54f80ab848370d0";
sha256 = "1mpydmz90d0n9dwa7mr6pgj5v0kczfs05ykssrasdq368dssw7ch";
};
patches = [
(fetchpatch {
name = "tests-expect-werkzeug-308.patch";
url = "https://github.com/twisted/klein/commit/e2a5835b83e37a2bc5faefbfe1890c529b18b9c6.patch";
sha256 = "03j0bj3l3hnf7f96rb27i4bzy1iih79ll5bcah7gybdi1wpznh8w";
})
];
propagatedBuildInputs = [ attrs enum34 hyperlink incremental six twisted typing tubes werkzeug zope_interface ];
propagatedBuildInputs = [ six twisted werkzeug incremental ];
checkInputs = [ mock twisted ];
checkInputs = [ hypothesis treq ];
checkPhase = ''
trial klein
${python.interpreter} -m twisted.trial -j $NIX_BUILD_CORES klein
'';
meta = with lib; {
description = "Klein Web Micro-Framework";
homepage = "https://github.com/twisted/klein";
license = licenses.mit;
maintainers = with maintainers; [ exarkun ];
};
}

View File

@@ -0,0 +1,29 @@
{ lib, buildPythonPackage, fetchPypi, python
, characteristic, six, twisted
}:
buildPythonPackage rec {
pname = "tubes";
version = "0.2.0";
src = fetchPypi {
pname = "Tubes";
inherit version;
sha256 = "0sg1gg2002h1xsgxigznr1zk1skwmhss72dzk6iysb9k9kdgymcd";
};
propagatedBuildInputs = [ characteristic six twisted ];
checkPhase = ''
${python.interpreter} -m twisted.trial -j $NIX_BUILD_CORES tubes
'';
pythonImportsCheck = [ "tubes" ];
meta = with lib; {
description = "a data-processing and flow-control engine for event-driven programs";
homepage = "https://github.com/twisted/tubes";
license = licenses.mit;
maintainers = with maintainers; [ exarkun ];
};
}

View File

@@ -13,18 +13,19 @@
, service-identity
, setuptools
, idna
, typing-extensions
}:
buildPythonPackage rec {
pname = "Twisted";
version = "20.3.0";
version = "21.7.0";
src = fetchPypi {
inherit pname version;
extension = "tar.bz2";
sha256 = "040yzha6cyshnn6ljgk2birgh6mh2cnra48xp5ina5vfsnsmab6p";
extension = "tar.gz";
sha256 = "01lh225d7lfnmfx4f4kxwl3963gjc9yg8jfkn1w769v34ia55mic";
};
propagatedBuildInputs = [ zope_interface incremental automat constantly hyperlink pyhamcrest attrs setuptools ];
propagatedBuildInputs = [ zope_interface incremental automat constantly hyperlink pyhamcrest attrs setuptools typing-extensions ];
passthru.extras.tls = [ pyopenssl service-identity idna ];
@@ -32,7 +33,7 @@ buildPythonPackage rec {
# twisted.python.runtime.platform.supportsINotify() == False
patchPhase = lib.optionalString stdenv.isLinux ''
substituteInPlace src/twisted/python/_inotify.py --replace \
"ctypes.util.find_library('c')" "'${stdenv.glibc.out}/lib/libc.so.6'"
"ctypes.util.find_library(\"c\")" "'${stdenv.glibc.out}/lib/libc.so.6'"
'';
# Generate Twisted's plug-in cache. Twisted users must do it as well. See

View File

@@ -1,4 +1,4 @@
{lib, buildPythonPackage, fetchPypi, isPy3k, incremental, ipaddress, twisted
{ lib, python, buildPythonPackage, pythonOlder, fetchPypi, isPy3k, incremental, ipaddress, twisted
, automat, zope_interface, idna, pyopenssl, service-identity, pytest, mock, lsof
, GeoIP, isPy27}:
@@ -18,21 +18,18 @@ buildPythonPackage rec {
sha256 = "aebf0b9ec6c69a029f6b61fd534e785692e28fdcd2fd003ce3cc132b9393b7d6";
};
# zope.interface issue
doCheck = isPy3k;
# Skip a failing test until fixed upstream:
# https://github.com/meejah/txtorcon/issues/250
# Based on what txtorcon tox.ini will automatically test, allow back as far
# as Python 3.5.
disabled = pythonOlder "3.5";
checkPhase = ''
pytest --ignore=test/test_util.py .
${python.interpreter} -m twisted.trial -j $NIX_BUILD_CORES ./test
'';
meta = {
description = "Twisted-based Tor controller client, with state-tracking and configuration abstractions";
homepage = "https://github.com/meejah/txtorcon";
maintainers = with lib.maintainers; [ jluttine ];
# Currently broken on Python 2.7. See
# https://github.com/NixOS/nixpkgs/issues/71826
broken = isPy27;
maintainers = with lib.maintainers; [ jluttine exarkun ];
license = lib.licenses.mit;
};
}