Bug 1739847 - [RFE] Documentation about pyproject.toml file
Summary: [RFE] Documentation about pyproject.toml file
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Fedora
Classification: Fedora
Component: pyproject-rpm-macros
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: Lumír Balhar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-11 08:46 UTC by Lumír Balhar
Modified: 2022-03-17 16:20 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-17 16:20:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Lumír Balhar 2019-08-11 08:46:11 UTC
I've managed to build tldr package with the new macros during the hackfest session of Flock. I had to create a pyproject.toml file to specify package's build dependencies to make it work and now I'd like to send it to upstream.

Therefore it would be handy to have some short user-friendly documentation about pyproject.toml files, how to use them, how they can help you etc. so an upstream maintainer can read something about it.

Comment 1 Miro Hrončok 2019-08-11 08:59:15 UTC
I'm confused. Do you except Fedora to create and maintain the docs for (upstream) pyproject.toml?

This is the official reference point:

https://www.python.org/dev/peps/pep-0517/
https://www.python.org/dev/peps/pep-0518/

(However I realize it has a lot of "under the hood" details.)


BTW for tldr, was pyproject.toml needed to make %pyproject macros work? The macros should fallback to setuptools.

Comment 2 Lumír Balhar 2019-08-11 09:59:56 UTC
(In reply to Miro Hrončok from comment #1)
> I'm confused. Do you except Fedora to create and maintain the docs for
> (upstream) pyproject.toml?
> 
> This is the official reference point:
> 
> https://www.python.org/dev/peps/pep-0517/
> https://www.python.org/dev/peps/pep-0518/
> 
> (However I realize it has a lot of "under the hood" details.)

Yes, PEPs are there but you don't want to submit a PR like "Hey, this is a new pyproject.toml for your project and if you want to know why read the whole PEPs."

So I was thinking about some documentation of pyproject-rpm-macros which would contain steps to create a new pyptoject.toml from setup.py, some examples of pyproject.toml files and maybe some justification for upstream developers which you can use with every new PR. Maintaining pyproject.toml downstream does not make any sense so I'd put some effort to promote it in upstream, and porting packages to the new macros might be a good start how Fedora package maintainers can do that.

> BTW for tldr, was pyproject.toml needed to make %pyproject macros work? The
> macros should fallback to setuptools.

Yes it is needed because tldr uses setuptools-scm in its setup.py file.

Comment 3 Miro Hrončok 2019-08-11 10:34:25 UTC
(In reply to Lumír Balhar from comment #2)
> So I was thinking about some documentation of pyproject-rpm-macros which
> would contain steps to create a new pyptoject.toml from setup.py, some
> examples of pyproject.toml files and maybe some justification for upstream
> developers which you can use with every new PR. Maintaining pyproject.toml
> downstream does not make any sense so I'd put some effort to promote it in
> upstream, and porting packages to the new macros might be a good start how
> Fedora package maintainers can do that.

We can definitively aim to write something, but I am not convinced it should be part of the documentation of pyproject-rpm-macros.

Comment 4 Petr Viktorin (pviktori) 2019-08-12 11:02:07 UTC
I think we should document how to package Python modules to make them friendly for distributions, and how to package such modules in Fedora.

But not *right* now: at this point it would IMO be mostly documenting bugs and missing pieces that we're fixing and adding :)

Comment 5 Petr Viktorin (pviktori) 2019-08-20 13:51:16 UTC
Lumír, let's talk about this one more.

Comment 6 Miro Hrončok 2020-04-02 06:30:13 UTC
Random link on topic: https://snarky.ca/what-the-heck-is-pyproject-toml/

Comment 7 Petr Viktorin (pviktori) 2022-03-17 16:20:55 UTC
This isn't likely to ever have enough priority to get done. No need to track it here.


Note You need to log in before you can comment on or make changes to this bug.