Fix tests that are "hard coded" to expect x86_64 output by mocking the platform interface. Submitted upstream: https://github.com/pypa/packaging/pull/176 diff --git a/tests/test_tags.py b/tests/test_tags.py index 1eacf68..0a3f1b4 100644 --- a/tests/test_tags.py +++ b/tests/test_tags.py @@ -435,37 +435,43 @@ class TestManylinuxPlatform: linux_platform = list(tags._linux_platforms(is_32bit=False)) assert linux_platform == ["linux_x86_64"] - def test_linux_platforms_manylinux1(self, monkeypatch): + def test_linux_platforms_manylinux1(self, is_x86, monkeypatch): monkeypatch.setattr( tags, "_is_manylinux_compatible", lambda name, _: name == "manylinux1" ) - if platform.system() != "Linux": + if platform.system() != "Linux" or not is_x86: monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64") + monkeypatch.setattr(platform, "machine", lambda: "x86_64") platforms = list(tags._linux_platforms(is_32bit=False)) - assert platforms == ["manylinux1_x86_64", "linux_x86_64"] + arch = platform.machine() + assert platforms == ["manylinux1_" + arch, "linux_" + arch] - def test_linux_platforms_manylinux2010(self, monkeypatch): + def test_linux_platforms_manylinux2010(self, is_x86, monkeypatch): monkeypatch.setattr( tags, "_is_manylinux_compatible", lambda name, _: name == "manylinux2010" ) - if platform.system() != "Linux": + if platform.system() != "Linux" or not is_x86: monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64") + monkeypatch.setattr(platform, "machine", lambda: "x86_64") platforms = list(tags._linux_platforms(is_32bit=False)) - expected = ["manylinux2010_x86_64", "manylinux1_x86_64", "linux_x86_64"] + arch = platform.machine() + expected = ["manylinux2010_" + arch, "manylinux1_" + arch, "linux_" + arch] assert platforms == expected - def test_linux_platforms_manylinux2014(self, monkeypatch): + def test_linux_platforms_manylinux2014(self, is_x86, monkeypatch): monkeypatch.setattr( tags, "_is_manylinux_compatible", lambda name, _: name == "manylinux2014" ) - if platform.system() != "Linux": + if platform.system() != "Linux" or not is_x86: monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64") + monkeypatch.setattr(platform, "machine", lambda: "x86_64") platforms = list(tags._linux_platforms(is_32bit=False)) + arch = platform.machine() expected = [ - "manylinux2014_x86_64", - "manylinux2010_x86_64", - "manylinux1_x86_64", - "linux_x86_64", + "manylinux2014_" + arch, + "manylinux2010_" + arch, + "manylinux1_" + arch, + "linux_" + arch, ] assert platforms == expected Skip testConrec test in check phase. [native-inputs]: Replace catch2 with catch2-3. * gnu/packages/patches/rdkit-unbundle-external-dependencies.patch: Adjust patch. [supported-systems]: New field. Signed-off-by: Christopher Baines <mail@cbaines.net> David Elsing 2024-02-13gnu: freesasa: Fix memerr tests....* gnu/packages/chemistry.scm (freesasa)[arguments]: Add "CFLAGS=-fno-builtin-malloc" to #:configure-flags. Signed-off-by: Christopher Baines <mail@cbaines.net> David Elsing 2024-02-13gnu: avalon-toolkit: Update to 2.0.5a....The bug freeing static memory and the makefile have been improved upstream, so we don't have to work around them anymore. Now, two static libraries are built instead. * gnu/packages/chemistry.scm (avalon-toolkit): Update to 2.0.5a. [source]: Switch to git reference from GitHub. Adjust snippet. Add patch from the RDKit fork. [arguments]: Remove 'dont-free-static-memory phase. Use provided makefile. Adjust 'install phase. * gnu/packages/patches/avalon-toolkit-rdkit-fixes.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Christopher Baines <mail@cbaines.net> David Elsing 2024-02-13gnu: yaehmop: Update to 2023.03.1....* gnu/packages/chemistry.scm (yaehmop): Update to 2023.03.1. Signed-off-by: Christopher Baines <mail@cbaines.net> David Elsing 2024-02-13gnu: coordgenlibs: Update to 3.0.2....* gnu/packages/chemistry.scm (coordgenlibs): Update to 3.0.2. Signed-off-by: Christopher Baines <mail@cbaines.net> David Elsing 2024-02-13gnu: maeparser: Update to 1.3.1....* gnu/packages/chemistry.scm (maeparser): Update to 1.3.1. Signed-off-by: Christopher Baines <mail@cbaines.net> David Elsing 2024-02-13gnu: gemmi: Update to 0.6.4....* gnu/packages/chemistry.scm (gemmi): Update to 0.6.4. [arguments]: Adjust include/gemmi/sprintf.hpp -> src/sprintf.cpp. (freesasa)[arguments]: Link to gemmi_cpp explicitly. Signed-off-by: Christopher Baines <mail@cbaines.net> David Elsing 2024-01-09gnu: msgpack: Deprecate with msgpack-c....* gnu/packages/serialization.scm (msgpack-c): New variable. (msgpack-cxx): New variable. (msgpack): Rename to... (msgpack-3): ... this, and inherit from msgpack-c. * gnu/packages/vim.scm (eovim) [arguments]: Add help-cmake-find-msgpack-c phase. [inputs]: Replace msgpack with msgpack-c. * gnu/packages/terminals.scm (tmate) [inputs]: Replace msgpack with msgpack-3. * gnu/packages/networking.scm (opendht) [propagated-inputs]: Replace msgpack with msgpack-cxx. * gnu/packages/chemistry.scm (mmtf-cpp) [propagated-inputs]: Likewise. Maxim Cournoyer