From: Marius Bakke <mbakke@fastmail.com>
To: Hartmut Goebel <h.goebel@crazy-compilers.com>, guix-devel@gnu.org
Subject: Re: [PATCH 00/14] Change python-build-system (fixes bug 20765)
Date: Fri, 30 Sep 2016 15:39:09 +0100 [thread overview]
Message-ID: <87bmz5ih9u.fsf@ike.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <57EC008A.4030006@crazy-compilers.com>
[-- Attachment #1: Type: text/plain, Size: 902 bytes --]
Hartmut Goebel <h.goebel@crazy-compilers.com> writes:
> Am 28.09.2016 um 17:54 schrieb Marius Bakke:
>> Or push a branch somewhere?
>
> Branch is now available at
> <https://gitlab.com/htgoebel/guix/tree/python-build-system>
Thanks a lot for doing this!
After adding a couple of patches I'm able to build many python packages.
Patch #2 mostly emulates NixOS "shim" setup.py[0], required for packages
using distutils instead of setuptools.
Some packages really don't like the new configure flags however (scons).
Perhaps we should have them as default, but if #:configure-flags is set,
let them be overridden?
Also some packages are missing a dependency on "python-py"[1].
Perhaps we can set up a Hydra channel to deal with the fallout?
Cheers,
Marius
0: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/interpreters/python/run_setup.py
1: https://pypi.python.org/pypi/py/1.4.31
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-guix-python-build-system-fix-configure-flag-append-f.patch --]
[-- Type: text/x-patch, Size: 1261 bytes --]
From a12000dd320cebeb920a4f790fe9206a2b6bda41 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Thu, 29 Sep 2016 18:29:21 +0100
Subject: [PATCH 1/2] guix: python-build-system: fix configure flag append
(followup to dba07a8d1)
---
guix/build/python-build-system.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm
index 8d4d6d3..d07b83f 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -65,11 +65,11 @@
#:allow-other-keys)
"Install a given Python package."
(let* ((out (assoc-ref outputs "out"))
- (params (append (list (string-append "--prefix=" out))
- "--single-version-externally-managed"
- "--root=/"
+ (params (append (list (string-append "--prefix=" out)
+ "--single-version-externally-managed"
+ "--root=/")
configure-flags)))
- (call-setuppy "install" params)))
+ (call-setuppy "install" params)))
(define* (wrap #:key inputs outputs #:allow-other-keys)
(define (list-of-files dir)
--
2.10.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-guix-python-build-system-Import-setuptools-before-ca.patch --]
[-- Type: text/x-patch, Size: 1559 bytes --]
From 84fa3e8be3d3d868ddb9278a96807086415b754d Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Thu, 29 Sep 2016 18:41:35 +0100
Subject: [PATCH 2/2] guix: python-build-system: Import setuptools before
calling `setup.py'.
This is needed for packages using "distutils" instead of "setuptools"
since the former does not understand the
"--single-version-externally-managed" flag. Also export __file__ since
it will be unset when setup.py is called from python "exec".
* guix/build/python-build-system.scm (call-setuppy): extend
"python setup.py" call to import setuptools, export __file__, and
call setup.py from setuptools python environment.
---
guix/build/python-build-system.scm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm
index d07b83f..4362c48 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -42,7 +42,11 @@
(begin
(format #t "running \"python setup.py\" with command ~s and parameters ~s~%"
command params)
- (zero? (apply system* "python" "setup.py" command params)))
+ (zero? (apply system* "python"
+ "-c" (string-append "import setuptools;"
+ "__file__='setup.py';"
+ "exec(open('setup.py').read())")
+ command params)))
(error "no setup.py found")))
(define* (build #:rest empty)
--
2.10.0
next prev parent reply other threads:[~2016-09-30 14:39 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-28 13:58 [PATCH 00/14] Change python-build-system (fixes bug 20765) Hartmut Goebel
2016-09-28 13:58 ` [PATCH 01/14] gnu: ensure pip and setuptools are installed even for Python 2 Hartmut Goebel
2016-09-28 13:58 ` [PATCH 02/14] guix: build all Python packages with --single-version-externally-managed Hartmut Goebel
2016-09-28 13:58 ` [PATCH 03/14] guix: Add lint-checker for packages which should be no inputs at all Hartmut Goebel
2016-09-28 13:58 ` [PATCH 04/14] gnu: python-setuptools: remove pre-built binaries Hartmut Goebel
2016-09-28 13:58 ` [PATCH 05/14] gnu: Remove python-setuptools and python2-setuptools from inputs (part 1) Hartmut Goebel
2016-09-28 13:58 ` [PATCH 06/14] gnu: Remove python-setuptools and python2-setuptools from inputs (part 2) Hartmut Goebel
2016-09-28 13:58 ` [PATCH 07/14] gnu: Remove python-setuptools and python2-setuptools from inputs (part 3) Hartmut Goebel
2016-09-28 13:58 ` [PATCH 08/14] gnu: Remove python-setuptools and python2-setuptools from inputs (part 4) Hartmut Goebel
2016-09-28 13:58 ` [PATCH 09/14] gnu: Remove python-setuptools and python2-setuptools from inputs (part 5a) Hartmut Goebel
2016-09-28 13:58 ` [PATCH 10/14] gnu: Remove python-setuptools and python2-setuptools from inputs (part 5b) Hartmut Goebel
2016-09-28 13:58 ` [PATCH 11/14] gnu: Remove needless inputs python-pip and python2-pip Hartmut Goebel
2016-09-28 13:58 ` [PATCH 12/14] lint: 'check-inputs-should-not-be-an-input-at-all' checks for python-pip Hartmut Goebel
2016-09-28 13:58 ` [PATCH 13/14] gnu: python-h5py: Remove needless "python2-variant" property Hartmut Goebel
2016-09-28 13:58 ` [PATCH 14/14] gnu: Remove work-arounds for bug 20765 (ensure uncompressed eggs) Hartmut Goebel
2016-09-28 14:03 ` [PATCH 00/14] Change python-build-system (fixes bug 20765) Hartmut Goebel
2016-09-28 15:54 ` Marius Bakke
2016-09-28 17:33 ` Hartmut Goebel
2016-09-28 17:40 ` Hartmut Goebel
2016-09-30 14:39 ` Marius Bakke [this message]
2016-10-02 9:05 ` Hartmut Goebel
2016-10-02 12:14 ` Hartmut Goebel
2016-10-02 14:24 ` Ludovic Courtès
2016-10-02 17:31 ` Hartmut Goebel
2016-10-02 18:01 ` Leo Famulari
2016-10-02 19:25 ` Marius Bakke
2016-10-10 13:24 ` Please set up Hydra channel for new python-build-system (was: [PATCH 00/14] Change python-build-system (fixes bug 20765)) Hartmut Goebel
2016-10-12 14:29 ` Leo Famulari
2016-10-12 14:37 ` Andreas Enge
2016-10-12 14:51 ` Leo Famulari
2016-10-13 8:17 ` Vincent Legoll
2016-10-03 9:31 ` [PATCH 00/14] Change python-build-system (fixes bug 20765) Hartmut Goebel
2016-10-04 21:39 ` Hartmut Goebel
2016-10-02 2:27 ` Leo Famulari
2016-10-02 2:46 ` Leo Famulari
2016-10-02 9:19 ` Hartmut Goebel
2016-10-02 9:18 ` Hartmut Goebel
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=87bmz5ih9u.fsf@ike.i-did-not-set--mail-host-address--so-tickle-me \
--to=mbakke@fastmail.com \
--cc=guix-devel@gnu.org \
--cc=h.goebel@crazy-compilers.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.