#110 Document %pyproject_extras_subpkg
Merged 3 years ago by churchyard. Opened 3 years ago by pviktori.
rpms/ pviktori/pyproject-rpm-macros document-extras_subpkg  into  master

file modified
+33
@@ -211,6 +211,39 @@ 

  The warning is harmless.

  

  

+ Generating Extras subpackages

+ -----------------------------

+ 

+ The `%pyproject_extras_subpkg` macro generates simple subpackage(s)

+ for Python extras.

+ 

+ The macro should be placed after the base package's `%description` to avoid

+ issues in building the SRPM.

+ 

+ For example, if the `requests` project's metadata defines the extras

+ `security` and `socks`, the following invocation will generate the subpackage

+ `python3-requests+security` that provides `python3dist(requests[security])`,

+ and a similar one for `socks`.

+ 

+     %pyproject_extras_subpkg -n python3-requests security socks

+ 

+ The macro works like `%python_extras_subpkg`,

+ except the `-i`/`-f`/`-F` arguments are optional and discouraged.

+ A filelist written by `%pyproject_install` is used by default.

+ For more information on `%python_extras_subpkg`, see the [Fedora change].

+ 

+ [Fedora change]: https://fedoraproject.org/wiki/Changes/PythonExtras

+ 

+ These arguments are still required:

+ 

+ * -n: name of the “base” package (e.g. python3-requests)

+ * Positional arguments: the extra name(s).

+   Multiple subpackages are generated when multiple names are provided.

+ 

+ The macro does nothing on Fedora 32 and lower, as automation around

+ extras was only added in f33.

+ 

+ 

  Limitations

  -----------

  

no initial comment

1 new commit added

  • Typo/wording fix
3 years ago

For more information on %python_extras_subpkg, see the [Fedora change].

(punctuation)

Build succeeded.

Several limitations to document:

  • The macro is not part of the buildroot, placing it after the "base" package "%description" is the best way to avoid issues.
  • The macro does nothing on Fedora < 33 (IIRC).

The current version looks good to me but as Miro mentioned, it would be good to mention where is the best place to use this macro in a specfile.

1 new commit added

  • Mention where to put %pyproject_extras_subpkg and that it's f33+
3 years ago

Build succeeded.

I love the additions. Thanks.

https://src.fedoraproject.org/rpms/pyproject-rpm-macros/pull-request/110#comment-56361 is still valid thou. When you fix this, consider rebasing on top of master.

rebased onto f40fcbf8b927530bdd3b2f327931c4496d5bf728

3 years ago

Thanks!
Added dot and squashed onto master. Will merge when green.

rebased onto d719a00

3 years ago

The README is not tested in any way. Let's merge.

Pull-Request has been merged by churchyard

3 years ago

Build succeeded.