Gentoo Archives: gentoo-python

From: Mike Gilbert <floppym@g.o>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-python <gentoo-python@l.g.o>
Subject: Re: [gentoo-python] python_get_version replacement
Date: Mon, 26 Aug 2013 21:11:17
Message-Id: CAJ0EP427HgnJYywzF9-y-LiU76JU8wf12PJXwcVQFuYphkUHVA@mail.gmail.com
In Reply to: Re: [gentoo-python] python_get_version replacement by "Michał Górny"
1 On Mon, Aug 26, 2013 at 4:21 PM, Michał Górny <mgorny@g.o> wrote:
2 > Dnia 2013-08-25, o godz. 21:51:17
3 > Mike Gilbert <floppym@g.o> napisał(a):
4 >
5 >> I just committed this somewhat ugly code in twisted-core-13.0.0-r2.ebuild.
6 >>
7 >> # Bug 299736
8 >> local pyver=$("${PYTHON}" -c 'import sys; print("%d.%d" %
9 >> sys.version_info[:2])')
10 >> touch "${D%/}${PYTHON_SITEDIR}/Twisted-${PV}-py${pyver}.egg-info"
11 >>
12 >> This takes the place of a python_get_version -l call from the old python.eclass.
13 >>
14 >> Is this something that we should provide in the new eclasses?
15 >
16 > I don't really feel like we should be touching egg-info like this.
17 >
18 > By the way, doesn't the 'bundle' egg-info imply pulling in all Twisted
19 > packages rather than -core itself?
20 >
21
22 You could look at it that way; however, we also need to keep in mind
23 that it was designed for easy_install / pip. As well, the download
24 page[1] at Twisted upstream literally says "You probably don't want
25 these unless you have special consideration" in the section containing
26 the individual project tarballs, so our installation method could
27 already be considered non-standard.
28
29 With portage, we express more precise dependencies at the ebuild
30 level, so the dependencies that end up in egg-info/requires.txt are
31 largely irrelevant. The above code just fakes it out so that
32 pkg_requires doesn't throw an exception.
33
34 An alternative would be to patch setup.py for any package which sets
35 install_requires="Twisted". Said patches would probably not be
36 accepted by any upstream.
37
38 [1] http://twistedmatrix.com/trac/wiki/Downloads

Replies

Subject Author
Re: [gentoo-python] python_get_version replacement "Michał Górny" <mgorny@g.o>