Bug 255722

Summary: Mk/Uses/python.mk: Needs to support pyproject.toml -based projects
Product: Ports & Packages Reporter: Yuri Victorovich <yuri>
Component: Individual Port(s)Assignee: freebsd-python (Nobody) <python>
Status: New ---    
Severity: Affects Only Me CC: flying-sheep, lbartoletti
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Yuri Victorovich freebsd_committer 2021-05-09 08:14:01 UTC
The source tarball for this project https://github.com/theislab/anndata doesn't have setup.py on the PyPI website.

distutils is being deprecated, see https://www.python.org/dev/peps/pep-0632/

The replacement, setuptools, uses pyproject.toml instead, but Mk/Uses/python.mk doesn't seem to support it. The relevant section of the handbooks doesn't say anything about this: https://docs.freebsd.org/en/books/porters-handbook/special/#using-python
Comment 1 Loïc Bartoletti freebsd_committer 2021-05-10 07:03:56 UTC
Hi Yuri,

We have already some ports using pyproject.toml (sip related IIRC): 

- https://cgit.freebsd.org/ports/tree/devel/py-qt5-qscintilla2/Makefile#n32
- https://cgit.freebsd.org/ports/tree/graphics/py-python-poppler-qt5/Makefile#n35

But I agree with you, a variable for pyproject.toml wouldn't hurt.
Comment 2 flying-sheep 2021-05-11 19:17:07 UTC
I created an account here to clear up some confusion:

pyproject.toml doesn’t have anything to do with setuptools *or* sip.

As of 6 years ago, it’s *the* standard way to specify how a python package is built, defined in https://www.python.org/dev/peps/pep-0517/#source-trees

This means there’s two ways do define python package builds: This standard one and the legacy setup.py

I described here how building an OS package from a python repo/sdist in a generic way could look: https://github.com/theislab/anndata/issues/561#issuecomment-835770254
Comment 3 Yuri Victorovich freebsd_committer 2021-05-11 19:56:13 UTC
(In reply to flying-sheep from comment #2)

flying-sheep@web.de,

Thank you for your comments.

Our python.mk needs to be updated to reflect the new standard.


Yuri