From: Krzysztof Pawlik <nelchael@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: Alexandre Rostovtsev <tetromino@gentoo.org>
Subject: Re: [gentoo-dev] New eclass for Python
Date: Wed, 29 Feb 2012 21:24:49 +0100 [thread overview]
Message-ID: <4F4E8991.8040907@gentoo.org> (raw)
In-Reply-To: <1330545088.15103.62.camel@rook>
[-- Attachment #1: Type: text/plain, Size: 4224 bytes --]
On 29/02/12 20:51, Alexandre Rostovtsev wrote:
> On Tue, 2012-02-28 at 22:13 +0100, Krzysztof Pawlik wrote:
>> Hello,
>>
>> After some work during weekend on Python packages I've decided to start a
>> rewrite of Python/distutils eclass for installing Python packages. My main goal
>> was simplicity and functionality similar to ruby-ng.eclass (thanks Ruby team for
>> your great work!). Python team members already contributed comments and
>> suggestions and helped me to make the eclass better, thank you!
>>
>> Highlights:
>> - *SIMPLE*next
>> - uses PYTHON_TARGETS use-expand (no more python-updater, whoooo!)
>> - EAPI4 required, uses REQUIRED_USE
>> - <400 lines of code including documentation
>> - should work for >95% of packages (my educated guess)
>> - did I mention it's *SIMPLE*?
>> - easy to maintain & read so it's also easy to use
>>
>> Important thing: I'm not aiming at having 100% functionality of current
>> python.eclass+distutils.eclass in the new one, I think that simplicity is more
>> important that supporting every possible, obscure case that's out there.
>>
>> I'm attaching the eclass itself and two ebuilds using it, code is also available
>> in my overlay at http://git.overlays.gentoo.org/gitweb/?p=dev/nelchael.git;a=summary
>>
>> If there are no objections then during the weekend (March 3, 4) I will add this
>> to portage (after finishing remaining TODO items, PyPy requires 4G of RAM(!!)).
>
> The proposed eclass omits three features from python.eclass which are
> heavily used in the gnome stack.
Correct me if I'm wrong, but Gnome doesn't use standard distutils?
Regardless of this eclass you can still use python.eclass, it not going anywhere
anytime soon (just like I wrote in one of previous e-mails).
> First, it does not set EPYTHON, which is a problem for the many packages
> whose build systems execute /usr/bin/python and assume that it's a
> generic python2 or the same version of python2.x for which the package
> is being built.
Setting EPYTHON is not a problem -- just another variable.
> Second, there doesn't seem to be any support for packages that do not
> install in python's site-packages and do not allow multiple python ABIs.
> If I have, for example, a package that installs python modules
> in /usr/lib/appname or /usr/share/appname, how can I specify that
> PYTHON_TARGETS="python2.6" or "python2.7" or "python3.2" is allowed, but
> something like PYTHON_TARGETS="python2.7 python3.2" is not?
You're correct, note that I've stressed that this eclass is mainly for
distutils-based packages. I'm not using Gnome, so can you provide some package
examples that I can look at?
<personal opinion>
If package decides to use given language then please, please play by the rules
set by the rest of world (Ruby -> gems, Python -> distutils, Perl -> CPAN, PHP
-> PEAR).
I don't like installing Python code outside of site-packages, the only exception
to that rule is portage (at least for now).
</personal opinion>
> Third, python-distutils-ng_doscript() installs only one file at a time
> (no built-in support for multiple files at a time or for recursing
> through a directory tree),
Yes, that why bash has `for' loop ;)
> installs it only in /usr/bin (a package might
> want it in e.g. /usr/libexec or /usr/share/appname/scripts)
Yes, I might add --destdir (or something like that) later on.
> and always
> creates scriptname-IMPLEMENTATION (polluting tab-completion in /usr/bin
> for the common case of programs that do not support multiple python
> ABIs). As a result, it is far less useful than python.eclass's
> python_convert_shebangs().
Yes, that "pollutes" this name space, but I'm not buying this argument. Do you
know how CVS and .svn "pollute" my tab-completion list? I even set FIGNORE so I
can live with it.
I'd be happy to hear how to solve this - what prefix or suffix to use? One way
would be quite trivial: if only one implementation is enabled do not create
script-${impl}, go with single file, does that sound good?
--
Krzysztof Pawlik <nelchael at gentoo.org> key id: 0xF6A80E46
desktop-misc, java, vim, kernel, python, apache...
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 554 bytes --]
next prev parent reply other threads:[~2012-02-29 20:25 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-28 21:13 [gentoo-dev] New eclass for Python Krzysztof Pawlik
2012-02-29 3:21 ` Sergei Trofimovich
2012-02-29 17:34 ` Krzysztof Pawlik
2012-02-29 5:13 ` [gentoo-dev] Re: [gentoo-python] " Mike Gilbert
2012-02-29 17:35 ` Krzysztof Pawlik
2012-02-29 7:49 ` [gentoo-dev] " "Paweł Hajdan, Jr."
2012-02-29 17:38 ` Krzysztof Pawlik
2012-02-29 18:03 ` Jeroen Roovers
2012-02-29 8:11 ` [gentoo-dev] Re: [gentoo-python] " Dirkjan Ochtman
2012-02-29 17:39 ` Krzysztof Pawlik
2012-02-29 18:39 ` Mike Gilbert
2012-02-29 8:17 ` [gentoo-dev] " Fabian Groffen
2012-02-29 17:34 ` Krzysztof Pawlik
2012-02-29 19:51 ` Alexandre Rostovtsev
2012-02-29 20:24 ` Krzysztof Pawlik [this message]
2012-02-29 21:08 ` Andreas K. Huettel
2012-02-29 21:19 ` Krzysztof Pawlik
2012-02-29 21:57 ` Alexandre Rostovtsev
2012-03-01 18:42 ` Krzysztof Pawlik
2012-03-03 7:59 ` [gentoo-dev] Re: [gentoo-python] " Arfrever Frehtes Taifersar Arahesis
2012-03-03 8:18 ` Zac Medico
2012-03-25 18:56 ` [gentoo-dev] " Krzysztof Pawlik
2012-03-25 19:08 ` Luca Barbato
2012-03-26 7:20 ` justin
2012-03-26 16:11 ` Krzysztof Pawlik
2012-03-26 16:23 ` Krzysztof Pawlik
2012-04-04 8:50 ` Corentin Chary
2012-04-04 14:22 ` Mike Gilbert
2012-04-04 14:29 ` Corentin Chary
2012-04-04 14:41 ` Mike Gilbert
2012-04-05 0:07 ` Brian Harring
2012-04-05 0:36 ` Mike Gilbert
2012-04-05 0:45 ` Brian Harring
2012-03-26 7:21 ` justin
2012-03-26 16:02 ` Krzysztof Pawlik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F4E8991.8040907@gentoo.org \
--to=nelchael@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
--cc=tetromino@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox