Patchwork python-build-system: Allow build flags

login
register
mail settings
Submitter Danny Milosavljevic
Date Sept. 22, 2016, 9:26 a.m.
Message ID <20160922112602.3193360b@scratchpost.org>
Download mbox | patch
Permalink /patch/15893/
State New
Headers show

Comments

Danny Milosavljevic - Sept. 22, 2016, 9:26 a.m.
> I just checked - the python-build-system doesn't allow passing flags when invoking setup.py . That's the only reason the custom build phase is there...

We could adapt python-build-system like that:


How can I check which rebuilds that would cause? Seems to rebuild quite a bit on my local machine when I try to install python2-wxpython now.

Patch

diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm
index 9109fb4..6304f0c 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -44,9 +44,9 @@ 
          (zero? (apply system* "python" "setup.py" command params)))
       (error "no setup.py found")))
 
-(define* (build #:rest empty)
+(define* (build #:key (build-flags '()) #:allow-other-keys)
   "Build a given Python package."
-  (call-setuppy "build" '()))
+  (call-setuppy "build" build-flags))
 
 (define* (check #:key tests? test-target #:allow-other-keys)
   "Run the test suite of a given Python package."