From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pypiserver/, dev-python/pypiserver/files/
Date: Thu, 25 Apr 2024 12:52:02 +0000 (UTC) [thread overview]
Message-ID: <1714049517.b24c7f18c3dad6d4338397b7980f17ed475eaaa7.mgorny@gentoo> (raw)
commit: b24c7f18c3dad6d4338397b7980f17ed475eaaa7
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 25 12:47:59 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Apr 25 12:51:57 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b24c7f18
dev-python/pypiserver: Bump to 2.1.1
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/pypiserver/Manifest | 1 +
.../files/pypiserver-2.1.1-test-offline.patch | 33 +++++++++
dev-python/pypiserver/pypiserver-2.1.1.ebuild | 79 ++++++++++++++++++++++
3 files changed, 113 insertions(+)
diff --git a/dev-python/pypiserver/Manifest b/dev-python/pypiserver/Manifest
index 39fba150f6ba..7b90dece416f 100644
--- a/dev-python/pypiserver/Manifest
+++ b/dev-python/pypiserver/Manifest
@@ -1 +1,2 @@
DIST pypiserver-2.0.1.gh.tar.gz 156624 BLAKE2B b37700ffe0c7361289a3825dafd86041fab9ddf574d7792c7cd155f7e869a1bdd2de4e2a658c808afc7fe5ee8989876fcb7e85a8da74202c2c4c4344fbaf1df4 SHA512 962b34ea2bbca680fcf7ee8153ecea09c2f0c1bcebaaacee4666c93deab9d2508e08a22d82635a64d8aaec7cab3b5485e3752f1439006ed01b58539035f3b711
+DIST pypiserver-2.1.1.gh.tar.gz 157393 BLAKE2B e80c73b2422dc87bba09d8c9c2e1ffc72017ec58c5530d3debb95560b50a776e1603cb5641c7e4af1ed87d64750843ae025a6a47ab4cc28ce0de1051dd5b214f SHA512 d85afb0d2c85c76a62e393d7d7824e91ff052a04e985278db48010b6f71d12c7749139245e69932b78aefbf3152ba8a8b463bfcd21d1772d047d64f0b164681a
diff --git a/dev-python/pypiserver/files/pypiserver-2.1.1-test-offline.patch b/dev-python/pypiserver/files/pypiserver-2.1.1-test-offline.patch
new file mode 100644
index 000000000000..121677beb1b8
--- /dev/null
+++ b/dev-python/pypiserver/files/pypiserver-2.1.1-test-offline.patch
@@ -0,0 +1,33 @@
+From 749ad0f641ac14cc6e8485ed0b4fdf6aacb6f015 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 25 Apr 2024 14:44:16 +0200
+Subject: [PATCH] test: Fix running `build` in offline test environment
+
+Fix the `build` calls to use `--no-isolation`, in order to fix
+regression in running tests in an offline environment.
+
+Unlike the previous `setup.py` calls, `build` defaults to creating a new
+virtual environment to perform the build. This, in turn, requires
+fetching the build dependencies from the Internet, effectively making
+the tests error out in an offline environment. Passing `--no-isolation`
+makes `build` use the already-installed host dependencies instead.
+---
+ tests/test_server.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/tests/test_server.py b/tests/test_server.py
+index 92ecdda3..99da611c 100644
+--- a/tests/test_server.py
++++ b/tests/test_server.py
+@@ -148,7 +148,10 @@ def wheel_file(project, tmp_path_factory):
+ if re.match("^3\.7", sys.version):
+ assert run_setup_py(project, f"bdist_wheel -d {distdir}") == 0
+ else:
+- assert run_py_build(project, f"--wheel --outdir {distdir}") == 0
++ assert (
++ run_py_build(project, f"--wheel --no-isolation --outdir {distdir}")
++ == 0
++ )
+ wheels = list(distdir.glob("centodeps*.whl"))
+ assert len(wheels) > 0
+ return wheels[0]
diff --git a/dev-python/pypiserver/pypiserver-2.1.1.ebuild b/dev-python/pypiserver/pypiserver-2.1.1.ebuild
new file mode 100644
index 000000000000..fcd86c88d501
--- /dev/null
+++ b/dev-python/pypiserver/pypiserver-2.1.1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="Minimal PyPI server"
+HOMEPAGE="
+ https://github.com/pypiserver/pypiserver/
+ https://pypi.org/project/pypiserver/
+"
+SRC_URI="
+ https://github.com/pypiserver/pypiserver/archive/v${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ dev-python/bottle[${PYTHON_USEDEP}]
+ >=dev-python/packaging-23.2[${PYTHON_USEDEP}]
+ >=dev-python/pip-7[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep '
+ dev-python/importlib-resources[${PYTHON_USEDEP}]
+ ' 3.{10..11})
+"
+# NB: many test deps are optional/specific to tests we skip
+BDEPEND="
+ dev-python/setuptools-git[${PYTHON_USEDEP}]
+ test? (
+ >=dev-python/build-1.2.0[${PYTHON_USEDEP}]
+ >=dev-python/passlib-1.6[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/webtest[${PYTHON_USEDEP}]
+ )
+"
+
+DOCS=( CHANGES.rst README.md )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.5.0-unbundle-bottle.patch"
+ # https://github.com/pypiserver/pypiserver/pull/571
+ "${FILESDIR}/${P}-test-offline.patch"
+)
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ # remove bundled bottle (sic!)
+ rm pypiserver/bottle.py || die
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # Internet
+ tests/test_server.py::test_hash_algos
+ tests/test_server.py::test_pip_install_open_succeeds
+ tests/test_server.py::test_pip_install_authed_succeeds
+ # seems to rely on internal bottle details
+ tests/test_main.py::test_auto_servers
+ )
+
+ if ! has_version dev-python/twine; then
+ EPYTEST_DESELECT+=(
+ tests/test_server.py::test_twine_upload
+ tests/test_server.py::test_twine_register
+ )
+ fi
+
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest tests
+}
next reply other threads:[~2024-04-25 13:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-25 12:52 Michał Górny [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-12-14 10:57 [gentoo-commits] repo/gentoo:master commit in: dev-python/pypiserver/, dev-python/pypiserver/files/ Michał Górny
2024-11-24 3:28 Michał Górny
2022-05-24 6:16 Michał Górny
2019-11-22 3:15 Patrick McLean
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1714049517.b24c7f18c3dad6d4338397b7980f17ed475eaaa7.mgorny@gentoo \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox