Skip to content

Devtool/Recipetool: adding pypi support

Julien Stephan openembedded-core 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 Latest posting 2/27 patches 8 repliesIn review
  2. v1 posting 1/27 patches 4 repliesSuperseded

Patches in v1 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7bitbake: utils: remove spaces on empty linesbitbake/lib/bb/utils.py+8 -86 replies
2/7recipetool: create_buildsys_python.py: initialize metadatascripts/lib/recipetool/create_buildsys_python.py+1 -00 replies
3/7recipetool: create: add trailing newlinesscripts/lib/recipetool/create.py+5 -30 replies
4/7recipetool: create: add new optional process_url callback for pluginsscripts/lib/recipetool/create.py+32 -220 replies
5/7recipetool: create_buildsys_python: add pypi supportscripts/lib/devtool/standard.py scripts/lib/recipetool/create.py scripts/lib/recipetool/create_buildsys_python.py+76 -01 reply
6/7oeqa/selftest/recipetool: remove spaces on empty linesmeta/lib/oeqa/selftest/cases/recipetool.py+1 -11 reply
7/7oeqa/selftest/recipetool/devtool: add test for pypi classmeta/lib/oeqa/selftest/cases/devtool.py meta/lib/oeqa/selftest/cases/recipetool.py+85 -310 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RESEND][PATCH 0/7] Devtool/Recipetool: adding pypi support

Hello all,

This series adds basic support for the pypi class in devtool/recipetool.

The idea is to be able to detect that a package is available on pypi and in that case inherits from pypi class. This helps to produce cleaner recipes for pypi packages.

To do this, I am adding a new optional callback "process_url" that plugin can register to implement some logic on matching url.

By implementing this callback in create_buildsys_python we can match on pypi URLs directly or on release tarballs hosted on "files.pythonhosted.org".

To create a recipe taking advantage of the pypi class we can use one of the following new syntax:

* recipetool create https://pypi.org/project/<package>
* recipetool create https://pypi.org/project/<package>/<version>
* recipetool create https://pypi.org/project/<package> --version <version>

or the old syntax:

* recipetool create https://files.pythonhosted.org/packages/<...>

If the URL points to a github URL or a release tarball not coming from "files.pythonhosted.org", the created recipe is the same as before. One can also use the newly added "--no-pypi" switch to NOT inherit from pypi class on matching URL, to keep legacy behaviour.

This series also contains some bug fixes I found during my testing.

Pushed my dev branch here: https://git.yoctoproject.org/poky-contrib/log/?h=jstephan/devtool-add-pypi-support

Cheers
Julien

Julien Stephan (7):
bitbake: utils: remove spaces on empty lines
recipetool: create_buildsys_python.py: initialize metadata
recipetool: create: add trailing newlines
recipetool: create: add new optional process_url callback for plugins
recipetool: create_buildsys_python: add pypi support oeqa/selftest/recipetool: remove spaces on empty lines oeqa/selftest/recipetool/devtool: add test for pypi class

 bitbake/lib/bb/utils.py                       |  16 +--
 meta/lib/oeqa/selftest/cases/devtool.py       |   4 +-
 meta/lib/oeqa/selftest/cases/recipetool.py    | 114 +++++++++++++-----
 scripts/lib/devtool/standard.py               |   3 +
 scripts/lib/recipetool/create.py              |  63 ++++++----
 .../lib/recipetool/create_buildsys_python.py  |  73 +++++++++++
 6 files changed, 208 insertions(+), 65 deletions(-)
Signature · 1 line
2.42.0