From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hartmut Goebel Subject: bug#20765: Compressed eggs (Python) Date: Mon, 18 Apr 2016 21:21:19 +0200 Message-ID: <571533AF.3040801@crazy-compilers.com> References: <87zj4btfuo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46034) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asEr3-0005uH-8o for bug-guix@gnu.org; Mon, 18 Apr 2016 15:29:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1asEqz-0003Ei-UI for bug-guix@gnu.org; Mon, 18 Apr 2016 15:29:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:55568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asEqz-0003Ee-SB for bug-guix@gnu.org; Mon, 18 Apr 2016 15:29:01 -0400 In-Reply-To: <87zj4btfuo.fsf@gnu.org> Sender: "Debbugs-submit" Resent-Message-ID: List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 20765@debbugs.gnu.org Hi, I support the proposal for switching to pip. Switching to pip should be save, since this is the proposed standard way for installing - and thus it should be save in the long run, too. I suggest calling pip with this options (valid as of pip 8.1.1) --no-deps Don't install package dependencies. --no-binary :all: Do not use binary packages. --no-index Ignore package index --disable-pip-version-check Since in the internet one can find issues with --single-version-externally-managed I verified that pip will even work for packages using distutils instead of setuptools. I did a test and inspecting the software. Here is what I did: I used a simply Python package which imports distutils instead of setuptools. Installing the via pip in verbose-mode shows this line (you do not need to look at the details): Running command /tmp/myvenv/bin/python2.7 -u -c "import setuptools, tokenize;__file__=3D'/tmp/pip-Biwi3y-build/setup.py';exec(compile(getattr= (tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-KcE_9O-record/install-record.txt --single-version-externally-managed --compile --install-headers /tmp/myvenv/include/site/python2.7/sample This basically runs the setup.py =E2=80=9Cwrapped=E2=80=9D into setuptool= s [1]. The source code of setuptools reviled that it is monkey-pathing distutils (esp. distutils.dist.Distribution) to objects from setuptools. So the more elaborate stuff of setuptools is used even if the setup.py only import distutils. Additionally I checked what --single-version-externally-managed does (since the documentation [2] is not that clear): it simply makes `install` use the "original" distutils install command, which was/is not able to create zipped eggs. So here we are on the save side, too. Tested with pip 8.1.1 and setuptools 20.3, but this same code is in pip 6.0 and setuptools 18.0 already (which are older than what is in guix 0.10.0) [1] Technically this line is executing a command which import setuptools and then executes setup.py the it the same scope/context. [2] https://pythonhosted.org/setuptools/setuptools.html#install-run-easy-inst= all-or-old-style-installation. --=20 Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |