Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 910021 - sci-chemistry/pymol: needs to use PEP517 build (DistutilsNonPEP517Build)
Summary: sci-chemistry/pymol: needs to use PEP517 build (DistutilsNonPEP517Build)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal
Assignee: Gentoo Chemistry-Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: pep517-porting
  Show dependency tree
 
Reported: 2023-07-08 06:58 UTC by Michał Górny
Modified: 2023-07-20 11:31 UTC (History)
1 user (show)

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


Attachments
pymol-2.5.0-r4.ebuild (pymol-2.5.0-r4.ebuild,2.76 KB, text/plain)
2023-07-19 09:05 UTC, Pacho Ramos
Details
pymol-2.5.0-format-security.patch (pymol-2.5.0-format-security.patch,562 bytes, patch)
2023-07-19 09:07 UTC, Pacho Ramos
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:58:20 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:54 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 Pacho Ramos gentoo-dev 2023-07-19 08:39:02 UTC
The issue I see here while migrating is that it stops honoring the install option
--pymol-path and, instead of installing the things in /usr/share/pymol, it ends up placing the stuff at /usr/lib/python3.11/site-packages/pymol/pymol_path/

I have tried with DISTUTILS_USE_PEP517="setuptools"
Comment 3 Pacho Ramos gentoo-dev 2023-07-19 09:01:30 UTC
I see in distros like Fedora they are simply moving the files to the desired location :/ Not elegant but...
Comment 4 Pacho Ramos gentoo-dev 2023-07-19 09:05:48 UTC
Created attachment 865792 [details]
pymol-2.5.0-r4.ebuild
Comment 5 Pacho Ramos gentoo-dev 2023-07-19 09:07:09 UTC
Created attachment 865793 [details, diff]
pymol-2.5.0-format-security.patch

As I was looking in other distributions I find this fix (unrelated with this bug but still useful when we finally revbump)
Comment 6 Pacho Ramos gentoo-dev 2023-07-19 09:07:55 UTC
The attached ebuild seems to work (I am not now at work for running more complex tests... but simpler ones look to not break)
Comment 7 Larry the Git Cow gentoo-dev 2023-07-20 08:01:46 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7319a218c29e15bae4b0dd617db10d286adfef6

commit e7319a218c29e15bae4b0dd617db10d286adfef6
Author:     Pacho Ramos <pacho@gentoo.org>
AuthorDate: 2023-07-20 08:01:11 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2023-07-20 08:01:11 +0000

    sci-chemistry/pymol: Use PEP517 build
    
    Closes: https://bugs.gentoo.org/910021
    Signed-off-by: Pacho Ramos <pacho@gentoo.org>

 .../pymol/files/pymol-2.5.0-format-security.patch  |  15 +++
 sci-chemistry/pymol/pymol-2.5.0-r4.ebuild          | 108 +++++++++++++++++++++
 2 files changed, 123 insertions(+)
Comment 8 hsk17 2023-07-20 11:19:20 UTC
on prefix, compile seems to work, but install fails

second arg of the added mv in python_install_all() must be ${ED}/....
(in the first arg to mv, python_get_sitedir has the prefix, hence ${D})

mv "${D}/$(python_get_sitedir)"/pymol/pymol_path/* "${ED}"/usr/share/pymol || die

anyway, thanks for the more standardized ebuild
Comment 9 Larry the Git Cow gentoo-dev 2023-07-20 11:31:56 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c1155b0a87a8388154a392f173e0399394cd681

commit 7c1155b0a87a8388154a392f173e0399394cd681
Author:     Pacho Ramos <pacho@gentoo.org>
AuthorDate: 2023-07-20 11:30:51 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2023-07-20 11:31:44 +0000

    sci-chemistry/pymol: Fix install on prefix
    
    Thanks-to: hsk17
    Bug: https://bugs.gentoo.org/910021
    Signed-off-by: Pacho Ramos <pacho@gentoo.org>

 sci-chemistry/pymol/pymol-2.5.0-r4.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)