Merge pull request #172113 from SuperSandro2000/autobahn

python310Packages.autobahn: adopt, populate passthru.extras-require
This commit is contained in:
Sandro 2022-05-13 00:41:01 +02:00 committed by GitHub
commit 184892dce5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 132 additions and 62 deletions

View file

@ -13,13 +13,12 @@
}:
buildPythonPackage rec {
pname = "argon2_cffi";
pname = "argon2-cffi";
version = "21.3.0";
format = "flit";
src = fetchPypi {
pname = "argon2-cffi";
inherit version;
inherit pname version;
sha256 = "d384164d944190a7dd7ef22c6aa3ff197da12962bd04b17f64d4e93d934dba5b";
};

View file

@ -1,25 +1,49 @@
{ lib
, argon2_cffi
, buildPythonPackage
, cbor
, fetchPypi
, attrs
, argon2-cffi
, base58
, cbor2
, cffi
, click
, cryptography
, fetchPypi
, ecdsa
# , eth-abi
, flatbuffers
, jinja2
, hkdf
, hyperlink
, mnemonic
, mock
, msgpack
, passlib
# , py-ecc
# , py-eth-sig-utils
, py-multihash
, py-ubjson
, pynacl
, pygobject3
, pyopenssl
, pyqrcode
, pytest-asyncio
, python-snappy
, pytestCheckHook
, pythonOlder
# , pytrie
, rlp
, service-identity
, spake2
, twisted
, py-ubjson
, txaio
, ujson
# , web3
# , wsaccel
# , xbr
, yapf
# , zlmdb
, zope_interface
}:
}@args:
buildPythonPackage rec {
pname = "autobahn";
@ -34,27 +58,18 @@ buildPythonPackage rec {
};
propagatedBuildInputs = [
argon2_cffi
cbor
cbor2
cffi
cryptography
flatbuffers
msgpack
passlib
py-ubjson
hyperlink
pynacl
twisted
txaio
ujson
zope_interface
];
checkInputs = [
mock
pytest-asyncio
pytestCheckHook
];
] ++ passthru.extras-require.scram
++ passthru.extras-require.serialization;
postPatch = ''
substituteInPlace setup.py \
@ -74,10 +89,23 @@ buildPythonPackage rec {
"autobahn"
];
passthru.extras-require = rec {
all = accelerate ++ compress ++ encryption ++ nvx ++ serialization ++ scram ++ twisted ++ ui ++ xbr;
accelerate = [ /* wsaccel */ ];
compress = [ python-snappy ];
encryption = [ pynacl pyopenssl pyqrcode /* pytrie */ service-identity ];
nvx = [ cffi ];
scram = [ argon2-cffi cffi passlib ];
serialization = [ cbor2 flatbuffers msgpack ujson py-ubjson ];
twisted = [ attrs args.twisted zope_interface ];
ui = [ pygobject3 ];
xbr = [ base58 cbor2 click ecdsa /* eth-abi */ jinja2 hkdf mnemonic /* py-ecc py-eth-sig-utils */ py-multihash rlp spake2 twisted /* web3 xbr */ yapf /* zlmdb */ ];
};
meta = with lib; {
description = "WebSocket and WAMP in Python for Twisted and asyncio";
homepage = "https://crossbar.io/autobahn";
license = licenses.mit;
maintainers = with maintainers; [ ];
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View file

@ -17,7 +17,7 @@
# tests
, aiosmtpd
, argon2_cffi
, argon2-cffi
, bcrypt
, docutils
, geoip2
@ -70,7 +70,7 @@ buildPythonPackage rec {
checkInputs = [
aiosmtpd
argon2_cffi
argon2-cffi
asgiref
bcrypt
docutils

View file

@ -32,7 +32,7 @@
, passlib
# tests
, argon2_cffi
, argon2-cffi
, flask-mongoengine
, mongoengine
, mongomock
@ -86,7 +86,7 @@ buildPythonPackage rec {
};
checkInputs = [
argon2_cffi
argon2-cffi
flask-mongoengine
mongoengine
mongomock

View file

@ -6,7 +6,7 @@
, pythonOlder
, pytestCheckHook
, pytest-tornasync
, argon2_cffi
, argon2-cffi
, jinja2
, tornado
, pyzmq
@ -44,7 +44,7 @@ buildPythonPackage rec {
];
propagatedBuildInputs = [
argon2_cffi
argon2-cffi
jinja2
tornado
pyzmq

View file

@ -2,7 +2,7 @@
, buildPythonPackage
, fetchPypi
, fetchpatch
, argon2_cffi
, argon2-cffi
, keyring
, pycryptodome
, pytestCheckHook
@ -32,7 +32,7 @@ buildPythonPackage rec {
];
propagatedBuildInputs = [
argon2_cffi
argon2-cffi
keyring
pycryptodome
];

View file

@ -1,4 +1,15 @@
{ lib, buildPythonPackage, fetchPypi, isPy27, six, attrs, twisted, pyopenssl, service-identity, autobahn, treq, mock, pytest }:
{ lib
, buildPythonPackage
, fetchPypi
, six
, attrs
, twisted
, pyopenssl
, service-identity
, autobahn
, treq
, mock
}:
buildPythonPackage rec {
version = "0.4.1";
@ -9,18 +20,27 @@ buildPythonPackage rec {
sha256 = "1af10592909caaf519c00e706eac842c5e77f8d4356215fe9c61c7b2258a88fb";
};
propagatedBuildInputs = [ six attrs twisted pyopenssl service-identity autobahn ];
propagatedBuildInputs = [
attrs
six
twisted
autobahn
] ++ autobahn.extras-require.twisted
++ twisted.extras-require.tls;
# zope.interface import issue
doCheck = !isPy27;
checkInputs = [ treq mock pytest ];
checkInputs = [
treq
mock
twisted
];
checkPhase = ''
pytest
trial -j$NIX_BUILD_CORES wormhole_mailbox_server
'';
meta = with lib; {
description = "Securely transfer data between computers";
homepage = "https://github.com/warner/magic-wormhole-mailbox-server";
license = licenses.mit;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View file

@ -1,4 +1,10 @@
{ lib, buildPythonPackage, fetchPypi, twisted, mock }:
{ lib
, buildPythonPackage
, fetchPypi
, autobahn
, mock
, twisted
}:
buildPythonPackage rec {
pname = "magic-wormhole-transit-relay";
@ -9,17 +15,18 @@ buildPythonPackage rec {
sha256 = "0ppsx2s1ysikns1h053x67z2zmficbn3y3kf52bzzslhd2s02j6b";
};
propagatedBuildInputs = [ twisted ];
propagatedBuildInputs = [ autobahn twisted ];
checkInputs = [ mock ];
checkInputs = [ mock twisted ];
checkPhase = ''
${twisted}/bin/trial wormhole_transit_relay
trial -j$NIX_BUILD_CORES wormhole_transit_relay
'';
meta = with lib; {
description = "Transit Relay server for Magic-Wormhole";
homepage = "https://github.com/warner/magic-wormhole-transit-relay";
homepage = "https://github.com/magic-wormhole/magic-wormhole-transit-relay";
license = licenses.mit;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View file

@ -1,7 +1,7 @@
{ lib, stdenv
{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, isPy27
, spake2
, pynacl
, six
@ -15,7 +15,6 @@
, humanize
, txtorcon
, nettools
, glibcLocales
, mock
, magic-wormhole-transit-relay
, magic-wormhole-mailbox-server
@ -30,9 +29,28 @@ buildPythonPackage rec {
sha256 = "0q41j99718y7m95zg1vaybnsp31lp6lhyqkbv4yqz5ys6jixh3qv";
};
buildInputs = [ glibcLocales ];
propagatedBuildInputs = [ spake2 pynacl six attrs twisted autobahn automat hkdf tqdm click humanize txtorcon ];
checkInputs = [ mock magic-wormhole-transit-relay magic-wormhole-mailbox-server ];
propagatedBuildInputs = [
spake2
pynacl
six
attrs
twisted
autobahn
automat
hkdf
tqdm
click
humanize
txtorcon
] ++ autobahn.extras-require.twisted
++ twisted.extras-require.tls;
checkInputs = [
mock
magic-wormhole-transit-relay
magic-wormhole-mailbox-server
twisted
];
postPatch = lib.optionalString stdenv.isLinux ''
sed -i -e "s|'ifconfig'|'${nettools}/bin/ifconfig'|" src/wormhole/ipaddrs.py
@ -42,9 +60,7 @@ buildPythonPackage rec {
install -Dm644 docs/wormhole.1 $out/share/man/man1/wormhole.1
'';
# zope.interface issue
doCheck = !isPy27;
preCheck = ''
checkPhase = ''
export PATH=$out/bin:$PATH
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
@ -52,16 +68,15 @@ buildPythonPackage rec {
--replace 'getProcessOutputAndValue("locale", ["-a"])' 'getProcessOutputAndValue("locale", ["-a"], env=os.environ)' \
--replace 'if (os.path.dirname(os.path.abspath(wormhole))' 'if not os.path.abspath(wormhole).startswith("/nix/store") and (os.path.dirname(os.path.abspath(wormhole))' \
--replace 'locale_env = dict(LC_ALL=locale, LANG=locale)' 'locale_env = dict(LC_ALL=locale, LANG=locale, LOCALE_ARCHIVE=os.getenv("LOCALE_ARCHIVE"))'
trial -j$NIX_BUILD_CORES wormhole
'';
meta = with lib; {
description = "Securely transfer data between computers";
homepage = "https://github.com/warner/magic-wormhole";
homepage = "https://github.com/magic-wormhole/magic-wormhole";
license = licenses.mit;
# Currently broken on Python 2.7. See
# https://github.com/NixOS/nixpkgs/issues/71826
broken = isPy27;
maintainers = with maintainers; [ asymmetric ];
maintainers = with maintainers; [ asymmetric SuperSandro2000 ];
mainProgram = "wormhole";
};
}

View file

@ -2,7 +2,7 @@
, lib
, buildPythonPackage
, fetchPypi
, argon2_cffi
, argon2-cffi
, nose
, nose_warnings_filters
, glibcLocales
@ -43,7 +43,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [
jinja2 tornado ipython_genutils traitlets jupyter_core send2trash
jupyter-client nbformat nbconvert ipykernel terminado requests pexpect
prometheus-client argon2_cffi
prometheus-client argon2-cffi
];
# disable warning_filters

View file

@ -1,7 +1,7 @@
{ lib
, buildPythonPackage
, fetchPypi
, argon2_cffi
, argon2-cffi
, bcrypt
, cryptography
, pytestCheckHook
@ -17,7 +17,7 @@ buildPythonPackage rec {
};
passthru.extras-require = {
argon2 = [ argon2_cffi ];
argon2 = [ argon2-cffi ];
bcrypt = [ bcrypt ];
totp = [ cryptography ];
};

View file

@ -1,6 +1,6 @@
{ lib, fetchFromGitHub, buildPythonPackage
, lxml, pycryptodomex, construct
, argon2_cffi, python-dateutil, future
, argon2-cffi, python-dateutil, future
, python
}:
@ -21,10 +21,10 @@ buildPythonPackage rec {
propagatedBuildInputs = [
lxml pycryptodomex construct
argon2_cffi python-dateutil future
argon2-cffi python-dateutil future
];
propagatedNativeBuildInputs = [ argon2_cffi ];
propagatedNativeBuildInputs = [ argon2-cffi ];
checkPhase = ''
${python.interpreter} -m unittest tests.tests

View file

@ -36,6 +36,7 @@ mapAliases ({
aioh2 = throw "aioh2 has been removed because it is abandoned and broken."; # Added 2022-03-30
ansible-base = throw "ansible-base has been removed, because it is end of life"; # added 2022-03-30
anyjson = throw "anyjson has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; # added 2022-01-18
argon2_cffi = argon2-cffi; # added 2022-05-09
asyncio-nats-client = nats-py; # added 2022-02-08
bitcoin-price-api = throw "bitcoin-price-api has been removed, it was using setuptools 2to3 translation feautre, which has been removed in setuptools 58"; # added 2022-02-15
blockdiagcontrib-cisco = throw "blockdiagcontrib-cisco is not compatible with blockdiag 2.0.0 and has been removed."; # added 2020-11-29

View file

@ -627,7 +627,7 @@ in {
argh = callPackage ../development/python-modules/argh { };
argon2_cffi = callPackage ../development/python-modules/argon2_cffi { };
argon2-cffi = callPackage ../development/python-modules/argon2-cffi { };
argon2-cffi-bindings = callPackage ../development/python-modules/argon2-cffi-bindings { };