Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 377549 - >=dev-libs/glib-2.28 requires python
Summary: >=dev-libs/glib-2.28 requires python
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
: 394941 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-08-03 11:54 UTC by Bjarke Istrup Pedersen (RETIRED)
Modified: 2011-12-16 17:25 UTC (History)
2 users (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 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2011-08-03 11:54:06 UTC
It seems that since version 2.28 , dev-libs/glib has started depending on python.

Is there a chance that this can be made optional by ect. a USE flag?

It's a bit of a problem, since I build packages into a folder, and then syncs that to my router, which has very little diskspace, so having to install python is annoying, since I don't need python on that machine.

So, would it be possible to remove the requirement of python, or make it optional?
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2011-08-03 16:38:05 UTC
python was needed at build time and for tests at some point but it seems a couple of patches have been applied to remove that dependency. However since the ebuild still inherits the python eclass it still pulls python dependency in. Needs to be checked.
Comment 2 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-08-03 16:59:02 UTC
I believe that Gentoo's glib-2.28 doesn't actually need python for anything; the dependency is an ebuild artefact.

glib-2.30 (coming in September) will need python both at buildtime and runtime for the new gdbus-codegen tool. Of course, if you aren't doing software development on your router, the library part of glib will continue to run fine without python installed.

(Note to self: perhaps gdbus-codegen should be split off into a separate ebuild? Need to think about it...)

For now, you can work around this issue by adding dev-lang/python-2.7.1 to your router's /etc/portage/package.provided file (assuming you are, somehow, using portage on a machine that doesn't have python installed). Note that this workaround is not ideal because it will hide any *real* python dependencies that could arise in the future with another package.
Comment 3 Pacho Ramos gentoo-dev 2011-08-04 13:02:15 UTC
Grepping at sources looks like it could be needed for some tests, but tests should be skipped if dbus-python is missing now.

I also see this references:
glib/Makefile.in:@OS_UNIX_TRUE@     -e '1,1s|#! /usr/bin/env python\([0-9]\+\(\.[0-9]\+\)\?\)\?|#!${PYTHON}|' \
glib/Makefile.am:           -e '1,1s|#! /usr/bin/env python\([0-9]\+\(\.[0-9]\+\)\?\)\?|#!${PYTHON}|' \
glib/gen-iswide-table.py:#!/usr/bin/python
glib/update-pcre/update.sh:python $IN/make_utt.py
Comment 4 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-08-25 04:38:06 UTC
(In reply to comment #2)
> (Note to self: perhaps gdbus-codegen should be split off into a separate
> ebuild? Need to think about it...)

Fixed in gnome-next; gdbus-codegen is now a separate package. As a result, when glib-2.30 comes to portage (in September, most likely), it will not use python.eclass and will not have a runtime dependency on python.
Comment 5 Gilles Dartiguelongue (RETIRED) gentoo-dev 2011-08-25 08:47:02 UTC
Could this be backported to 2.28 ebuild ?
Comment 6 Marc-Antoine Perennou 2011-08-25 11:13:56 UTC
Wouldn't it be better to add a configure switch and a use flag to ship, or not, the gdbus-codegen tool and put it upstream ?
Comment 7 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-08-25 13:16:44 UTC
(In reply to comment #5)
> Could this be backported to 2.28 ebuild ?

In 2.28, the situation is even simpler: it doesn't have gdbus-codegen and only uses python for tests, so instead of inheriting python, we can do "sed -e 's:#!/usr/bin/env python:!/usr/bin/env python2:' -i gio/tests/gdbus-testserver.py".

(In reply to comment #6)
> Wouldn't it be better to add a configure switch and a use flag to ship, or not,
> the gdbus-codegen tool and put it upstream ?

No.

The user experience for Gentoo would be worse. If gdbus-codegen were a USE flag, users would be forced to recompile all of glib (5 minutes on a dual-core machine) if they wanted to install something that depended on the tool; by contrast, emerging a separate gdbus-codegen package is almost instantaneous, since it can avoid glib's build system entirely and simply copies a few .py files from the glib tarball.

And upstream would not want such a switch for the same reason that they would not want a switch to build just the headers or just the libraries, even though most distros (Debian, Fedora, etc.) split glib into separate "glib-devel" and "libglib" packages.
Comment 8 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-08-25 13:17:50 UTC
(In reply to comment #7)
> 's:#!/usr/bin/env python:!/usr/bin/env python2:'

Typo, should be 's:#!/usr/bin/env python:#!/usr/bin/env python2:'
Comment 9 Pacho Ramos gentoo-dev 2011-08-28 08:29:48 UTC
(In reply to comment #7)
> (In reply to comment #5)
> > Could this be backported to 2.28 ebuild ?
> 
> In 2.28, the situation is even simpler: it doesn't have gdbus-codegen and only
> uses python for tests, so instead of inheriting python, we can do "sed -e
> 's:#!/usr/bin/env python:!/usr/bin/env python2:' -i
> gio/tests/gdbus-testserver.py".
> 

But, I guess, python would still be needed at build time for that test, no? (but it would be only needed with USE="test")
Comment 10 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2011-09-21 15:29:51 UTC
Any news on this?

It would be really nice to not have python as a dependency :)
Comment 11 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-09-25 21:09:38 UTC
(In reply to comment #10)
> Any news on this?
> 
> It would be really nice to not have python as a dependency :)

Pythonless glib-2.29.something should be coming to portage soon™. Package-masked initially, of course.
Comment 12 Pacho Ramos gentoo-dev 2011-10-16 11:04:01 UTC
This won't be backported to 2.28, fixed in 2.30 (already in the tree)
Comment 13 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-12-16 17:25:29 UTC
*** Bug 394941 has been marked as a duplicate of this bug. ***