Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 909897 - app-text/dblatex: needs to use PEP517 build (DistutilsNonPEP517Build)
Summary: app-text/dblatex: needs to use PEP517 build (DistutilsNonPEP517Build)
Status: IN_PROGRESS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Zoltan Puskas
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: pep517-porting
  Show dependency tree
 
Reported: 2023-07-08 06:48 UTC by Michał Górny
Modified: 2024-03-19 01:35 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
legacy mode build log (non-pep517.build.log,125.75 KB, text/x-log)
2023-12-05 14:06 UTC, Zoltan Puskas
Details
pep517 build log (pep517.build.log,255.30 KB, text/x-log)
2023-12-05 14:07 UTC, Zoltan Puskas
Details
debugging patch for setup.py (dblatex-0.3.12-setup.patch,2.02 KB, patch)
2023-12-05 14:07 UTC, Zoltan Puskas
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-07-08 06:48:24 UTC
This package still uses the legacy eclass code paths.  These paths are deprecated and pose a significant maintenance cost.  Please update the package to use PEP517 build mode.  For more information, please see the Python Guide, particularly; https://projects.gentoo.org/python/guide/migration.html#migrating-to-pep-517-builds
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-08 20:40:52 UTC
[Adding this comment en-masse, sorry for the noise, but it's important.)

1. Please take particular care to check file diffs before/after, possibly using `iwdevtools`. Keep a particular eye out for e.g. config files now missing from /etc and instead being in /usr/lib/python*/site-packages, etc.

2. Please make sure to do the migration in a new revision in ~arch, partly because of 1.
Comment 2 Zoltan Puskas 2023-07-24 07:57:14 UTC
It seems that the setup.py modifies some of the paths, which causes the script file to be installed.

Similar issue by others: https://lists.gnu.org/archive/html/guix-commits/2022-01/msg00207.html

I need to go through the setup file and most likely patch it to make it work with PEP517.
Comment 3 Zoltan Puskas 2023-12-05 14:06:42 UTC
Created attachment 877436 [details]
legacy mode build log
Comment 4 Zoltan Puskas 2023-12-05 14:07:01 UTC
Created attachment 877437 [details]
pep517 build log
Comment 5 Zoltan Puskas 2023-12-05 14:07:37 UTC
Created attachment 877438 [details, diff]
debugging patch for setup.py
Comment 6 Zoltan Puskas 2023-12-05 14:12:55 UTC
It seems to me that setup.py is defining custom commands, which get executed differently under PEP517.

I've patched setup.py to print some additional debug information and as far as I can tell. Here are the execution orders:

In legacy mode:
---- setup.py invocation ----
- Build
- BuildScripts
---- setup.py invocation ----
- Install
- BuildScripts
- Install Data

In PEP517 mode:
---- setup.py invocation ----
- Build
- BuildScripts
- Install
- Install Data

In PEP517 mode, since Install has not been executed yet, it means install.install_data is None instead of being a path and the BuildScripts object just bails on creating dblatex main script due to the empty path.

I'm not familiar with the internal details of the legacy and PEP517 installation modes and only took a peek at distutils-r1.eclass so far.

I'll prolly need to read the documentation[1][2] back to back before I can proceed fixing this, unless someone more experienced can help me out here. Further pointers are also welcome.

[1]https://projects.gentoo.org/python/guide/migration.html#migrating-to-pep-517-builds
[2]https://peps.python.org/pep-0517/
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-06 15:30:19 UTC
Final ping.  Please note that we will not hesitate to last rite low profile packages over this.
Comment 8 Zoltan Puskas 2024-03-12 07:37:52 UTC
I've tried contacting upstream without success so far. I'll try once more, but if it fails I'll probably have to rewrite the setup.py myself.
Comment 9 Eli Schwartz 2024-03-19 01:35:26 UTC
It needs to be ported to a non-python build system, such as autotools or meson. Wheels are logically and semantically invalid for an application installing files outside of site-packages and /usr/bin -- it's a bad idea to deprecate `setup.py install` for software that genuinely needs it as a "Makefile but python".