Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 484406 - dev-python/pygobject: hacks python wrapping over
Summary: dev-python/pygobject: hacks python wrapping over
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal QA (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 484398
  Show dependency tree
 
Reported: 2013-09-09 21:17 UTC by Michał Górny
Modified: 2020-12-05 16:37 UTC (History)
1 user (show)

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


Attachments

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 2013-09-09 21:17:35 UTC
gnome2_src_install

        python_doscript pygobject-codegen-2.0

        # Don't keep multiple copies of pygobject-codegen-2.0 script
        prefixed_sitedir=$(python_get_sitedir)
        dosym "${prefixed_sitedir#${EPREFIX}}/gtk-2.0/codegen/codegen.py" /usr/bin/pygobject-codegen-2.0-${EPYTHON}


Do I understand correctly that you're installing the script with the wrapper first, and then replacing the wrapped scripts with symlinks?

Not sure if we can do something to avoid touching internals like this. However, please keep the bug open so that I'd know I need to update the package if we change the wrapping method.
Comment 1 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-09-09 21:43:28 UTC
We want one wrapper in /usr/bin for a script that is installed somewhere under sitedir for each python implementation. (And naturally, in different sitedirs, the script has different version-specific shebangs.)

Do you have a suggestion for how to do this without needing to install an additional copy of the script in /usr/bin for each python implementation?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-09-09 22:02:32 UTC
Well, the first thing that comes to my head is creating a wrapper that uses Python to import and run that module. However, I will think about something simpler for this and similar cases.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-09-17 19:43:42 UTC
FYI: I've forced python-exec:0 in the ebuild now. We will probably revisit this near python-exec:2 going stable, so please keep the bug open.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-10-17 18:06:44 UTC
+*pygobject-2.28.6-r55 (17 Oct 2013)
+
+  17 Oct 2013; Michał Górny <mgorny@gentoo.org> +pygobject-2.28.6-r55.ebuild:
+  Add a new revision using python-exec:2.
+

Seems to work but more testing would be appreciated.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-10-17 18:10:05 UTC
(please keep this open until we provide a proper way of doing the thing you do in the eclass)
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-03-13 08:32:35 UTC
Hmm, would you mind installing a wrapper alike media-gfx/cropgui does? I mean, a bash script that calls the sitedir copy.
Comment 7 Pacho Ramos gentoo-dev 2014-05-31 11:14:27 UTC
(In reply to Michał Górny from comment #6)
> Hmm, would you mind installing a wrapper alike media-gfx/cropgui does? I
> mean, a bash script that calls the sitedir copy.

Personally I don't mind, no idea about other team members opinion :/
Comment 8 Pacho Ramos gentoo-dev 2016-06-25 09:53:55 UTC
mgorny, do you plan to finally do something with this? Thanks for the info