summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-03-18 16:19:15 +0100
committerMichał Górny <mgorny@gentoo.org>2023-03-21 06:33:50 +0100
commitf36f134cbeb012ce50449f8089e9a46fa9e03c64 (patch)
tree53f98272880b05fd208a0dc6e19046b1699e8e7b /eclass/tests
parentdev-util/scons: Revert "Backport MergeFlags fix to 4.5.1" (diff)
downloadgentoo-f36f134cbeb012ce50449f8089e9a46fa9e03c64.tar.gz
gentoo-f36f134cbeb012ce50449f8089e9a46fa9e03c64.tar.bz2
gentoo-f36f134cbeb012ce50449f8089e9a46fa9e03c64.zip
pypi.eclass: Introduce PYPI_PN to override the default project name
Introduce a convenience PYPI_PN variable that can be used to override the default project name. This is meant to be used primarily when upstream project name does not conform to Gentoo package naming rules, e.g. contains dots or uppercase letters. For example, instead of: SRC_URI="$(pypi_sdist_url --no-normalize "${PN/-/.}")" S=${WORKDIR}/${P/-/.} one can now specify: PYPI_NO_NORMALIZE=1 PYPI_PN=${PN/-/.} For PEP 625-conformant packages, instead of: SRC_URI="$(pypi_sdist_url "${PN/-/.}")" one can use: PYPI_PN=${PN/-/.} There's not much gain space-wise but it avoids having to specify the name twice. This can particularly be helpful for package names using PascalCase. Closes: https://github.com/gentoo/gentoo/pull/30210 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/tests')
-rwxr-xr-xeclass/tests/pypi.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/eclass/tests/pypi.sh b/eclass/tests/pypi.sh
index ebfcdb630856..471ac048b18a 100755
--- a/eclass/tests/pypi.sh
+++ b/eclass/tests/pypi.sh
@@ -5,7 +5,8 @@
EAPI=8
source tests-common.sh || exit
-PN=Foo.Bar
+PN=foo-bar
+PYPI_PN=Foo.Bar
PV=1.2.3_beta2
WORKDIR='<WORKDIR>'