python311Packages.magic-wormhole-mailbox-server: add setuptools as dependency

pkg_resources from setuptools is referenced at runtime.
Use meta.broken instead of disabled in order to make magic-wormhole usable with Python 3.12.
This commit is contained in:
Martin Joerg
2024-07-09 22:22:55 +00:00
committed by Florian Brandes
parent 3c16f105d5
commit bc8b99044c

View File

@@ -21,9 +21,6 @@ buildPythonPackage rec {
version = "0.4.1"; version = "0.4.1";
pyproject = true; pyproject = true;
# python 3.12 support: https://github.com/magic-wormhole/magic-wormhole-mailbox-server/issues/41
disabled = pythonOlder "3.7" || pythonAtLeast "3.12";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
hash = "sha256-GvEFkpCcqvUZwA5wbqyELF53+NQ1YhX+nGHHsiWKiPs="; hash = "sha256-GvEFkpCcqvUZwA5wbqyELF53+NQ1YhX+nGHHsiWKiPs=";
@@ -38,13 +35,14 @@ buildPythonPackage rec {
}) })
]; ];
nativeBuildInputs = [ setuptools ]; build-system = [ setuptools ];
propagatedBuildInputs = [ dependencies = [
attrs attrs
autobahn
setuptools # pkg_resources is referenced at runtime
six six
twisted twisted
autobahn
] ++ autobahn.optional-dependencies.twisted ++ twisted.optional-dependencies.tls; ] ++ autobahn.optional-dependencies.twisted ++ twisted.optional-dependencies.tls;
pythonImportsCheck = [ "wormhole_mailbox_server" ]; pythonImportsCheck = [ "wormhole_mailbox_server" ];
@@ -66,5 +64,7 @@ buildPythonPackage rec {
changelog = "https://github.com/magic-wormhole/magic-wormhole-mailbox-server/blob/${version}/NEWS.md"; changelog = "https://github.com/magic-wormhole/magic-wormhole-mailbox-server/blob/${version}/NEWS.md";
license = lib.licenses.mit; license = lib.licenses.mit;
maintainers = [ lib.maintainers.mjoerg ]; maintainers = [ lib.maintainers.mjoerg ];
# Python 3.12 support: https://github.com/magic-wormhole/magic-wormhole-mailbox-server/issues/41
broken = pythonOlder "3.7" || pythonAtLeast "3.12";
}; };
} }