Hello community, here is the log from the commit of package python-numpy for openSUSE:Factory checked in at 2012-11-14 09:16:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-numpy (Old) and /work/SRC/openSUSE:Factory/.python-numpy.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-numpy", Maintainer is "jmate...@suse.com" Changes: -------- python-numpy.changes: same change --- /work/SRC/openSUSE:Factory/python-numpy/python3-numpy.changes 2012-09-17 14:08:45.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-numpy.new/python3-numpy.changes 2012-11-14 09:16:16.000000000 +0100 @@ -1,0 +2,5 @@ +Tue Nov 13 12:23:18 UTC 2012 - idon...@suse.com + +- Add numpy-python33.patch to fix compilation with Python 3.3 + +------------------------------------------------------------------- New: ---- numpy-python33.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-numpy-doc.spec ++++++ --- /var/tmp/diff_new_pack.6bfaL4/_old 2012-11-14 09:16:17.000000000 +0100 +++ /var/tmp/diff_new_pack.6bfaL4/_new 2012-11-14 09:16:17.000000000 +0100 @@ -15,12 +15,13 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + %define modname numpy Name: python-%{modname}-doc %define docname numpydoc Version: 1.6.2 -%define docvers 0.4 Release: 0 +%define docvers 0.4 Url: http://sourceforge.net/projects/numpy Summary: Documentation for python-numpy License: BSD-3-Clause @@ -28,19 +29,19 @@ Source: %{modname}-%{version}.tar.gz Patch1: numpy-buildfix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-devel +BuildRequires: blas-devel +BuildRequires: lapack-devel BuildRequires: python-Sphinx +BuildRequires: python-devel BuildRequires: python-matplotlib BuildRequires: python-numpy-devel -BuildRequires: blas-devel -BuildRequires: lapack-devel BuildRequires: texlive-latex BuildRequires: zip Provides: python-numpydoc = %{version} Obsoletes: python-numpydoc < %{version} %if 0%{?suse_version} -BuildRequires: gcc-fortran BuildRequires: fdupes +BuildRequires: gcc-fortran %if 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %else ++++++ python-numpy.spec ++++++ --- /var/tmp/diff_new_pack.6bfaL4/_old 2012-11-14 09:16:17.000000000 +0100 +++ /var/tmp/diff_new_pack.6bfaL4/_new 2012-11-14 09:16:17.000000000 +0100 @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + %define modname numpy Name: python-%{modname} Version: 1.6.2 @@ -26,14 +27,14 @@ Source: %{modname}-%{version}.tar.gz Patch1: numpy-buildfix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-devel BuildRequires: blas-devel BuildRequires: lapack-devel +BuildRequires: python-devel Requires: python >= %{py_ver} Provides: numpy = %{version} %if 0%{?suse_version} -BuildRequires: gcc-fortran BuildRequires: fdupes +BuildRequires: gcc-fortran # FIXME: atlas is horribly broken # %if 0%{?suse_version} <= 1210 # BuildRequires: libatlas3-devel @@ -67,9 +68,9 @@ Summary: Development files for %{modname} applications Group: Development/Libraries/Python Requires: %{name} = %{version} -Requires: python-devel Requires: blas-devel Requires: lapack-devel +Requires: python-devel %if 0%{?suse_version} Requires: gcc-fortran %py_requires -d ++++++ python3-numpy.spec ++++++ --- /var/tmp/diff_new_pack.6bfaL4/_old 2012-11-14 09:16:17.000000000 +0100 +++ /var/tmp/diff_new_pack.6bfaL4/_new 2012-11-14 09:16:17.000000000 +0100 @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + %define modname numpy Name: python3-%{modname} Version: 1.6.2 @@ -25,12 +26,13 @@ Group: Development/Libraries/Python Source: %{modname}-%{version}.tar.gz Patch1: numpy-buildfix.patch +Patch2: numpy-python33.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: blas-devel +BuildRequires: lapack-devel BuildRequires: python3 BuildRequires: python3-2to3 BuildRequires: python3-devel -BuildRequires: blas-devel -BuildRequires: lapack-devel # FIXME: atlas is horribly broken # %if 0%{?suse_version} <= 1210 # BuildRequires: libatlas3-devel @@ -40,8 +42,8 @@ %{!?py3_ver: %global py3_ver %(python3 -c "import sys; version=str(sys.version_info[0]) + '.' + str(sys.version_info[1]); print(version)" 2>/dev/null || echo PYTHON-NOT-FOUND)} %endif %if 0%{?suse_version} -BuildRequires: gcc-fortran BuildRequires: fdupes +BuildRequires: gcc-fortran %else BuildRequires: gcc-gfortran %endif @@ -84,7 +86,9 @@ %prep %setup -q -n %{modname}-%{version} -%patch1 -p0 +%patch1 +%patch2 -p1 + sed -i "1d" %{modname}/{compat/setup{,scons},distutils/{conv_template,cpuinfo,exec_command,from_template,setup,setupscons,system_info},f2py/{auxfuncs,capi_maps,cb_rules,cfuncs,common_rules,crackfortran,diagnose,docs/usersguide/setup_example,f2py2e,f90mod_rules,func2subr,__init__,rules,setup,setupscons,use_rules},ma/setup{,scons},matrixlib/setup{,scons},setup,setupscons,testing/print_coercion_tables,testing/setup{,scons}}.py # Fix non-executable scripts %build ++++++ numpy-python33.patch ++++++ Index: numpy-1.6.2/numpy/core/src/multiarray/scalarapi.c =================================================================== --- numpy-1.6.2.orig/numpy/core/src/multiarray/scalarapi.c +++ numpy-1.6.2/numpy/core/src/multiarray/scalarapi.c @@ -652,6 +652,34 @@ PyArray_Scalar(void *data, PyArray_Descr itemsize = (((itemsize - 1) >> 2) + 1) << 2; } } +#if PY_VERSION_HEX >= 0x03030000 + if (type_num == NPY_UNICODE) { + PyObject *u, *args; + int byteorder; +#if NPY_BYTE_ORDER == NPY_LITTLE_ENDIAN + byteorder = -1; +#elif NPY_BYTE_ORDER == NPY_BIG_ENDIAN + byteorder = +1; +#else + #error Endianness undefined ? +#endif + if (swap) byteorder *= -1; + + u = PyUnicode_DecodeUTF32(data, itemsize, NULL, &byteorder); + if (u == NULL) { + return NULL; + } + args = Py_BuildValue("(O)", u); + if (args == NULL) { + Py_DECREF(u); + return NULL; + } + obj = type->tp_new(type, args, NULL); + Py_DECREF(u); + Py_DECREF(args); + return obj; + } +#endif if (type->tp_itemsize != 0) { /* String type */ obj = type->tp_alloc(type, itemsize); @@ -688,6 +716,7 @@ PyArray_Scalar(void *data, PyArray_Descr memcpy(destptr, data, itemsize); return obj; } +#if PY_VERSION_HEX < 0x0303000 else if (type_num == PyArray_UNICODE) { /* tp_alloc inherited from Python PyBaseObject_Type */ PyUnicodeObject *uni = (PyUnicodeObject*)obj; @@ -759,6 +788,7 @@ PyArray_Scalar(void *data, PyArray_Descr #endif return obj; } +#endif // PY_VERSION_HEX < 0x03030000 else { PyVoidScalarObject *vobj = (PyVoidScalarObject *)obj; vobj->base = NULL; Index: numpy-1.6.2/numpy/core/src/multiarray/scalartypes.c.src =================================================================== --- numpy-1.6.2.orig/numpy/core/src/multiarray/scalartypes.c.src +++ numpy-1.6.2/numpy/core/src/multiarray/scalartypes.c.src @@ -2323,7 +2323,11 @@ finish: *((npy_@name@ *)dest) = *((npy_@name@ *)src); #elif @default@ == 1 /* unicode and strings */ if (itemsize == 0) { /* unicode */ +#if PY_VERSION_HEX >= 0x03030000 + itemsize = PyUnicode_GetLength(robj) * PyUnicode_KIND(robj); +#else itemsize = ((PyUnicodeObject *)robj)->length * sizeof(Py_UNICODE); +#endif } memcpy(dest, src, itemsize); /* @default@ == 2 won't get here */ -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org