Skip to main content

Generate python bitbake recipes from pypi metadata.

Project description

pipoe

The objective of this project is to make creating OpenEmbedded python recipes just a bit easier. pipoe will take either a single package name or a requirements file and recursively generate bitbake recipes for every pypi package listed. It is not guaranteed that it will work for every package. Additionally, many recipes will still require additional modification after generation (patches, overrides, appends, etc.). In those cases it is recommended that the user add these modifications in a bbappend file.

Install

> pip3 install pipoe

Licenses

Licensing within OE is typically pretty strict. pipoe contains a license map which will attempt to map a packages license to one that will be accepted by the OE framework. If a license string is found which cannot be mapped, the user will be prompted to enter a valid license name. This mapping will be saved and the updated map will be saved to ./licenses.py if the --licenses flag is provided. It is recommended that this file be PR'ed to this repository when generally useful changes are made.

Extras

pipoe supports generating "extra" recipes based on the extra feature declarations in the packages requires_dist field (i.e. urllib3[secure]). These recipes are generated as packagegroups which rdepend on the base package.

Versions

By default pipoe will generate a recipe for the newest version of a package. Supplying the --version argument will override this behavior. Additionally, pipoe will automatically parse versions from requirements files.

Example

> pipoe --help
usage: pipoe [-h] [--package PACKAGE] [--version VERSION]
             [--requirements REQUIREMENTS] [--extras] [--outdir OUTDIR]
             [--python {python,python3}] [--licenses]
             [--default-license DEFAULT_LICENSE]

optional arguments:
  -h, --help            show this help message and exit
  --package PACKAGE, -p PACKAGE
                        The package to process.
  --version VERSION, -v VERSION
                        The package version.
  --requirements REQUIREMENTS, -r REQUIREMENTS
                        The pypi requirements file.
  --extras, -e          Generate recipes for extras.
  --outdir OUTDIR, -o OUTDIR
                        The recipe directory.
  --python {python,python3}, -y {python,python3}
                        The python version to use.
  --licenses, -l        Output an updated license map upon completion.
  --default-license DEFAULT_LICENSE, -d DEFAULT_LICENSE
                        The default license to use when the package license
                        cannot be mapped.
> pipoe -p requests
Gathering info:
  requests
  | chardet
  | idna
  | urllib3
  | certifi
Generating recipes:
  python-requests_2.21.0.bb
  python-chardet_3.0.4.bb
  python-idna_2.8.bb
  python-urllib3_1.24.1.bb
  python-certifi_2018.11.29.bb

License mappings are available in: ./licenses.py
PREFERRED_VERSIONS are available in: ./python-versions.inc

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pipoe-2019.11.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

pipoe-2019.11-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file pipoe-2019.11.tar.gz.

File metadata

  • Download URL: pipoe-2019.11.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8

File hashes

Hashes for pipoe-2019.11.tar.gz
Algorithm Hash digest
SHA256 7c91c8440ed8390cbe34c6878deeefd90730d186b0015a89b6772aa3df5b2831
MD5 7ff79524b1e021ba8d8f8321588721ee
BLAKE2b-256 a06a641c70a8eff4b1959a5b1eb27b5e5e0c58af33226e9d5869deb0a2eef5e0

See more details on using hashes here.

File details

Details for the file pipoe-2019.11-py3-none-any.whl.

File metadata

  • Download URL: pipoe-2019.11-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8

File hashes

Hashes for pipoe-2019.11-py3-none-any.whl
Algorithm Hash digest
SHA256 588e08c55cfa2ddc975fb054c371d751c7ff9c008de806852ce01efa72c5cca4
MD5 9eb492e0069668675ee26ab7e25c61a8
BLAKE2b-256 27797b7ebeb35791ee65139a0828adeeb31ba039edda96d9725cff9915127671

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page