pythonPackages.netaddr: 0.7.19 -> 0.8.0
Updating to >= 0.7.20 fixes tests on macOS Catalina and newer: # inet_pton has to be different on Mac OSX *sigh* assert IPAddress('010.000.000.001', flags=INET_PTON) == IPAddress('10.0.0.1') > assert int_to_str(0xffff) == '::0.0.255.255' E AssertionError: assert '::ffff' == '::0.0.255.255' E - ::0.0.255.255 E + ::ffff
This commit is contained in:
parent
6aad47ca82
commit
c32441811f
@ -1,41 +1,32 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, pytest
|
, pythonOlder
|
||||||
, fetchpatch
|
|
||||||
, glibcLocales
|
, glibcLocales
|
||||||
|
, importlib-resources
|
||||||
|
, pytestCheckHook
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "netaddr";
|
pname = "netaddr";
|
||||||
version = "0.7.19";
|
version = "0.8.0";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "38aeec7cdd035081d3a4c306394b19d677623bf76fa0913f6695127c7753aefd";
|
sha256 = "0hx2npi0wnhwlcybilgwlddw6qffx1mb7a3sj4p9s7bvl33mgk6n";
|
||||||
};
|
};
|
||||||
|
|
||||||
LC_ALL = "en_US.UTF-8";
|
LC_ALL = "en_US.UTF-8";
|
||||||
checkInputs = [ glibcLocales pytest ];
|
|
||||||
|
|
||||||
checkPhase = ''
|
propagatedBuildInputs = stdenv.lib.optionals (pythonOlder "3.7") [ importlib-resources ];
|
||||||
# fails on python3.7: https://github.com/drkjam/netaddr/issues/182
|
|
||||||
py.test \
|
|
||||||
-k 'not test_ip_splitter_remove_prefix_larger_than_input_range' \
|
|
||||||
netaddr/tests
|
|
||||||
'';
|
|
||||||
|
|
||||||
patches = [
|
checkInputs = [ glibcLocales pytestCheckHook ];
|
||||||
(fetchpatch {
|
|
||||||
url = "https://github.com/drkjam/netaddr/commit/2ab73f10be7069c9412e853d2d0caf29bd624012.patch";
|
|
||||||
sha256 = "0s1cdn9v5alpviabhcjmzc0m2pnpq9dh2fnnk2x96dnry1pshg39";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = "https://github.com/drkjam/netaddr/";
|
homepage = "https://netaddr.readthedocs.io/en/latest/";
|
||||||
|
downloadPage = "https://github.com/netaddr/netaddr/releases";
|
||||||
|
changelog = "https://netaddr.readthedocs.io/en/latest/changes.html";
|
||||||
description = "A network address manipulation library for Python";
|
description = "A network address manipulation library for Python";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user