[Git][debian-gis-team/cftime][master] 2 commits: Add upstream patch to fix FTBFS on 32bit architectures.
Bas Couwenberg
gitlab at salsa.debian.org
Sun Dec 2 17:35:22 GMT 2018
Bas Couwenberg pushed to branch master at Debian GIS Project / cftime
Commits:
466bfe9a by Bas Couwenberg at 2018-12-02T17:19:32Z
Add upstream patch to fix FTBFS on 32bit architectures.
- - - - -
1a90cd94 by Bas Couwenberg at 2018-12-02T17:20:00Z
Set distribution to unstable.
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/pr94_numpy-int32.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+cftime (1.0.3-2) unstable; urgency=medium
+
+ * Add upstream patch to fix FTBFS on 32bit architectures.
+
+ -- Bas Couwenberg <sebastic at debian.org> Sun, 02 Dec 2018 18:19:52 +0100
+
cftime (1.0.3-1) unstable; urgency=medium
* New upstream release.
=====================================
debian/patches/pr94_numpy-int32.patch
=====================================
@@ -0,0 +1,82 @@
+Description: Fix FTBFS on 32bit architectures.
+ TypeError: object of type 'numpy.int32' has no len()
+Author: Jeff Whitaker <jswhit at fastmail.fm>
+Origin: https://github.com/Unidata/cftime/pull/94
+Bug: https://github.com/Unidata/cftime/issues/93
+
+--- a/cftime/_cftime.pyx
++++ b/cftime/_cftime.pyx
+@@ -455,7 +455,7 @@ def DateFromJulianDay(JD, calendar='stan
+ # get the day (Z) and the fraction of the day (F)
+ # use 'round half up' rounding instead of numpy's even rounding
+ # so that 0.5 is rounded to 1.0, not 0 (cftime issue #49)
+- Z = np.int32(_round_half_up(julian))
++ Z = np.atleast_1d(np.int32(_round_half_up(julian)))
+ F = (julian + 0.5 - Z).astype(np.longdouble)
+
+ cdef Py_ssize_t i_max = len(Z)
+@@ -498,7 +498,7 @@ def DateFromJulianDay(JD, calendar='stan
+ # recomputing year,month,day etc
+ # ms_eps is proportional to julian day,
+ # about 47 microseconds in 2000 for Julian base date in -4713
+- ms_eps = np.array(np.finfo(np.float64).eps,np.longdouble)
++ ms_eps = np.atleast_1d(np.array(np.finfo(np.float64).eps,np.longdouble))
+ ms_eps = 86400000000.*np.maximum(ms_eps*julian, ms_eps)
+ microsecond = np.where(microsecond < ms_eps, 0, microsecond)
+ indxms = microsecond > 1000000-ms_eps
+--- a/test/test_cftime.py
++++ b/test/test_cftime.py
+@@ -354,7 +354,7 @@ class cftimeTestCase(unittest.TestCase):
+ assert(err < eps)
+ assert(date1.strftime(dateformat) == date2.strftime(dateformat))
+ if verbose:
+- print('calender = %s max abs err (microsecs) = %s eps = %s' % \
++ print('calendar = %s max abs err (microsecs) = %s eps = %s' % \
+ (calendar,maxerr,eps))
+ units = 'milliseconds since 1800-01-30 01:01:01'
+ eps = 0.1
+@@ -370,7 +370,7 @@ class cftimeTestCase(unittest.TestCase):
+ assert(err < eps)
+ assert(date1.strftime(dateformat) == date2.strftime(dateformat))
+ if verbose:
+- print('calender = %s max abs err (millisecs) = %s eps = %s' % \
++ print('calendar = %s max abs err (millisecs) = %s eps = %s' % \
+ (calendar,maxerr,eps))
+ eps = 1.e-3
+ units = 'seconds since 0001-01-30 01:01:01'
+@@ -386,7 +386,7 @@ class cftimeTestCase(unittest.TestCase):
+ assert(err < eps)
+ assert(date1.strftime(dateformat) == date2.strftime(dateformat))
+ if verbose:
+- print('calender = %s max abs err (secs) = %s eps = %s' % \
++ print('calendar = %s max abs err (secs) = %s eps = %s' % \
+ (calendar,maxerr,eps))
+ eps = 1.e-5
+ units = 'minutes since 0001-01-30 01:01:01'
+@@ -402,7 +402,7 @@ class cftimeTestCase(unittest.TestCase):
+ assert(err < eps)
+ assert(date1.strftime(dateformat) == date2.strftime(dateformat))
+ if verbose:
+- print('calender = %s max abs err (mins) = %s eps = %s' % \
++ print('calendar = %s max abs err (mins) = %s eps = %s' % \
+ (calendar,maxerr,eps))
+ eps = 1.e-6
+ units = 'hours since 0001-01-30 01:01:01'
+@@ -418,7 +418,7 @@ class cftimeTestCase(unittest.TestCase):
+ assert(err < eps)
+ assert(date1.strftime(dateformat) == date2.strftime(dateformat))
+ if verbose:
+- print('calender = %s max abs err (hours) = %s eps = %s' % \
++ print('calendar = %s max abs err (hours) = %s eps = %s' % \
+ (calendar,maxerr,eps))
+ eps = 1.e-8
+ units = 'days since 0001-01-30 01:01:01'
+@@ -434,7 +434,7 @@ class cftimeTestCase(unittest.TestCase):
+ assert(err < eps)
+ assert(date1.strftime(dateformat) == date2.strftime(dateformat))
+ if verbose:
+- print('calender = %s max abs err (days) = %s eps = %s' % \
++ print('calendar = %s max abs err (days) = %s eps = %s' % \
+ (calendar,maxerr,eps))
+
+ # issue 353
=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
dont-cythonize-in-clean-target.patch
+pr94_numpy-int32.patch
View it on GitLab: https://salsa.debian.org/debian-gis-team/cftime/compare/811b99e90946bf163deb06f6719a8194fce729c2...1a90cd94e5335aad9570ac337836529579f9086d
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/cftime/compare/811b99e90946bf163deb06f6719a8194fce729c2...1a90cd94e5335aad9570ac337836529579f9086d
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20181202/128c76dd/attachment-0001.html>
More information about the Pkg-grass-devel
mailing list