Browse Source

python: Revise pypi.mk section of readme

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
lilik-openwrt-22.03
Jeffery To 5 years ago
parent
commit
6bb3e26fe2
No known key found for this signature in database GPG Key ID: C616D9E719E868E4
1 changed files with 4 additions and 6 deletions
  1. +4
    -6
      lang/python/README.md

+ 4
- 6
lang/python/README.md View File

@ -139,18 +139,18 @@ This will make sure that build rules for Python can be specified and picked up f
### Include pypi.mk (optional) ### Include pypi.mk (optional)
If the package source code will be downloaded from [pypi.org](https://pypi.org/), including `pypi.mk` can help simplify the package Makefile.
`pypi.mk` is an include file that makes downloading package source code from [pypi.org](https://pypi.org/) simpler.
To use `pypi.mk`, add this **before** `include $(INCLUDE_DIR)/package.mk`: To use `pypi.mk`, add this **before** `include $(INCLUDE_DIR)/package.mk`:
``` ```
include ../pypi.mk include ../pypi.mk
``` ```
`pypi.mk` has several `PYPI_*` variables that must/can be set (see below); these should be set before `pypi.mk` is included, i.e. before the `include ../pypi.mk` line.
`pypi.mk` has several `PYPI_*` variables that can/must be set (see below); these should be set before `pypi.mk` is included, i.e. before the `include ../pypi.mk` line.
`pypi.mk` also provides default values for `PKG_SOURCE` and `PKG_SOURCE_URL`, so these variables may be omitted. `pypi.mk` also provides default values for `PKG_SOURCE` and `PKG_SOURCE_URL`, so these variables may be omitted.
One variable is required:
Required variables:
* `PYPI_NAME`: Package name on pypi.org. This should match the PyPI name exactly. * `PYPI_NAME`: Package name on pypi.org. This should match the PyPI name exactly.
@ -159,7 +159,7 @@ One variable is required:
PYPI_NAME:=PyYAML PYPI_NAME:=PyYAML
``` ```
These variables are optional:
Optional variables:
* `PYPI_SOURCE_NAME`: Package name component of the source tarball filename * `PYPI_SOURCE_NAME`: Package name component of the source tarball filename
Default: Same value as `PYPI_NAME` Default: Same value as `PYPI_NAME`
@ -172,8 +172,6 @@ These variables are optional:
PKG_SOURCE?=$(PYPI_SOURCE_NAME)-$(PKG_VERSION).$(PYPI_SOURCE_EXT) PKG_SOURCE?=$(PYPI_SOURCE_NAME)-$(PKG_VERSION).$(PYPI_SOURCE_EXT)
``` ```
The `PYPI_SOURCE_*` variables allow this default `PKG_SOURCE` value to be customized as necessary.
### Add Package/<PKG_NAME> OpenWrt definitions ### Add Package/<PKG_NAME> OpenWrt definitions
This part is similar to default OpenWrt packages. This part is similar to default OpenWrt packages.


Loading…
Cancel
Save