From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Allan Webber Subject: Re: Python 3.5 start of update Date: Tue, 21 Jun 2016 10:44:44 -0500 Message-ID: <87mvmetukz.fsf@dustycloud.org> References: <3746864.VkbyMe6eV1@myrada> <20160304031506.GC30676@jasmine> <1457160701.30082.22.camel@ghic.org> <1457419942.28654.19.camel@ghic.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFNrD-0005h3-PC for guix-devel@gnu.org; Tue, 21 Jun 2016 11:44:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFNrA-00036I-Tt for guix-devel@gnu.org; Tue, 21 Jun 2016 11:44:54 -0400 Received: from dustycloud.org ([2600:3c02::f03c:91ff:feae:cb51]:34254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFNrA-00035j-NY for guix-devel@gnu.org; Tue, 21 Jun 2016 11:44:52 -0400 In-reply-to: <1457419942.28654.19.camel@ghic.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Diane Trout Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Building on both the work that Diane did and my recent patch for python 3.4.4, here's two patches which do both consecutively: the first patch updates python-3.4 to 3.4.4, and the second patch adds python-3.5 and sets this to be the default python. I'm interested in packaging Pulsar, but this requires Python 3.5 or higher, so these patches are a step towards it. Most of the work is Diane's. Thank you Diane! Great work :) - Chris --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-geiser-next.patch Content-Transfer-Encoding: quoted-printable >From bbc1f68204318d79ece3fa46ed71d7c21d6ec8a2 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Fri, 29 Apr 2016 17:53:50 -0500 Subject: [PATCH] gnu: Add geiser-next. Also, I previously committed to this repository in 2015; add self to copy= right headers for that year too. * gnu/packages/emacs.scm (geiser-next): New variable. --- gnu/packages/emacs.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 11010b2..7f904c0 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -7,6 +7,7 @@ ;;; Copyright =C2=A9 2015, 2016 Ricardo Wurmus ;;; Copyright =C2=A9 2016 Nils Gillmann ;;; Copyright =C2=A9 2016 Chris Marusich +;;; Copyright =C2=A9 2015, 2016 Christopher Allan Webber ;;; ;;; This file is part of GNU Guix. ;;; @@ -260,6 +261,33 @@ implementation, Emacs and, ultimately, the schemer, = giving them access to live metadata.") (license license:bsd-3))) =20 +(define-public geiser-next + ;; Geiser's upcoming version supports guile-next, and 0.8.1 does not. + ;; When the next Geiser release comes out, we can remove this. + (package (inherit geiser) + (name "geiser-next") + (version "20160428.4c8b3de") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jaor/geiser.git") + (commit "4c8b3dee30ce7258602bef356337def95fcccd7e"))= ) + (sha256 + (base32 + "1nr183438z52v62amq38ngd83nwgkxzgssya19f7v6f47im0b95j"))= )) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("texinfo" ,texinfo) + ,@(package-native-inputs geiser))) + (arguments + (substitute-keyword-arguments (package-arguments geiser) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'autogen + (lambda _ + (zero? (system* "sh" "autogen.sh")))))))))) + (define-public paredit (package (name "paredit") --=20 2.7.4 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0002-gnu-Add-python-3.5.patch Content-Transfer-Encoding: quoted-printable >From ec0797ceaed8f20b4dbbfb8fb96b2c4752e93f2e Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Tue, 21 Jun 2016 09:22:43 -0500 Subject: [PATCH 2/2] gnu: Add python-3.5. * gnu/packages/python.scm (python-3.5): New variable. (python-3.4): Inherit from python-3.5. (python-3): Switched alias to point to python-3.5. (python-minimal): Use the system-ffi as without-system-ffi caused the b= uild to fail when trying to import _ctypes. * gnu/packages/patches/python-fix-tests-py3.5.patch: New file. Patch Lib/test/test_pathlib.py to skip test_expanduser. Patch Lib/test/test_tarfile.py to ignore pwd.getpwuid and grp.getgrgid = tests for user root being of id 0. --- gnu/packages/patches/python-fix-tests-py3.5.patch | 35 +++++++++++++++++= ++++++ gnu/packages/python.scm | 31 ++++++++++++++---= --- 2 files changed, 58 insertions(+), 8 deletions(-) create mode 100644 gnu/packages/patches/python-fix-tests-py3.5.patch diff --git a/gnu/packages/patches/python-fix-tests-py3.5.patch b/gnu/pack= ages/patches/python-fix-tests-py3.5.patch new file mode 100644 index 0000000..47dded4 --- /dev/null +++ b/gnu/packages/patches/python-fix-tests-py3.5.patch @@ -0,0 +1,35 @@ +Additional test fixes which affect Python 3.5 (and presumably later) but= not +prior revisions of Python. + +--- Lib/test/test_pathlib.py 2014-03-01 03:02:36.088311000 +0100 ++++ Lib/test/test_pathlib.py 2014-03-01 04:56:37.768311000 +0100 +@@ -1986,8 +1986,9 @@ + expect =3D set() if not support.fs_is_case_insensitive(BASE) el= se given + self.assertEqual(given, expect) + self.assertEqual(set(p.rglob("FILEd*")), set()) +=20 ++ @unittest.skipIf(True, "Guix builder home is '/' which causes troub= le for these tests") + def test_expanduser(self): + P =3D self.cls + support.import_module('pwd') + import pwd +--- Lib/test/test_tarfile.py 2016-02-24 19:22:52.597208055 +0000 ++++ Lib/test/test_tarfile.py 2016-02-24 20:50:48.941950135 +0000 +@@ -2305,11 +2305,14 @@ + try: + import pwd, grp + except ImportError: + return False +- if pwd.getpwuid(0)[0] !=3D 'root': +- return False +- if grp.getgrgid(0)[0] !=3D 'root': ++ try: ++ if pwd.getpwuid(0)[0] !=3D 'root': ++ return False ++ if grp.getgrgid(0)[0] !=3D 'root': ++ return False ++ except KeyError: + return False + return True +=20 + =20 \ No newline at end of file diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 92535cb..0cb08ed 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -20,6 +20,7 @@ ;;; Copyright =C2=A9 2016 Danny Milosavljevic ;;; Copyright =C2=A9 2016 Lukas Gradl ;;; Copyright =C2=A9 2016 Hartmut Goebel +;;; Copyright =C2=A9 2016 Diane Trout ;;; ;;; This file is part of GNU Guix. ;;; @@ -269,21 +270,22 @@ data types.") ;; Current 2.x version. (define-public python-2 python-2.7) =20 -(define-public python-3.4 +(define-public python-3.5 (package (inherit python-2) - (version "3.4.4") + (version "3.5.1") (source (origin (method url-fetch) (uri (string-append "https://www.python.org/ftp/python/" version "/Python-" version ".tar.xz")) (patches (search-patches "python-fix-tests.patch" + "python-fix-tests-py3.5.patch" "python-3-deterministic-build-info.patch" "python-3-search-paths.patch")) (patch-flags '("-p0")) (sha256 (base32 - "18kb5c29w04rj4gyz3jngm72sy8izfnbjlm6ajv6rv2m061d75x7"))= )) + "1j95yx32ggqx8jf13h3c8qfp34ixpyg8ipqcdjmn143d6q67rmf6"))= )) (arguments (substitute-keyword-arguments (package-arguments python-2= ) ((#:tests? _) #t))) (native-search-paths @@ -293,8 +295,24 @@ data types.") (version-major+minor version) "/site-packages")))))))) =20 +(define-public python-3.4 + (package (inherit python-3.5) + (version "3.4.4") + (source (origin + (method url-fetch) + (uri (string-append "https://www.python.org/ftp/python/" + version "/Python-" version ".tar.xz")) + (patches (search-patches + "python-fix-tests.patch" + "python-3-deterministic-build-info.patch" + "python-3-search-paths.patch")) + (patch-flags '("-p0")) + (sha256 + (base32 + "18kb5c29w04rj4gyz3jngm72sy8izfnbjlm6ajv6rv2m061d75x7"))= )))) + ;; Current 3.x version. -(define-public python-3 python-3.4) +(define-public python-3 python-3.5) =20 ;; Current major version. (define-public python python-3) @@ -316,14 +334,11 @@ data types.") (package (inherit python) (name "python-minimal") (outputs '("out")) - (arguments - (substitute-keyword-arguments (package-arguments python) - ((#:configure-flags cf) - `(append ,cf '("--without-system-ffi"))))) =20 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib; ;; zlib is required by 'zipimport', used by pip. (inputs `(("openssl" ,openssl) + ("libffi" ,libffi) ; for ctypes ("zlib" ,zlib))))) =20 (define* (wrap-python3 python --=20 2.8.4 --=-=-=--