Commit Graph

5 Commits

Author SHA1 Message Date
Derek Straka
2ce210011c classes/pypi: update the default UPSTREAM_CHECK_URI to use the simple repo API
Update the UPSTREAM_CHECK_URI to leverage the simple repo API.  The
project URLs require javascript which breaks the version checking fetch
and subsequent logic.  The simple repo API provides similar
functionality with a well defined spec which is used by tools such as
pip.  Also update the UPSTREAM_CHECK_REGEX to be compatible with the
information retrieved via the API

(From OE-Core rev: 10febb0e8193d15aec8bbf80b849ae6732da3c22)

Signed-off-by: Derek Straka <derek@asterius.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-12-17 11:41:52 +00:00
Ross Burton
7a1e8c444c classes/pypi: don't expose PYPI_ARCHIVE_NAME
This variable is only used when constructing a SRC_URI and some recipes
think that it's the correct value to assign if the PyPi package name
isn't the same as the recipe name, when PYPI_PACKAGE is actually all
that needs to be set.

Also document the variables we expect the recipe to assign if needed,
and where the PyPi URL structure is documented.

(From OE-Core rev: 0a67d05373ed92bf153bd17e5b32d77ca9f0c353)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-16 08:07:03 +01:00
Derek Straka
3c8cfbfc04 pypi.bbclass: Update the upstream checks to automatically replace '_' with '-'
For a number of existing packages, the pypi URI contains '-', but the package name (PYPI_PACKAGE) uses '_'.  Add a simple replace for the UPSTREAM_CHECK_URI and UPSTREAM_CHECK_REGEX.  The change resulted in 19 additional auto-detected upstream checks for python packages meta-python.

It did break upstream checks for 3 packages that will be patched shortly:
 - python3-ipython-genutils
 - python3-ninja-syntax
 - python3-wpa-supplicant

(From OE-Core rev: f4e2923bfac8a0a5b702ffd2dd957213a6268f6b)

Signed-off-by: Derek Straka <derek@asterius.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-22 07:45:17 +01:00
Zoltan Boszormenyi
6690023f28 pypi.bbclass: Set SRC_URI downloadfilename with an optional prefix
This allows avoiding clashes between source archives of a main
project and a pypi project using the same name and version.

The new optional setting is PYPI_ARCHIVE_NAME_PREFIX which is empty
by default so previous downloads can be used. Example usage:

PYPI_ARCHIVE_NAME_PREFIX = "pypi-"

(From OE-Core rev: 6f9a6a3dbe5c8eb9f0d19987410932fec3d6dd1a)

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-14 17:10:00 +00:00
Richard Purdie
fd1517e2b5 classes: Update classes to match new bitbake class scope functionality
Move classes to classes-global or classes-recipe as appropriate to take
advantage of new bitbake functionality to check class scope/usage.

(From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12 15:27:17 +01:00