Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| python:portspolicy [2021/07/12 02:12] – Add guideline for package not in PyPI case for naming KubilayKocak | python:portspolicy [2023/03/02 02:17] (current) – emphasise case-sensitivity CharlieLi | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| * As a reference to a well-defined target-state | * As a reference to a well-defined target-state | ||
| * To inform discussions and technical implementations | * To inform discussions and technical implementations | ||
| - | * To provide %%FreeBSD%% | + | * To provide %%FreeBSD%% |
| * To orient and focus resources towards common initiatives or goals. | * To orient and focus resources towards common initiatives or goals. | ||
| Line 20: | Line 20: | ||
| ===== Naming ===== | ===== Naming ===== | ||
| - | ==== General | + | ==== Prefixing (py-*) |
| + | |||
| + | **Guideline**: | ||
| * Port directory name MUST be lowercase('' | * Port directory name MUST be lowercase('' | ||
| - | |||
| - | ==== Prefixing (py-*) ==== | ||
| * Python ports MUST be prefixed with '' | * Python ports MUST be prefixed with '' | ||
| Line 34: | Line 34: | ||
| ==== PORTNAME ==== | ==== PORTNAME ==== | ||
| + | |||
| + | **Guideline**: | ||
| // | // | ||
| Line 39: | Line 41: | ||
| Check if a package is registered in %%PyPI%% (CHEESESHOP), | Check if a package is registered in %%PyPI%% (CHEESESHOP), | ||
| - | * '' | ||
| - | * '' | ||
| * If the package is registered on %%PyPI%% | * If the package is registered on %%PyPI%% | ||
| - | * '' | + | * '' |
| * The %%PyPI%% package name is that which is displayed in the URL at [[https:// | * The %%PyPI%% package name is that which is displayed in the URL at [[https:// | ||
| * Note: The displayed %%PyPI%% package name can be different than the package name specified in '' | * Note: The displayed %%PyPI%% package name can be different than the package name specified in '' | ||
| Line 52: | Line 52: | ||
| ==== PKGNAMEPREFIX ==== | ==== PKGNAMEPREFIX ==== | ||
| + | |||
| + | **Guideline**: | ||
| * Ports MUST use '' | * Ports MUST use '' | ||
| * '' | * '' | ||
| - | ===== CATEGORIES | + | ===== Metadata |
| + | |||
| + | ==== CATEGORIES ==== | ||
| + | |||
| + | **Guideline**: | ||
| * Ports MUST add '' | * Ports MUST add '' | ||
| * Ports SHOULD add multiple '' | * Ports SHOULD add multiple '' | ||
| + | |||
| + | ==== COMMENT ==== | ||
| + | |||
| + | **Guideline**: | ||
| + | |||
| + | * Ports SHOULD match the upstream short description or summary where possible, modulo requirements and changes for portlint compliance | ||
| + | * For Python ports, this almost always means what is defined in '' | ||
| ===== MASTER_SITES ===== | ===== MASTER_SITES ===== | ||
| - | Ports SHOULD use '' | + | **Guideline**: |
| + | |||
| + | * Ports SHOULD use '' | ||
| Examples where temporarily using an alternate MASTER_SITES is warranted: | Examples where temporarily using an alternate MASTER_SITES is warranted: | ||
| Line 76: | Line 91: | ||
| ===== USES=python ===== | ===== USES=python ===== | ||
| + | |||
| + | **Guideline**: | ||
| + | **Guideline**: | ||
| * Python ports MUST declare USES=python '' | * Python ports MUST declare USES=python '' | ||
| Line 83: | Line 101: | ||
| ===== USE_PYTHON Features ===== | ===== USE_PYTHON Features ===== | ||
| + | |||
| + | **Guideline**: | ||
| + | |||
| + | ==== pep517 ==== | ||
| + | |||
| + | * Packages following PEP-517 (have a pyproject.toml specifying a build backend that builds an installable wheel) SHALL use pep517, unless there is a compelling reason not to. | ||
| + | |||
| + | ==== distutils ==== | ||
| + | |||
| + | * Packages that use distutils (directly executes a setup.py, import distutils/ | ||
| ==== autoplist ==== | ==== autoplist ==== | ||
| + | * Packages following PEP-517 (have a pyproject.toml specifying a build backend that builds an installable wheel) and built as such SHALL use autoplist. | ||
| * Packages that use distutils (have a setup.py, import distutils/ | * Packages that use distutils (have a setup.py, import distutils/ | ||
| Line 97: | Line 126: | ||
| See Also: https:// | See Also: https:// | ||
| - | |||
| - | ==== distutils ==== | ||
| - | |||
| - | * Packages that use distutils (have a setup.py, import distutils/ | ||
| ===== Dependencies ===== | ===== Dependencies ===== | ||
| + | |||
| + | **Guideline**: | ||
| **IMPORTANT**: | **IMPORTANT**: | ||
| Line 117: | Line 144: | ||
| * Port maintainers SHOULD fix missing or incorrectly specified dependencies, | * Port maintainers SHOULD fix missing or incorrectly specified dependencies, | ||
| * Use common sense for upstream version requirements that set //maximum versions// or pin //very specific// versions, eg: '' | * Use common sense for upstream version requirements that set //maximum versions// or pin //very specific// versions, eg: '' | ||
| + | * **IMPORTANT**: | ||
| ==== Modifying Dependencies ==== | ==== Modifying Dependencies ==== | ||
| Line 130: | Line 158: | ||
| * Port OPTIONS for optional functionality, | * Port OPTIONS for optional functionality, | ||
| - | ==== Transitive Dependencies ==== | + | ==== Optional / Transitive Dependencies ==== |
| * If a package depends on another packages **optional** dependencies, | * If a package depends on another packages **optional** dependencies, | ||
| - | * Eg: Package A depends on %%PackageB%%[optional] (defined in extras_require). Package A should depend explicitly on all dependencies listed in Package B's %%%%'' | + | * Example: Package A depends on %%PackageB%%[optional] (defined in extras_require). Package A should depend explicitly on all dependencies listed in Package B's %%%%'' |
| ===== Tests ===== | ===== Tests ===== | ||
| + | |||
| + | **Guideline**: | ||
| * Python ports SHOULD include a '' | * Python ports SHOULD include a '' | ||
| Line 142: | Line 172: | ||
| ===== Patches ===== | ===== Patches ===== | ||
| + | |||
| + | **Guideline**: | ||
| * Python ports SHOULD [[Python/ | * Python ports SHOULD [[Python/ | ||
| Line 148: | Line 180: | ||
| ===== Upstreaming ===== | ===== Upstreaming ===== | ||
| + | |||
| + | **Guideline**: | ||
| * Python port maintainers SHOULD (strongly encouraged) aim to: | * Python port maintainers SHOULD (strongly encouraged) aim to: | ||