1 |
commit: 98564222a2d9f0f222a49dc65bc2ec13cc47249c |
2 |
Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in> |
3 |
AuthorDate: Wed Feb 2 08:34:01 2022 +0000 |
4 |
Commit: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in> |
5 |
CommitDate: Wed Feb 2 08:34:01 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=98564222 |
7 |
|
8 |
CONTRIBUTING.md: few words about PEP517 mode |
9 |
|
10 |
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in> |
11 |
|
12 |
CONTRIBUTING.md | 6 +++++- |
13 |
1 file changed, 5 insertions(+), 1 deletion(-) |
14 |
|
15 |
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md |
16 |
index 456282084..0b07b72af 100644 |
17 |
--- a/CONTRIBUTING.md |
18 |
+++ b/CONTRIBUTING.md |
19 |
@@ -90,12 +90,16 @@ There are [make.conf flags](https://wiki.gentoo.org/wiki/Package_testing#make.co |
20 |
|
21 |
The [app-portage/iwdevtools](https://github.com/ionenwks/iwdevtools) package contains scripts that help with ebuild development: finding incorrect dependencies, detectng [ABI changes](https://devmanual.gentoo.org/general-concepts/slotting/index.html#abi-breakage) etc. |
22 |
|
23 |
-- #### Tests and documentation for Python packages. |
24 |
+- #### Tests and documentation for Python packages |
25 |
|
26 |
Many Python packages have tests and documentation. Unlike some other eclasses the [distutils-r1 eclass](https://devmanual.gentoo.org/eclass-reference/distutils-r1.eclass/index.html) does not enable support for these tests automatically. This is because there are multiple test runners available for Python. To enable tests for your Python ebuilds, use the `distutils_enable_tests <test-runner>` function. Similarly, support for documentation building with Sphinx can be added with the `distutils_enable_sphinx <subdir> [--no-autodoc | <plugin-pkgs>...]` function. Please note that these functions already append to IUSE and RESTRICT, so there is no need to specify this manually. |
27 |
|
28 |
See the [dev manual](https://devmanual.gentoo.org/eclass-reference/distutils-r1.eclass/index.html) and the [Gentoo Python Guide](https://projects.gentoo.org/python/guide/distutils.html) for more information. |
29 |
|
30 |
+- #### Prefer the PEP 517 mode for `distutils-r1` packages |
31 |
+ |
32 |
+If you are writing a new ebuild or doing a version bump for a project that has `pyproject.toml` file, consider switching to [the PEP 517 mode](https://projects.gentoo.org/python/guide/distutils.html#the-pep-517-and-legacy-modes). |
33 |
+ |
34 |
- #### Avoid introducing USE flags for small files and optional runtime dependencies. |
35 |
|
36 |
Installation of small files, like documentation, completions, man pages, etc, does not have to be toggle-able with an USE flag. Instead, just install these files unconditionally. This avoids unnecessary recompilations when an user forgot to enable a flag that installs a small file ([PG 0301](https://projects.gentoo.org/qa/policy-guide/installed-files.html#pg0301)). |