diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-10-08 00:05:34 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-10-08 00:05:34 +0200 |
commit | 6a20289d5a38520fd79e80c256a0315c96a46347 (patch) | |
tree | 453242901e55b21078e621aaccfe325109982b79 /gnu/packages/python.scm | |
parent | afa181fff435b4e549092c2639e8165069082755 (diff) | |
download | guix-6a20289d5a38520fd79e80c256a0315c96a46347.tar guix-6a20289d5a38520fd79e80c256a0315c96a46347.tar.gz |
gnu: python: Simplify list of configure flags.
* gnu/packages/patches/python-2.7-search-paths.patch,
gnu/packages/patches/python-3-search-paths.patch: New files.
* gnu-system.am (dist_patch_DATA): Add them.
* gnu/packages/python.scm (python-2)[source]: Use first patch.
[arguments]: Remove now unneeded CPPFLAGS and LDFLAGS.
(python)[source]: Use second patch.
(python-minimal)[arguments]: Remove CPPFLAGS and LDFLAGS.
Diffstat (limited to 'gnu/packages/python.scm')
-rw-r--r-- | gnu/packages/python.scm | 66 |
1 files changed, 14 insertions, 52 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index b512e77bbf..5dea76f0bc 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -86,7 +86,8 @@ version "/Python-" version ".tar.xz")) (sha256 (base32 - "1h7zbrf9pkj29hlm18b10548ch9757f75m64l47sy75rh43p7lqw")))) + "1h7zbrf9pkj29hlm18b10548ch9757f75m64l47sy75rh43p7lqw")) + (patches (list (search-patch "python-2.7-search-paths.patch"))))) (build-system gnu-build-system) (arguments `(#:tests? #f @@ -132,43 +133,10 @@ ;; such file or directory #:test-target "test" #:configure-flags - (let ((bz2 (assoc-ref %build-inputs "bzip2")) - (gdbm (assoc-ref %build-inputs "gdbm")) - (libffi (assoc-ref %build-inputs "libffi")) - (sqlite (assoc-ref %build-inputs "sqlite")) - (openssl (assoc-ref %build-inputs "openssl")) - (readline (assoc-ref %build-inputs "readline")) - (zlib (assoc-ref %build-inputs "zlib")) - (tk (assoc-ref %build-inputs "tk")) - (tcl (assoc-ref %build-inputs "tcl")) - (out (assoc-ref %outputs "out"))) - (list "--enable-shared" ; allow embedding - "--with-system-ffi" ; build ctypes - - ;; configure/setup.py doesn't use pkg-config to find Tcl/Tk. - (string-append "--with-tcltk-includes=-I" tk "/include -I" - tcl "/include") - (string-append "--with-tcltk-libs=-L" tk "/lib -ltk" "" - ,(version-prefix (package-version tk) 2) - " -L" tcl "/lib -ltcl" - ,(version-prefix (package-version tcl) 2)) - - (string-append "CPPFLAGS=" - "-I" bz2 "/include " - "-I" gdbm "/include " - "-I" sqlite "/include " - "-I" openssl "/include " - "-I" readline "/include " - "-I" zlib "/include") - (string-append "LDFLAGS=" - "-L" bz2 "/lib " - "-L" gdbm "/lib " - "-L" libffi "/lib " - "-L" sqlite "/lib " - "-L" openssl "/lib " - "-L" readline "/lib " - "-L" zlib "/lib " - "-Wl,-rpath=" out "/lib"))) + (list "--enable-shared" ;allow embedding + "--with-system-ffi" ;build ctypes + (string-append "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib")) #:modules ((ice-9 ftw) ,@%gnu-build-system-modules) @@ -257,9 +225,11 @@ data types.") (method url-fetch) (uri (string-append "https://www.python.org/ftp/python/" version "/Python-" version ".tar.xz")) - (patches (list (search-patch "python-fix-tests.patch") - ;; XXX Try removing this patch for python > 3.4.3 - (search-patch "python-disable-ssl-test.patch"))) + (patches (map search-patch + '("python-fix-tests.patch" + ;; XXX Try removing this patch for python > 3.4.3 + "python-disable-ssl-test.patch" + "python-3-search-paths.patch"))) (patch-flags '("-p0")) (sha256 (base32 @@ -293,17 +263,9 @@ data types.") (arguments (substitute-keyword-arguments (package-arguments python) ((#:configure-flags _) - `(let ((openssl (assoc-ref %build-inputs "openssl")) - (zlib (assoc-ref %build-inputs "zlib")) - (out (assoc-ref %outputs "out"))) - (list "--enable-shared" - (string-append "CPPFLAGS=" - "-I" openssl "/include " - "-I" zlib "/include ") - (string-append "LDFLAGS=" - "-L" openssl "/lib " - "-L" zlib "/lib " - "-Wl,-rpath=" out "/lib")))))) + `(list "--enable-shared" + (string-append "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib"))))) ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib; ;; zlib is required by 'zipimport', used by pip. |