From b4370be9deca08f8347fbb0e2fc07edb1d18acd4 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 11 May 2016 02:25:22 -0400 Subject: gnu: python-cryptography, python-cryptography-vectors: Update to 1.3.2. * gnu/packages/python.scm (python-cryptography): Update to 1.3.2. (python-cryptography-vectors): Update to 1.3.2. --- gnu/packages/python.scm | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 7593fc71ac..c6643a6dd6 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -5837,16 +5837,18 @@ responses, rather than doing any computation.") (define-public python-cryptography-vectors (package (name "python-cryptography-vectors") - (version "1.3.1") + (version "1.3.2") (source (origin (method url-fetch) - (uri (string-append "https://pypi.python.org/packages/source/c/" - "cryptography-vectors/cryptography_vectors-" - version ".tar.gz")) + (uri (string-append + "https://pypi.python.org/packages/" + "3f/fd/" + "5883a7fdfcdf6edec55c58605be99d8c36ce97a9b729763ea9cf30e761b7" + "/cryptography_vectors-" version ".tar.gz")) (sha256 (base32 - "1144l3ypz3bngxd59lb4y74xa401w92lhvvjgxzglmvbh8wzkcbb")))) + "0ss682bpgzdfy2vam8yhhrx7p5gnw89ydlvaswqp52za8sd8nsh0")))) (build-system python-build-system) (native-inputs `(("python-setuptools" ,python-setuptools))) @@ -5863,14 +5865,18 @@ responses, rather than doing any computation.") (define-public python-cryptography (package (name "python-cryptography") - (version "1.3.1") + (version "1.3.2") (source (origin (method url-fetch) - (uri (pypi-uri "cryptography" version)) + (uri (string-append + "https://pypi.python.org/packages/" + "04/da/" + "35f9a1d34dab5d777f65fb87731288f338ab0ae46a525ffdf0405b573dd0" + "/cryptography-" version ".tar.gz")) (sha256 (base32 - "1qjkrpfvxcyd0kal3zpm5y7f9p3y77ixn9jw8f4dqpgrw1sn3cxl")))) + "121067qdbzd0ir0nxjdf0kgai7qlsc9yh2xhrj4cavcn4y4gmapv")))) (build-system python-build-system) (inputs `(("openssl" ,openssl))) -- cgit v1.3 From 7d0c3c8d018a4aff4ce42f863ce81242555ab119 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 16 May 2016 17:36:58 +0300 Subject: gnu: python-pandas: Update to 0.18.1. * gnu/packages/python.scm (python-pandas): Update to 0.18.1. [native-inputs]: Remove python-setuptools. [properties]: Define python2-pandas. (python2-pandas)[native-inputs]: Add python2-setuptools. * gnu/packages/patches/python-pandas-fix-tslib-test-failure.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - .../python-pandas-fix-tslib-test-failure.patch | 141 --------------------- gnu/packages/python.scm | 28 ++-- 3 files changed, 14 insertions(+), 156 deletions(-) delete mode 100644 gnu/packages/patches/python-pandas-fix-tslib-test-failure.patch (limited to 'gnu/packages/python.scm') diff --git a/gnu/local.mk b/gnu/local.mk index f366be40b4..f64adebb41 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -705,7 +705,6 @@ dist_patch_DATA = \ gnu/packages/patches/python-paste-remove-website-test.patch \ gnu/packages/patches/python-paste-remove-timing-test.patch \ gnu/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ - gnu/packages/patches/python-pandas-fix-tslib-test-failure.patch \ gnu/packages/patches/qt4-ldflags.patch \ gnu/packages/patches/ratpoison-shell.patch \ gnu/packages/patches/readline-link-ncurses.patch \ diff --git a/gnu/packages/patches/python-pandas-fix-tslib-test-failure.patch b/gnu/packages/patches/python-pandas-fix-tslib-test-failure.patch deleted file mode 100644 index 62d6a38086..0000000000 --- a/gnu/packages/patches/python-pandas-fix-tslib-test-failure.patch +++ /dev/null @@ -1,141 +0,0 @@ -This patch is required to fix a test failure when python-dateutil version -2.5.2 or later is used. It is derived from the following commits: - -80ef4e06526b9b60cf24268454c9456585a790a3 -845ff974af6f7c3b3067cce8a7149b771c2be87 - -diff --git a/pandas/tseries/tests/test_tslib.py b/pandas/tseries/tests/test_tslib.py -index f0d5bf7..863bc6f 100644 ---- a/pandas/tseries/tests/test_tslib.py -+++ b/pandas/tseries/tests/test_tslib.py -@@ -474,6 +474,11 @@ def test_does_not_convert_mixed_integer(self): - good_date_string)) - - def test_parsers(self): -+ -+ # https://github.com/dateutil/dateutil/issues/217 -+ import dateutil -+ yearfirst = dateutil.__version__ >= LooseVersion('2.5.0') -+ - cases = {'2011-01-01': datetime.datetime(2011, 1, 1), - '2Q2005': datetime.datetime(2005, 4, 1), - '2Q05': datetime.datetime(2005, 4, 1), -@@ -527,20 +532,26 @@ def test_parsers(self): - } - - for date_str, expected in compat.iteritems(cases): -- result1, _, _ = tools.parse_time_string(date_str) -- result2 = to_datetime(date_str) -- result3 = to_datetime([date_str]) -- result4 = to_datetime(np.array([date_str], dtype=object)) -- result5 = Timestamp(date_str) -- result6 = DatetimeIndex([date_str])[0] -- result7 = date_range(date_str, freq='S', periods=1) -+ result1, _, _ = tools.parse_time_string(date_str, -+ yearfirst=yearfirst) -+ result2 = to_datetime(date_str, yearfirst=yearfirst) -+ result3 = to_datetime([date_str], yearfirst=yearfirst) -+ result4 = to_datetime(np.array([date_str], dtype=object), -+ yearfirst=yearfirst) -+ result6 = DatetimeIndex([date_str], yearfirst=yearfirst)[0] - self.assertEqual(result1, expected) - self.assertEqual(result2, expected) - self.assertEqual(result3, expected) - self.assertEqual(result4, expected) -- self.assertEqual(result5, expected) - self.assertEqual(result6, expected) -- self.assertEqual(result7, expected) -+ -+ # these really need to have yearfist, but we don't support -+ if not yearfirst: -+ result5 = Timestamp(date_str) -+ self.assertEqual(result5, expected) -+ result7 = date_range(date_str, freq='S', periods=1, -+ yearfirst=yearfirst) -+ self.assertEqual(result7, expected) - - # NaT - result1, _, _ = tools.parse_time_string('NaT') -@@ -589,23 +589,62 @@ def test_parsers_quarter_invalid(self): - self.assertRaises(ValueError, tools.parse_time_string, case) - - def test_parsers_dayfirst_yearfirst(self): -+ -+ # https://github.com/dateutil/dateutil/issues/217 -+ # this issue was closed -+ import dateutil -+ is_compat_version = dateutil.__version__ >= LooseVersion('2.5.2') -+ if is_compat_version: -+ dayfirst_yearfirst1 = datetime.datetime(2010, 12, 11) -+ dayfirst_yearfirst2 = datetime.datetime(2020, 12, 21) -+ else: -+ dayfirst_yearfirst1 = datetime.datetime(2010, 11, 12) -+ dayfirst_yearfirst2 = datetime.datetime(2020, 12, 21) -+ - # str : dayfirst, yearfirst, expected -- cases = {'10-11-12': [(False, False, datetime.datetime(2012, 10, 11)), -- (True, False, datetime.datetime(2012, 11, 10)), -- (False, True, datetime.datetime(2010, 11, 12)), -- (True, True, datetime.datetime(2010, 11, 12))], -- '20/12/21': [(False, False, datetime.datetime(2021, 12, 20)), -- (True, False, datetime.datetime(2021, 12, 20)), -- (False, True, datetime.datetime(2020, 12, 21)), -- (True, True, datetime.datetime(2020, 12, 21))]} -+ cases = {'10-11-12': [(False, False, False, -+ datetime.datetime(2012, 10, 11)), -+ (True, False, False, -+ datetime.datetime(2012, 11, 10)), -+ (False, True, False, -+ datetime.datetime(2010, 11, 12)), -+ (True, True, False, dayfirst_yearfirst1)], -+ '20/12/21': [(False, False, False, -+ datetime.datetime(2021, 12, 20)), -+ (True, False, False, -+ datetime.datetime(2021, 12, 20)), -+ (False, True, False, -+ datetime.datetime(2020, 12, 21)), -+ (True, True, True, dayfirst_yearfirst2)]} - - tm._skip_if_no_dateutil() - from dateutil.parser import parse - for date_str, values in compat.iteritems(cases): -- for dayfirst, yearfirst, expected in values: -- result1, _, _ = tools.parse_time_string(date_str, -- dayfirst=dayfirst, -- yearfirst=yearfirst) -+ for dayfirst, yearfirst, is_compat, expected in values: -+ -+ f = lambda x: tools.parse_time_string(x, -+ dayfirst=dayfirst, -+ yearfirst=yearfirst) -+ -+ # we now have an invalid parse -+ if is_compat and is_compat_version: -+ self.assertRaises(tslib.DateParseError, f, date_str) -+ -+ def f(date_str): -+ return to_datetime(date_str, dayfirst=dayfirst, -+ yearfirst=yearfirst) -+ -+ self.assertRaises(ValueError, f, date_str) -+ -+ def f(date_str): -+ return DatetimeIndex([date_str], dayfirst=dayfirst, -+ yearfirst=yearfirst)[0] -+ -+ self.assertRaises(ValueError, f, date_str) -+ -+ continue -+ -+ result1, _, _ = f(date_str) - - result2 = to_datetime(date_str, dayfirst=dayfirst, - yearfirst=yearfirst) -@@ -614,7 +653,6 @@ def test_parsers_dayfirst_yearfirst(self): - yearfirst=yearfirst)[0] - - # Timestamp doesn't support dayfirst and yearfirst -- - self.assertEqual(result1, expected) - self.assertEqual(result2, expected) - self.assertEqual(result3, expected) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index c6643a6dd6..6eb244356b 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -983,15 +983,16 @@ datetime module, available in Python 2.3+.") (define-public python-pandas (package (name "python-pandas") - (version "0.18.0") + (version "0.18.1") (source (origin (method url-fetch) - (uri (pypi-uri "pandas" version)) + (uri (string-append + "https://pypi.python.org/packages/11/09/" + "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/" + "pandas-" version ".tar.gz")) (sha256 - (base32 "050qw0ap5bhyv5flp78x3lcq1dlminl3xaj6kbrm0jqmx0672xf9")) - (patches (search-patches - "python-pandas-fix-tslib-test-failure.patch")))) + (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j")))) (build-system python-build-system) (propagated-inputs `(("python-numpy" ,python-numpy))) @@ -999,8 +1000,7 @@ datetime module, available in Python 2.3+.") `(("python-pytz" ,python-pytz) ("python-dateutil" ,python-dateutil-2))) (native-inputs - `(("python-nose" ,python-nose) - ("python-setuptools" ,python-setuptools))) + `(("python-nose" ,python-nose))) (home-page "http://pandas.pydata.org") (synopsis "Data structures for data analysis, time series, and statistics") (description @@ -1009,15 +1009,15 @@ structures designed to make working with structured (tabular, multidimensional, potentially heterogeneous) and time series data both easy and intuitive. It aims to be the fundamental high-level building block for doing practical, real world data analysis in Python.") - (license bsd-3))) + (license bsd-3) + (properties `((python2-variant . ,(delay python2-pandas)))))) (define-public python2-pandas - (let ((pandas (package-with-python2 python-pandas))) - (package (inherit pandas) - (propagated-inputs - `(("python2-numpy" ,python2-numpy) - ,@(alist-delete "python-numpy" - (package-propagated-inputs pandas))))))) + (let ((base (package-with-python2 (strip-python2-variant python-pandas)))) + (package + (inherit base) + (native-inputs `(("python2-setuptools" ,python2-setuptools) + ,@(package-inputs base)))))) (define-public python-tzlocal (package -- cgit v1.3 From dbd40ac19df16bb2ef0387c5fcbe8103b6b64840 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 18 May 2016 10:52:41 +0300 Subject: gnu: python2-pandas: Fix native-inputs. * gnu/packages/python.scm (python2-pandas)[native-inputs]: Use python2- versions of python-panda's native-inputs, not of inputs. --- gnu/packages/python.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 6eb244356b..1929f83a16 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -1017,7 +1017,7 @@ doing practical, real world data analysis in Python.") (package (inherit base) (native-inputs `(("python2-setuptools" ,python2-setuptools) - ,@(package-inputs base)))))) + ,@(package-native-inputs base)))))) (define-public python-tzlocal (package -- cgit v1.3 From 458480235b85ce31db5485251f94415cfdddeff0 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Sun, 15 May 2016 11:51:54 +0200 Subject: gnu: python: Add 'python' variables for different major/minor versions. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python.scm (python-2): Rename variable to... (python-2.7): ...this. (python-2): Refer to "python-2.7". (python): Rename variable to... (python-3.4): ...this. (python-3): Refer to "python-3.4". (python): Refer to "python-3". Signed-off-by: Ludovic Courtès --- gnu/packages/python.scm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 1929f83a16..37c8594a37 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -90,7 +90,7 @@ #:use-module (guix build-system trivial) #:use-module (srfi srfi-1)) -(define-public python-2 +(define-public python-2.7 (package (name "python") (version "2.7.10") @@ -262,7 +262,10 @@ packages; exception-based error handling; and very high level dynamic data types.") (license psfl))) -(define-public python +;; Current 2.x version. +(define-public python-2 python-2.7) + +(define-public python-3.4 (package (inherit python-2) (version "3.4.3") (source (origin @@ -288,6 +291,12 @@ data types.") (version-major+minor version) "/site-packages")))))))) +;; Current 3.x version. +(define-public python-3 python-3.4) + +;; Current major version. +(define-public python python-3) + ;; Minimal variants of Python, mostly used to break the cycle between Tk and ;; Python (Tk -> libxcb -> Python.) -- cgit v1.3 From 88bb4197c419d6095cc4061bac1ee0f96bf939b1 Mon Sep 17 00:00:00 2001 From: Lukas Gradl Date: Sat, 21 May 2016 18:19:42 -0500 Subject: gnu: Add python2-rope. * gnu/packages/python.scm (python2-rope): New variable. --- gnu/packages/python.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 37c8594a37..602da2d5ca 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2015 Kyle Meyer ;;; Copyright © 2015, 2016 Chris Marusich ;;; Copyright © 2016 Danny Milosavljevic +;;; Copyright © 2016 Lukas Gradl ;;; ;;; This file is part of GNU Guix. ;;; @@ -8760,3 +8761,30 @@ respectively.") (description (string-append "This is an experimental compiler for a subset of Python. It generates C++ code and a Makefile.")) (license (list gpl3 bsd-3 license:expat)))) + +(define-public python2-rope + (package + (name "python2-rope") + (version "0.10.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "rope" version)) + (sha256 + (base32 + "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb")))) + (arguments + ;; Rope is currently python-2 only. + ;; https://github.com/python-rope/rope/issues/57 + `(#:python ,python-2)) + (build-system python-build-system) + (native-inputs + `(("python2-unittest2" ,python2-unittest2) + ("python2-setuptools" ,python2-setuptools))) + (home-page "https://github.com/python-rope/rope") + (synopsis "Refactoring library for Python") + (description "Rope is a refactoring library for Python. It facilitates +the renaming, moving and extracting of attributes, functions, modules, fields +and parameters in Python 2 source code. These refactorings can also be applied +to occurences in strings and comments.") + (license gpl2))) -- cgit v1.3