On 2023/05/20 19:30, Paco Esteban wrote: > Hi ports@, > > This is an update for net/gajim to its latest version 1.7.3 > Tons of changes since last version. I did not update sooner because of > setuptools version dependency. Find the full changelog here: > > https://dev.gajim.org/gajim/python-nbxmpp/-/blob/4.2.2/ChangeLog > > Upstream seems to have changed the way they package gajim, and now the > man pages and the freedesktop file thingy are not copied during the fake > stage. > I see there is a script to copy this on pep517build/install_metadata.py > > According to python-module(5): > Most modern Python software can be packaged using a PEP 517 > build frontend (in the devel/py-build port). To use this, set > MODPY_PYBUILD to the name of the build backend. If the port > provides a pyproject.toml file, check the "build-backend" line in > the [build-system] section. > > And the build-system section says: > [build-system] > requires = [ > "setuptools >= 65.0.0", > ] > build-backend = "backend" > backend-path = ["pep517build"] > > > Not sure which backend is "backend" ... > > python-module(5) also says: > In rare cases, the build backend is distributed with the software > itself and MODPY_PYBUILD can be set to Yes to use this mechanism > without adding a dependency for another backend. > > So I tried both "setuptools" and "Yes" for MODPY_PYBUILD, with the same > result. > > Any help here appreciated.
If MODPY_PYBUILD is set to anything other than "No" then it does a build using PEP517 infrastructure which uses whatever is setup in the pyproject.toml file as the backend (which has a fallback to using pyproject.toml setuptools if doesn't exist). The various values setuptools, setuptools_scm, flit_core, etc, are to setup dependencies. There's no difference in the actual build command run whether it's set to "Yes" or "setuptools" or "flit_core" or whatever. Match what's actually used so the deps are added correctly. So here setuptools makes sense because it is needed in the build even if it's running it via its own internal backend (which itself uses setuptools). On 2023/05/20 19:35, Paco Esteban wrote: > By the way, I've found this on their repo: > https://dev.gajim.org/gajim/gajim/-/blob/1.7.3/README.md#building-the-metadata-files-unix-only > > Not sure at which stage to add those commands. > Any ideas ? --- Makefile- Fri May 26 11:17:45 2023 +++ Makefile Fri May 26 11:44:10 2023 @@ -39,4 +39,12 @@ RUN_DEPENDS= audio/gsound \ x11/gtk+4,-guic \ x11/gtksourceview4 +post-install: + cd ${WRKSRC}; \ + ${MODPY_BIN} pep517build/build_metadata.py -o dist/metadata; \ + ${MODPY_BIN} pep517build/install_metadata.py dist/metadata --prefix=${PREFIX} + mv ${PREFIX}/share/man/man1/* ${PREFIX}/man/man1/ + rmdir ${PREFIX}/share/man{,/man1} + gunzip ${PREFIX}/man/man1/*.gz + .include <bsd.port.mk>