#962 Docuemnt how to pass arguments to %py3_build/install
Merged 5 months ago by churchyard. Opened 6 months ago by churchyard.
churchyard/packaging-committee py_args  into  master

@@ -226,11 +226,11 @@ 

  

  |`+%py3_build+`

  |`+%{__python3} setup.py build …+`

- |Various flags are added, see `/usr/lib/rpm/macros.d/macros.python3` for details and similar macros. Define `+%py_setup_args+` to pass custom command line arguments to `setup.py`.

+ |See `+%py3_install+` for passing arguments to `+setup.py build+` or directly to `+setup.py+`.

  

  |`+%py3_install+`

  |`+%{__python3} setup.py install --skip-build …+`

- |

+ |Various flags are passed to `+setup.py install+`, see `/usr/lib/rpm/macros.d/macros.python3` for details and similar macros. To add extra flags/arguments to `+setup.py install+`, separate them with `+--+`, for example: `+%py3_install -- --install-scripts %{_libexecdir}+`. To pass custom command line arguments directly to `+setup.py+`, define `+%py_setup_args+`.

  

  |`+%{py_dist_name}+`

  |(Lua script)

I find this confusing; it could use an example.
AFAIK the only real-world use case we know so far is for install, so I'd say something like this for install:

Various flags are passed to `+setup.py install+`, see `/usr/lib/rpm/macros.d/macros.python3` for details and similar macros.
To add extra flags/arguments to `+setup.py install+`, separate them with `+--+`, for example: `%py3_install -- --install-scripts %{_libexecdir}`.
To pass custom command line arguments directly to `+setup.py+`, define `+%py_setup_args+`.

and refer to that from build.

rebased onto b4832d9db8fffae25d868dd671896eae65f0f44b

5 months ago

Yes, that's what I had in mind.

rebased onto dab3ce5bb7e77a0b3eedb65ab3bd1e738802a174

5 months ago

Metadata Update from @churchyard:
- Pull-request tagged with: meeting

5 months ago

Since this doesn't really change the guidelines, only documentation, I'm merging it.

rebased onto 8561196

5 months ago

Pull-Request has been merged by churchyard

5 months ago