mirror of
https://git.yoctoproject.org/poky
synced 2026-02-12 19:53:03 +01:00
This did not cause problems in builds, but broke some devtool workflows such as version upgrades or checking the latest version from upstream. Tarballs should come first, not the patches. (From OE-Core rev: 5cee50c25197102658e0689f635b2d567a375471) (From OE-Core rev: 8f17b8bce85efb0e9a7e15d0b98a5cf7b6bd9750) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
27 lines
841 B
Plaintext
27 lines
841 B
Plaintext
def pypi_package(d):
|
|
bpn = d.getVar('BPN')
|
|
if bpn.startswith('python-'):
|
|
return bpn[7:]
|
|
elif bpn.startswith('python3-'):
|
|
return bpn[8:]
|
|
return bpn
|
|
|
|
PYPI_PACKAGE ?= "${@pypi_package(d)}"
|
|
PYPI_PACKAGE_EXT ?= "tar.gz"
|
|
|
|
def pypi_src_uri(d):
|
|
package = d.getVar('PYPI_PACKAGE')
|
|
package_ext = d.getVar('PYPI_PACKAGE_EXT')
|
|
pv = d.getVar('PV')
|
|
return 'https://files.pythonhosted.org/packages/source/%s/%s/%s-%s.%s' % (package[0], package, package, pv, package_ext)
|
|
|
|
PYPI_SRC_URI ?= "${@pypi_src_uri(d)}"
|
|
|
|
HOMEPAGE ?= "https://pypi.python.org/pypi/${PYPI_PACKAGE}/"
|
|
SECTION = "devel/python"
|
|
SRC_URI_prepend = "${PYPI_SRC_URI} "
|
|
S = "${WORKDIR}/${PYPI_PACKAGE}-${PV}"
|
|
|
|
UPSTREAM_CHECK_URI ?= "https://pypi.org/project/${PYPI_PACKAGE}/"
|
|
UPSTREAM_CHECK_REGEX ?= "/${PYPI_PACKAGE}/(?P<pver>(\d+[\.\-_]*)+)/"
|