Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python312Packages.{magic-wormhole-transit-relay: 0.2.1 -> 0.3.1, magic-wormhole: 0.16.0 -> 0.17.0} #351444

Merged
merged 2 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,27 @@
autobahn,
mock,
twisted,
pythonOlder,
pythonAtLeast,
python,
pytestCheckHook,
}:

buildPythonPackage rec {
pname = "magic-wormhole-transit-relay";
version = "0.2.1";
version = "0.3.1";
pyproject = true;

src = fetchPypi {
inherit pname version;
hash = "sha256-y0gBtGiQ6v+XKG4OP+xi0dUv/jF9FACDtjNqH7To+l4=";
hash = "sha256-LvLvvk008OYkhw+EIln9czuncVLtMQr0NJd0piiEkA4=";
};

postPatch = ''
# Passing the environment to twistd is necessary to preserve Python's site path.
substituteInPlace src/wormhole_transit_relay/test/test_backpressure.py --replace-fail \
'reactor.spawnProcess(proto, exe, args)' \
'reactor.spawnProcess(proto, exe, args, None)'
'';

build-system = [ setuptools ];

dependencies = [
Expand All @@ -39,13 +45,16 @@ buildPythonPackage rec {

__darwinAllowLocalNetworking = true;

postCheck = ''
# Avoid collision with twisted's plugin cache (#164775).
rm "$out/${python.sitePackages}/twisted/plugins/dropin.cache"
'';

meta = {
description = "Transit Relay server for Magic-Wormhole";
homepage = "https://github.com/magic-wormhole/magic-wormhole-transit-relay";
changelog = "https://github.com/magic-wormhole/magic-wormhole-transit-relay/blob/${version}/NEWS.md";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.mjoerg ];
# Python 3.12 support: https://github.com/magic-wormhole/magic-wormhole-transit-relay/issues/35
broken = pythonOlder "3.7" || pythonAtLeast "3.12";
};
}
24 changes: 15 additions & 9 deletions pkgs/development/python-modules/magic-wormhole/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
lib,
stdenv,
buildPythonPackage,
fetchPypi,
fetchFromGitHub,

# build-system
setuptools,
Expand Down Expand Up @@ -36,12 +36,14 @@

buildPythonPackage rec {
pname = "magic-wormhole";
version = "0.16.0";
version = "0.17.0";
pyproject = true;

src = fetchPypi {
inherit pname version;
hash = "sha256-FObBRomNvaem0ZAmJiOmlBmVU2Pn5DTWSq0tIz1tlMk=";
src = fetchFromGitHub {
owner = "magic-wormhole";
repo = "magic-wormhole";
rev = "refs/tags/${version}";
hash = "sha256-BxPF4iQ91wLBagdvQ/Y89VIZBkMxFiEHnK+BU55Bwr4=";
};

postPatch =
Expand Down Expand Up @@ -81,8 +83,12 @@ buildPythonPackage rec {
nativeCheckInputs =
# For Python 3.12, remove magic-wormhole-mailbox-server and magic-wormhole-transit-relay from test dependencies,
# which are not yet supported with this version.
lib.optionals (!magic-wormhole-mailbox-server.meta.broken) [ magic-wormhole-mailbox-server ]
++ lib.optionals (!magic-wormhole-transit-relay.meta.broken) [ magic-wormhole-transit-relay ]
lib.optionals
(!magic-wormhole-mailbox-server.meta.broken && !magic-wormhole-transit-relay.meta.broken)
[
magic-wormhole-mailbox-server
magic-wormhole-transit-relay
]
++ [
mock
pytestCheckHook
Expand All @@ -101,10 +107,10 @@ buildPythonPackage rec {
"src/wormhole/test/dilate/test_full.py"
"src/wormhole/test/test_args.py"
"src/wormhole/test/test_cli.py"
"src/wormhole/test/test_transit.py"
"src/wormhole/test/test_wormhole.py"
"src/wormhole/test/test_xfer_util.py"
]
++ lib.optionals magic-wormhole-transit-relay.meta.broken [ "src/wormhole/test/test_transit.py" ];
];

postInstall = ''
install -Dm644 docs/wormhole.1 $out/share/man/man1/wormhole.1
Expand Down