diff options
Diffstat (limited to 'testdata')
5 files changed, 144 insertions, 81 deletions
diff --git a/testdata/data/repos/python/PythonFetchableCheck/PythonInlinePyPIURI/expected.json b/testdata/data/repos/python/PythonFetchableCheck/PythonInlinePyPIURI/expected.json index e8c01812..45757750 100644 --- a/testdata/data/repos/python/PythonFetchableCheck/PythonInlinePyPIURI/expected.json +++ b/testdata/data/repos/python/PythonFetchableCheck/PythonInlinePyPIURI/expected.json @@ -1,20 +1,22 @@ -{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "0", "url": "https://files.pythonhosted.org/packages/source/P/PythonInlinePyPIURL/PythonInlinePyPIURL-0.zip", "replacement": ["pypi_sdist_url", "--no-normalize", "\"${PN}\"", "\"${PV}\"", ".zip"], "normalize": null, "append": null} -{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "1_alpha1", "url": "https://files.pythonhosted.org/packages/source/P/PythonInlinePyPIURL/PythonInlinePyPIURL-1a1.tar.gz", "replacement": null, "normalize": false, "append": false} -{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "1_alpha1-r1", "url": "https://files.pythonhosted.org/packages/source/P/PythonInlinePyPIURL/PythonInlinePyPIURL-1a1.tar.gz", "replacement": null, "normalize": false, "append": true} -{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "2_p4", "url": "https://files.pythonhosted.org/packages/source/P/PythonInlinePyPIURL/pythoninlinepypiurl-2.post4.tar.gz", "replacement": null, "normalize": true, "append": false} -{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "2_p4-r1", "url": "https://files.pythonhosted.org/packages/source/P/PythonInlinePyPIURL/pythoninlinepypiurl-2.post4.tar.gz", "replacement": null, "normalize": true, "append": true} -{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "3", "url": "https://files.pythonhosted.org/packages/py3/p/pypi-url/pypi_url-3-py3-none-any.whl", "replacement": ["pypi_wheel_url", "--unpack", "pypi-url"], "normalize": null, "append": null} -{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "3", "url": "https://files.pythonhosted.org/packages/source/p/pypi-url/pypi-url-3.zip", "replacement": ["pypi_sdist_url", "--no-normalize", "pypi-url", "\"${PV}\"", ".zip"], "normalize": null, "append": null} -{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "3-r1", "url": "https://files.pythonhosted.org/packages/py3/p/pypi-url/pypi_url-3-py3-none-any.whl", "replacement": ["pypi_wheel_url", "pypi-url"], "normalize": null, "append": null} -{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "3-r1", "url": "https://files.pythonhosted.org/packages/source/p/pypi-url/pypi-url-3.tar.gz", "replacement": ["pypi_sdist_url", "--no-normalize", "pypi-url"], "normalize": null, "append": null} -{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "4", "url": "https://files.pythonhosted.org/packages/cp310/P/PythonInlinePyPIURL/pythoninlinepypiurl-4-cp310-cp310-linux_x86_64.whl", "replacement": ["pypi_wheel_url", "\"${PN}\"", "\"${PV}\"", "cp310", "cp310-linux_x86_64"], "normalize": null, "append": null} -{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "4", "url": "https://files.pythonhosted.org/packages/source/p/pypi-url/pypi_url-4.tar.gz", "replacement": ["pypi_sdist_url", "pypi-url"], "normalize": null, "append": null} -{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "0", "url": "https://files.pythonhosted.org/packages/source/p/python.inline-pypi-url/python.inline-pypi-url-0.tar.gz", "replacement": ["pypi_sdist_url", "--no-normalize", "\"${PN/-/.}\""], "normalize": null, "append": null} -{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "1", "url": "https://files.pythonhosted.org/packages/source/p/python.inline.pypi.url/python.inline.pypi.url-1.tar.gz", "replacement": ["pypi_sdist_url", "--no-normalize", "\"${PN//-/.}\""], "normalize": null, "append": null} -{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "100", "url": "https://files.pythonhosted.org/packages/source/p/python_inline-pypi-url/python_inline-pypi-url-100.tar.gz", "replacement": ["pypi_sdist_url", "--no-normalize", "\"${PN/-/_}\""], "normalize": null, "append": null} -{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "200", "url": "https://files.pythonhosted.org/packages/source/P/Python-inline-pypi-url/Python-inline-pypi-url-200.tar.gz", "replacement": ["pypi_sdist_url", "--no-normalize", "\"${PN^}\""], "normalize": null, "append": null} -{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "1000", "url": "https://files.pythonhosted.org/packages/source/p/python.inline-pypi-url/python_inline_pypi_url-1000.tar.gz", "replacement": ["pypi_sdist_url", "\"${PN/-/.}\""], "normalize": null, "append": null} -{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "1000-r1", "url": "https://files.pythonhosted.org/packages/source/p/python.inline.pypi.url/python_inline_pypi_url-1000.tar.gz", "replacement": ["pypi_sdist_url", "\"${PN//-/.}\""], "normalize": null, "append": null} -{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "1000-r100", "url": "https://files.pythonhosted.org/packages/source/p/python_inline-pypi-url/python_inline_pypi_url-1000.tar.gz", "replacement": ["pypi_sdist_url", "\"${PN/-/_}\""], "normalize": null, "append": null} -{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "1000-r101", "url": "https://files.pythonhosted.org/packages/source/p/python_inline_pypi_url/python_inline_pypi_url-1000.tar.gz", "replacement": ["pypi_sdist_url", "\"${PN//-/_}\""], "normalize": null, "append": null} -{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "1000-r200", "url": "https://files.pythonhosted.org/packages/source/P/Python-inline-pypi-url/python_inline_pypi_url-1000.tar.gz", "replacement": ["pypi_sdist_url", "\"${PN^}\""], "normalize": null, "append": null} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "0", "url": "https://files.pythonhosted.org/packages/source/P/PythonInlinePyPIURL/PythonInlinePyPIURL-0.zip", "replacement": ["pypi_sdist_url", "--no-normalize", "\"${PN}\"", "\"${PV}\"", ".zip"], "normalize": null, "append": null, "pypi_pn": null} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "1_alpha1", "url": "https://files.pythonhosted.org/packages/source/P/PythonInlinePyPIURL/PythonInlinePyPIURL-1a1.tar.gz", "replacement": null, "normalize": false, "append": false, "pypi_pn": null} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "1_alpha1-r1", "url": "https://files.pythonhosted.org/packages/source/P/PythonInlinePyPIURL/PythonInlinePyPIURL-1a1.tar.gz", "replacement": null, "normalize": false, "append": true, "pypi_pn": null} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "2_p4", "url": "https://files.pythonhosted.org/packages/source/P/PythonInlinePyPIURL/pythoninlinepypiurl-2.post4.tar.gz", "replacement": null, "normalize": true, "append": false, "pypi_pn": null} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "2_p4-r1", "url": "https://files.pythonhosted.org/packages/source/P/PythonInlinePyPIURL/pythoninlinepypiurl-2.post4.tar.gz", "replacement": null, "normalize": true, "append": true, "pypi_pn": null} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "3", "url": "https://files.pythonhosted.org/packages/py3/p/pypi-url/pypi_url-3-py3-none-any.whl", "replacement": ["pypi_wheel_url", "--unpack", "pypi-url"], "normalize": null, "append": null, "pypi_pn": null} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "3", "url": "https://files.pythonhosted.org/packages/source/p/pypi-url/pypi-url-3.zip", "replacement": ["pypi_sdist_url", "--no-normalize", "pypi-url", "\"${PV}\"", ".zip"], "normalize": null, "append": null, "pypi_pn": null} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "3-r1", "url": "https://files.pythonhosted.org/packages/py3/p/pypi-url/pypi_url-3-py3-none-any.whl", "replacement": ["pypi_wheel_url", "pypi-url"], "normalize": null, "append": null, "pypi_pn": null} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "3-r1", "url": "https://files.pythonhosted.org/packages/source/p/pypi-url/pypi-url-3.tar.gz", "replacement": ["pypi_sdist_url", "--no-normalize", "pypi-url"], "normalize": null, "append": null, "pypi_pn": null} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "4", "url": "https://files.pythonhosted.org/packages/cp310/P/PythonInlinePyPIURL/pythoninlinepypiurl-4-cp310-cp310-linux_x86_64.whl", "replacement": ["pypi_wheel_url", "\"${PN}\"", "\"${PV}\"", "cp310", "cp310-linux_x86_64"], "normalize": null, "append": null, "pypi_pn": null} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "PythonInlinePyPIURL", "version": "4", "url": "https://files.pythonhosted.org/packages/source/p/pypi-url/pypi_url-4.tar.gz", "replacement": ["pypi_sdist_url", "pypi-url"], "normalize": null, "append": null, "pypi_pn": null} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "0", "url": "https://files.pythonhosted.org/packages/source/p/python.inline-pypi-url/python.inline-pypi-url-0.tar.gz", "replacement": null, "normalize": false, "append": false, "pypi_pn": "\"${PN/-/.}\""} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "1", "url": "https://files.pythonhosted.org/packages/source/p/python.inline.pypi.url/python.inline.pypi.url-1.tar.gz", "replacement": null, "normalize": false, "append": false, "pypi_pn": "\"${PN//-/.}\""} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "100", "url": "https://files.pythonhosted.org/packages/source/p/python_inline-pypi-url/python_inline-pypi-url-100.tar.gz", "replacement": null, "normalize": false, "append": false, "pypi_pn": "\"${PN/-/_}\""} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "200", "url": "https://files.pythonhosted.org/packages/source/P/Python-inline-pypi-url/Python-inline-pypi-url-200.tar.gz", "replacement": null, "normalize": false, "append": false, "pypi_pn": "\"${PN^}\""} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "1000", "url": "https://files.pythonhosted.org/packages/source/p/python.inline-pypi-url/python_inline_pypi_url-1000.tar.gz", "replacement": null, "normalize": true, "append": false, "pypi_pn": "\"${PN/-/.}\""} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "1000-r1", "url": "https://files.pythonhosted.org/packages/source/p/python.inline.pypi.url/python_inline_pypi_url-1000.tar.gz", "replacement": null, "normalize": true, "append": false, "pypi_pn": "\"${PN//-/.}\""} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "1000-r100", "url": "https://files.pythonhosted.org/packages/source/p/python_inline-pypi-url/python_inline_pypi_url-1000.tar.gz", "replacement": null, "normalize": true, "append": false, "pypi_pn": "\"${PN/-/_}\""} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "1000-r101", "url": "https://files.pythonhosted.org/packages/source/p/python_inline_pypi_url/python_inline_pypi_url-1000.tar.gz", "replacement": null, "normalize": true, "append": false, "pypi_pn": "\"${PN//-/_}\""} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "1000-r200", "url": "https://files.pythonhosted.org/packages/source/P/Python-inline-pypi-url/python_inline_pypi_url-1000.tar.gz", "replacement": null, "normalize": true, "append": false, "pypi_pn": "\"${PN^}\""} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "2000", "url": "https://files.pythonhosted.org/packages/source/p/python.inline-pypi-url/python_inline_pypi_url-2000.tar.gz", "replacement": ["pypi_sdist_url", "\"${PN/-/.}\""], "normalize": null, "append": null, "pypi_pn": null} +{"__class__": "PythonInlinePyPIURI", "category": "PythonFetchableCheck", "package": "python-inline-pypi-url", "version": "2000", "url": "https://files.pythonhosted.org/packages/source/p/python.inline-pypi-url_vectors/python.inline-pypi-url_vectors-151.tar.gz", "replacement": ["pypi_sdist_url", "--no-normalize", "python.inline-pypi-url_vectors", "151"], "normalize": null, "append": null, "pypi_pn": null} diff --git a/testdata/data/repos/python/PythonFetchableCheck/PythonInlinePyPIURI/fix.patch b/testdata/data/repos/python/PythonFetchableCheck/PythonInlinePyPIURI/fix.patch index e30ff89e..28e27b9e 100644 --- a/testdata/data/repos/python/PythonFetchableCheck/PythonInlinePyPIURI/fix.patch +++ b/testdata/data/repos/python/PythonFetchableCheck/PythonInlinePyPIURI/fix.patch @@ -1,155 +1,194 @@ diff -Naur python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-0.ebuild fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-0.ebuild ---- python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-0.ebuild 2023-02-13 18:02:07.141313182 +0100 -+++ fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-0.ebuild 2023-02-13 18:16:47.391898323 +0100 -@@ -3,9 +3,11 @@ +--- python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-0.ebuild 2023-03-02 17:59:30.071679391 +0100 ++++ fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-0.ebuild 2023-03-21 17:27:31.612748202 +0100 +@@ -3,10 +3,13 @@ EAPI=8 ++PYPI_NO_NORMALIZE=1 ++PYPI_PN=${PN/-/.} ++ +inherit pypi + DESCRIPTION="Ebuild with PyPI URL" HOMEPAGE="https://example.com" -SRC_URI="mirror://pypi/${PN::1}/${PN/-/.}/${P/-/.}.tar.gz" -+SRC_URI="$(pypi_sdist_url --no-normalize "${PN/-/.}")" - S=${WORKDIR}/${P/-/.} +-S=${WORKDIR}/${P/-/.} LICENSE="BSD" + SLOT="0" diff -Naur python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000.ebuild fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000.ebuild ---- python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000.ebuild 2023-02-13 18:02:37.101867819 +0100 -+++ fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000.ebuild 2023-02-13 18:16:52.222022177 +0100 -@@ -3,10 +3,11 @@ +--- python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000.ebuild 2023-03-02 17:59:30.071679391 +0100 ++++ fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000.ebuild 2023-03-21 17:28:15.590371586 +0100 +@@ -3,10 +3,12 @@ EAPI=8 ++PYPI_PN=${PN/-/.} ++ +inherit pypi + DESCRIPTION="Ebuild with PyPI URL" HOMEPAGE="https://example.com" -SRC_URI="mirror://pypi/${PN::1}/${PN/-/.}/${PN//-/_}-${PV}.tar.gz" -S=${WORKDIR}/${PN//-/_}-${PV} -+SRC_URI="$(pypi_sdist_url "${PN/-/.}")" LICENSE="BSD" SLOT="0" diff -Naur python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r100.ebuild fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r100.ebuild ---- python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r100.ebuild 2023-02-13 18:05:32.871560794 +0100 -+++ fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r100.ebuild 2023-02-13 18:16:55.365435891 +0100 -@@ -3,10 +3,11 @@ +--- python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r100.ebuild 2023-03-02 17:59:30.071679391 +0100 ++++ fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r100.ebuild 2023-03-21 17:28:22.750527209 +0100 +@@ -3,10 +3,12 @@ EAPI=8 ++PYPI_PN=${PN/-/_} ++ +inherit pypi + DESCRIPTION="Ebuild with PyPI URL" HOMEPAGE="https://example.com" -SRC_URI="mirror://pypi/${PN::1}/${PN/-/_}/${PN//-/_}-${PV}.tar.gz" -S=${WORKDIR}/${PN//-/_}-${PV} -+SRC_URI="$(pypi_sdist_url "${PN/-/_}")" LICENSE="BSD" SLOT="0" diff -Naur python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r101.ebuild fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r101.ebuild ---- python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r101.ebuild 2023-02-13 18:05:45.775104791 +0100 -+++ fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r101.ebuild 2023-02-13 18:16:57.982169331 +0100 -@@ -3,10 +3,11 @@ +--- python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r101.ebuild 2023-03-02 17:59:30.071679391 +0100 ++++ fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r101.ebuild 2023-03-21 17:28:29.327336791 +0100 +@@ -3,10 +3,12 @@ EAPI=8 ++PYPI_PN=${PN//-/_} ++ +inherit pypi + DESCRIPTION="Ebuild with PyPI URL" HOMEPAGE="https://example.com" -SRC_URI="mirror://pypi/${PN::1}/${PN//-/_}/${PN//-/_}-${PV}.tar.gz" -S=${WORKDIR}/${PN//-/_}-${PV} -+SRC_URI="$(pypi_sdist_url "${PN//-/_}")" LICENSE="BSD" SLOT="0" diff -Naur python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r1.ebuild fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r1.ebuild ---- python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r1.ebuild 2023-02-13 18:04:32.533891351 +0100 -+++ fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r1.ebuild 2023-02-13 18:17:01.165583737 +0100 -@@ -3,10 +3,11 @@ +--- python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r1.ebuild 2023-03-02 17:59:30.071679391 +0100 ++++ fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r1.ebuild 2023-03-21 17:28:35.514137872 +0100 +@@ -3,10 +3,12 @@ EAPI=8 ++PYPI_PN=${PN//-/.} ++ +inherit pypi + DESCRIPTION="Ebuild with PyPI URL" HOMEPAGE="https://example.com" -SRC_URI="mirror://pypi/${PN::1}/${PN//-/.}/${PN//-/_}-${PV}.tar.gz" -S=${WORKDIR}/${PN//-/_}-${PV} -+SRC_URI="$(pypi_sdist_url "${PN//-/.}")" LICENSE="BSD" SLOT="0" diff -Naur python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r200.ebuild fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r200.ebuild ---- python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r200.ebuild 2023-02-13 18:06:26.842434235 +0100 -+++ fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r200.ebuild 2023-02-13 18:17:04.392332387 +0100 -@@ -3,10 +3,11 @@ +--- python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r200.ebuild 2023-03-02 17:59:30.071679391 +0100 ++++ fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1000-r200.ebuild 2023-03-21 17:28:42.704294057 +0100 +@@ -3,10 +3,12 @@ EAPI=8 ++PYPI_PN=${PN^} ++ +inherit pypi + DESCRIPTION="Ebuild with PyPI URL" HOMEPAGE="https://example.com" -SRC_URI="mirror://pypi/P/${PN^}/${PN//-/_}-${PV}.tar.gz" -S=${WORKDIR}/${PN//-/_}-${PV} -+SRC_URI="$(pypi_sdist_url "${PN^}")" LICENSE="BSD" SLOT="0" diff -Naur python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-100.ebuild fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-100.ebuild ---- python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-100.ebuild 2023-02-13 18:10:56.409921917 +0100 -+++ fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-100.ebuild 2023-02-13 18:17:19.662717926 +0100 -@@ -3,9 +3,11 @@ +--- python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-100.ebuild 2023-03-02 17:59:30.071679391 +0100 ++++ fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-100.ebuild 2023-03-21 17:28:57.301277709 +0100 +@@ -3,10 +3,12 @@ EAPI=8 ++PYPI_PN=${PN/-/_} ++ +inherit pypi + DESCRIPTION="Ebuild with PyPI URL" HOMEPAGE="https://example.com" -SRC_URI="mirror://pypi/${PN::1}/${PN/-/_}/${P/-/_}.tar.gz" -+SRC_URI="$(pypi_sdist_url --no-normalize "${PN/-/_}")" - S=${WORKDIR}/${P/-/_} +-S=${WORKDIR}/${P/-/_} LICENSE="BSD" + SLOT="0" diff -Naur python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1.ebuild fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1.ebuild ---- python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1.ebuild 2023-02-13 18:10:03.499125550 +0100 -+++ fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1.ebuild 2023-02-13 18:17:19.666051344 +0100 -@@ -3,9 +3,11 @@ +--- python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1.ebuild 2023-03-02 17:59:30.071679391 +0100 ++++ fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-1.ebuild 2023-03-21 17:27:53.069881865 +0100 +@@ -3,10 +3,13 @@ EAPI=8 ++PYPI_NO_NORMALIZE=1 ++PYPI_PN=${PN//-/.} ++ +inherit pypi + DESCRIPTION="Ebuild with PyPI URL" HOMEPAGE="https://example.com" -SRC_URI="mirror://pypi/${PN::1}/${PN//-/.}/${PN//-/.}-${PV}.tar.gz" -+SRC_URI="$(pypi_sdist_url --no-normalize "${PN//-/.}")" - S=${WORKDIR}/${PN//-/.}-${PV} +-S=${WORKDIR}/${PN//-/.}-${PV} + + LICENSE="BSD" + SLOT="0" +diff -Naur python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-2000.ebuild fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-2000.ebuild +--- python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-2000.ebuild 2023-03-21 17:20:27.603389499 +0100 ++++ fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-2000.ebuild 2023-03-21 17:30:27.623252678 +0100 +@@ -3,13 +3,15 @@ + + EAPI=8 + ++PYPI_PN=${PN/-/.} ++ ++inherit pypi ++ + DESCRIPTION="Ebuild with two PyPI URLs" + HOMEPAGE="https://example.com" +-SRC_URI=" +- mirror://pypi/${PN::1}/${PN/-/.}/${PN//-/_}-${PV}.tar.gz +- mirror://pypi/${PN::1}/${PN/-/.}_vectors/${PN/-/.}_vectors-151.tar.gz ++SRC_URI+=" ++ $(pypi_sdist_url --no-normalize python.inline-pypi-url_vectors 151) + " +-S=${WORKDIR}/${PN//-/_}-${PV} LICENSE="BSD" + SLOT="0" diff -Naur python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-200.ebuild fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-200.ebuild ---- python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-200.ebuild 2023-02-13 18:12:05.330950479 +0100 -+++ fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-200.ebuild 2023-02-13 18:17:19.666051344 +0100 -@@ -3,9 +3,11 @@ +--- python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-200.ebuild 2023-03-02 17:59:30.071679391 +0100 ++++ fixed/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-200.ebuild 2023-03-21 17:28:06.286835989 +0100 +@@ -3,10 +3,13 @@ EAPI=8 ++PYPI_NO_NORMALIZE=1 ++PYPI_PN=${PN^} ++ +inherit pypi + DESCRIPTION="Ebuild with PyPI URL" HOMEPAGE="https://example.com" -SRC_URI="mirror://pypi/P/${PN^}/${P^}.tar.gz" -+SRC_URI="$(pypi_sdist_url --no-normalize "${PN^}")" - S=${WORKDIR}/${P^} +-S=${WORKDIR}/${P^} LICENSE="BSD" + SLOT="0" diff -Naur python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-0.ebuild fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-0.ebuild ---- python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-0.ebuild 2023-02-13 13:53:39.474144315 +0100 -+++ fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-0.ebuild 2023-02-13 18:13:52.757100032 +0100 +--- python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-0.ebuild 2023-03-02 17:59:30.068345977 +0100 ++++ fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-0.ebuild 2023-03-21 17:26:48.258469809 +0100 @@ -3,9 +3,11 @@ EAPI=8 @@ -164,8 +203,8 @@ diff -Naur python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-0 LICENSE="BSD" SLOT="0" diff -Naur python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-1_alpha1.ebuild fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-1_alpha1.ebuild ---- python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-1_alpha1.ebuild 2023-02-13 13:45:21.784711215 +0100 -+++ fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-1_alpha1.ebuild 2023-02-13 18:13:52.757100032 +0100 +--- python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-1_alpha1.ebuild 2023-03-02 17:59:30.068345977 +0100 ++++ fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-1_alpha1.ebuild 2023-03-21 17:26:48.258469809 +0100 @@ -3,11 +3,11 @@ EAPI=8 @@ -182,8 +221,8 @@ diff -Naur python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-1 LICENSE="BSD" SLOT="0" diff -Naur python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-1_alpha1-r1.ebuild fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-1_alpha1-r1.ebuild ---- python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-1_alpha1-r1.ebuild 2023-02-13 13:45:46.604987058 +0100 -+++ fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-1_alpha1-r1.ebuild 2023-02-13 18:13:52.757100032 +0100 +--- python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-1_alpha1-r1.ebuild 2023-03-02 17:59:30.068345977 +0100 ++++ fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-1_alpha1-r1.ebuild 2023-03-21 17:26:48.258469809 +0100 @@ -3,14 +3,14 @@ EAPI=8 @@ -204,8 +243,8 @@ diff -Naur python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-1 LICENSE="BSD" SLOT="0" diff -Naur python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2_p4.ebuild fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2_p4.ebuild ---- python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2_p4.ebuild 2023-02-13 13:46:34.949608190 +0100 -+++ fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2_p4.ebuild 2023-02-13 18:13:52.757100032 +0100 +--- python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2_p4.ebuild 2023-03-02 17:59:30.068345977 +0100 ++++ fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2_p4.ebuild 2023-03-21 17:26:48.258469809 +0100 @@ -3,11 +3,10 @@ EAPI=8 @@ -221,8 +260,8 @@ diff -Naur python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2 LICENSE="BSD" SLOT="0" diff -Naur python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2_p4-r1.ebuild fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2_p4-r1.ebuild ---- python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2_p4-r1.ebuild 2023-02-13 13:46:34.949608190 +0100 -+++ fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2_p4-r1.ebuild 2023-02-13 18:13:52.757100032 +0100 +--- python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2_p4-r1.ebuild 2023-03-02 17:59:30.068345977 +0100 ++++ fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2_p4-r1.ebuild 2023-03-21 17:26:48.258469809 +0100 @@ -3,14 +3,13 @@ EAPI=8 @@ -242,8 +281,8 @@ diff -Naur python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-2 LICENSE="BSD" SLOT="0" diff -Naur python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-3.ebuild fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-3.ebuild ---- python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-3.ebuild 2023-02-13 15:30:06.802489789 +0100 -+++ fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-3.ebuild 2023-02-13 18:13:52.757100032 +0100 +--- python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-3.ebuild 2023-03-02 17:59:30.071679391 +0100 ++++ fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-3.ebuild 2023-03-21 17:26:48.258469809 +0100 @@ -3,13 +3,14 @@ EAPI=8 @@ -263,8 +302,8 @@ diff -Naur python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-3 S=${WORKDIR}/${MY_P} diff -Naur python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-3-r1.ebuild fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-3-r1.ebuild ---- python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-3-r1.ebuild 2023-02-13 15:24:31.819467907 +0100 -+++ fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-3-r1.ebuild 2023-02-13 18:13:52.757100032 +0100 +--- python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-3-r1.ebuild 2023-03-02 17:59:30.071679391 +0100 ++++ fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-3-r1.ebuild 2023-03-21 17:26:48.258469809 +0100 @@ -3,12 +3,14 @@ EAPI=8 @@ -283,8 +322,8 @@ diff -Naur python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-3 S=${WORKDIR}/${MY_P} diff -Naur python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-4.ebuild fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-4.ebuild ---- python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-4.ebuild 2023-02-13 15:30:54.598707954 +0100 -+++ fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-4.ebuild 2023-02-13 18:13:52.757100032 +0100 +--- python/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-4.ebuild 2023-03-02 17:59:30.071679391 +0100 ++++ fixed/PythonFetchableCheck/PythonInlinePyPIURL/PythonInlinePyPIURL-4.ebuild 2023-03-21 17:26:48.258469809 +0100 @@ -3,12 +3,14 @@ EAPI=8 diff --git a/testdata/repos/python/PythonFetchableCheck/python-inline-pypi-url/Manifest b/testdata/repos/python/PythonFetchableCheck/python-inline-pypi-url/Manifest index d541566b..b9341b16 100644 --- a/testdata/repos/python/PythonFetchableCheck/python-inline-pypi-url/Manifest +++ b/testdata/repos/python/PythonFetchableCheck/python-inline-pypi-url/Manifest @@ -3,3 +3,5 @@ DIST python.inline.pypi.url-1.tar.gz 153310 BLAKE2B b7484cd9bebe912f9c8877c0f09d DIST python_inline-pypi-url-100.tar.gz 153310 BLAKE2B b7484cd9bebe912f9c8877c0f09df059130c2dc5c4da8c926f8df7945bcb7b255cdf810ce8cd16a987fb5bca3d1e71c088cd894968641db5dfae1c4c059df836 SHA512 86ff9e1c4b9353b1fbb475c7bb9d2a97bd9db8421ea5190b5a84832930b34cb5b79f8c3da68a5eb8db334f06851ec129cc6611a371e47b7c5de7a615feec5e05 DIST Python-inline-pypi-url-200.tar.gz 153310 BLAKE2B b7484cd9bebe912f9c8877c0f09df059130c2dc5c4da8c926f8df7945bcb7b255cdf810ce8cd16a987fb5bca3d1e71c088cd894968641db5dfae1c4c059df836 SHA512 86ff9e1c4b9353b1fbb475c7bb9d2a97bd9db8421ea5190b5a84832930b34cb5b79f8c3da68a5eb8db334f06851ec129cc6611a371e47b7c5de7a615feec5e05 DIST python_inline_pypi_url-1000.tar.gz 153310 BLAKE2B b7484cd9bebe912f9c8877c0f09df059130c2dc5c4da8c926f8df7945bcb7b255cdf810ce8cd16a987fb5bca3d1e71c088cd894968641db5dfae1c4c059df836 SHA512 86ff9e1c4b9353b1fbb475c7bb9d2a97bd9db8421ea5190b5a84832930b34cb5b79f8c3da68a5eb8db334f06851ec129cc6611a371e47b7c5de7a615feec5e05 +DIST python_inline_pypi_url-2000.tar.gz 153310 BLAKE2B b7484cd9bebe912f9c8877c0f09df059130c2dc5c4da8c926f8df7945bcb7b255cdf810ce8cd16a987fb5bca3d1e71c088cd894968641db5dfae1c4c059df836 SHA512 86ff9e1c4b9353b1fbb475c7bb9d2a97bd9db8421ea5190b5a84832930b34cb5b79f8c3da68a5eb8db334f06851ec129cc6611a371e47b7c5de7a615feec5e05 +DIST python.inline-pypi-url_vectors-151.tar.gz 153310 BLAKE2B b7484cd9bebe912f9c8877c0f09df059130c2dc5c4da8c926f8df7945bcb7b255cdf810ce8cd16a987fb5bca3d1e71c088cd894968641db5dfae1c4c059df836 SHA512 86ff9e1c4b9353b1fbb475c7bb9d2a97bd9db8421ea5190b5a84832930b34cb5b79f8c3da68a5eb8db334f06851ec129cc6611a371e47b7c5de7a615feec5e05 diff --git a/testdata/repos/python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-2000.ebuild b/testdata/repos/python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-2000.ebuild new file mode 100644 index 00000000..2598d665 --- /dev/null +++ b/testdata/repos/python/PythonFetchableCheck/python-inline-pypi-url/python-inline-pypi-url-2000.ebuild @@ -0,0 +1,15 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Ebuild with two PyPI URLs" +HOMEPAGE="https://example.com" +SRC_URI=" + mirror://pypi/${PN::1}/${PN/-/.}/${PN//-/_}-${PV}.tar.gz + mirror://pypi/${PN::1}/${PN/-/.}_vectors/${PN/-/.}_vectors-151.tar.gz +" +S=${WORKDIR}/${PN//-/_}-${PV} + +LICENSE="BSD" +SLOT="0" diff --git a/testdata/repos/python/eclass/pypi.eclass b/testdata/repos/python/eclass/pypi.eclass index af21dc7f..8485bf6e 100644 --- a/testdata/repos/python/eclass/pypi.eclass +++ b/testdata/repos/python/eclass/pypi.eclass @@ -13,6 +13,11 @@ # @DEFAULT_UNSET # @DESCRIPTION: +# @ECLASS_VARIABLE: PYPI_PN +# @PRE_INHERIT +# @DESCRIPTION: +: ${PYPI_PN:=${PN}} + # @FUNCTION: pypi_normalize_name # @USAGE: <name> # @DESCRIPTION: @@ -56,7 +61,7 @@ pypi_sdist_url() { shift fi - local project=${1-"${PN}"} + local project=${1-"${PYPI_PN}"} local version=${2-"$(pypi_translate_version "${PV}")"} local suffix=${3-.tar.gz} local fn_project=${project} @@ -69,7 +74,7 @@ pypi_sdist_url() { # @USAGE: [<project> [<version> [<python-tag> [<abi-platform-tag>]]]] # @DESCRIPTION: pypi_wheel_name() { - local project=$(pypi_normalize_name "${1-"${PN}"}") + local project=$(pypi_normalize_name "${1-"${PYPI_PN}"}") local version=${2-"$(pypi_translate_version "${PV}")"} local pytag=${3-py3} local abitag=${4-none-any} @@ -87,7 +92,7 @@ pypi_wheel_url() { fi local filename=$(pypi_wheel_name "${@}") - local project=${1-"${PN}"} + local project=${1-"${PYPI_PN}"} local version=${2-"$(pypi_translate_version "${PV}")"} local pytag=${3-py3} printf "https://files.pythonhosted.org/packages/%s" \ @@ -100,8 +105,8 @@ pypi_wheel_url() { if [[ ${PYPI_NO_NORMALIZE} ]]; then SRC_URI="$(pypi_sdist_url --no-normalize)" - S="${WORKDIR}/${PN}-$(pypi_translate_version "${PV}")" + S="${WORKDIR}/${PYPI_PN}-$(pypi_translate_version "${PV}")" else SRC_URI="$(pypi_sdist_url)" - S="${WORKDIR}/$(pypi_normalize_name "${PN}")-$(pypi_translate_version "${PV}")" + S="${WORKDIR}/$(pypi_normalize_name "${PYPI_PN}")-$(pypi_translate_version "${PV}")" fi |