From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1S2pZJ-0004Et-5W for garchives@archives.gentoo.org; Wed, 29 Feb 2012 19:52:09 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D431BE0A7D; Wed, 29 Feb 2012 19:51:56 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9DCFCE0A4F for ; Wed, 29 Feb 2012 19:51:30 +0000 (UTC) Received: from [192.168.1.43] (unknown [96.231.195.26]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DBC58643ED for ; Wed, 29 Feb 2012 19:51:29 +0000 (UTC) Message-ID: <1330545088.15103.62.camel@rook> Subject: Re: [gentoo-dev] New eclass for Python From: Alexandre Rostovtsev To: gentoo-dev@lists.gentoo.org Date: Wed, 29 Feb 2012 14:51:28 -0500 In-Reply-To: <4F4D4380.9070909@gentoo.org> References: <4F4D4380.9070909@gentoo.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3 Content-Transfer-Encoding: 7bit Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 X-Archives-Salt: f754ddcb-4d28-4321-9e3f-629d6496a6dd X-Archives-Hash: fc69a1e6d1d5efc7a15b300bc1b0014e 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. 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. 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? 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), installs it only in /usr/bin (a package might want it in e.g. /usr/libexec or /usr/share/appname/scripts), 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(). -Alexandre.