diff --git a/python-shapely-1.2.14-chaintest.patch b/python-shapely-1.2.14-chaintest.patch new file mode 100644 index 0000000..5da82a0 --- /dev/null +++ b/python-shapely-1.2.14-chaintest.patch @@ -0,0 +1,17 @@ +diff --git a/shapely/tests/attribute-chains.txt b/shapely/tests/attribute-chains.txt +index 9b7933d..442cc2b 100644 +--- a/shapely/tests/attribute-chains.txt ++++ b/shapely/tests/attribute-chains.txt +@@ -28,10 +28,8 @@ anonymous references. + >>> print list(p.interiors[0].coords) + [(-0.25, 0.25), (-0.25, 0.75), (-0.75, 0.75), (-0.75, 0.25), (-0.25, 0.25)] + >>> xy = list(p.interiors[0].buffer(1).exterior.coords)[0] +- >>> xy[0] + 0.25 <= 1.0e-7 +- True +- >>> xy[1] + 0.75 <= 1.0e-7 +- True ++ >>> len(xy) ++ 2 + + Test multiple operators, boundary of a buffer + diff --git a/python-shapely.spec b/python-shapely.spec index 32936b4..4955e59 100644 --- a/python-shapely.spec +++ b/python-shapely.spec @@ -1,27 +1,33 @@ -%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} -%endif -# Can be removed after EOL of F12 - Name: python-shapely -Version: 1.2.13 -Release: 2%{?dist} +Version: 1.2.14 +Release: 1%{?dist} Summary: Geometric objects, predicates, and operations Group: Development/Libraries License: BSD URL: http://trac.gispython.org/lab/wiki/Shapely -#Source0: http://gispython.org/dist/Shapely-%{version}.tar.gz Source0: http://pypi.python.org/packages/source/S/Shapely/Shapely-%{version}.tar.gz +# Taken from Debian: +# Description: Generate .pyx at compile time. +# Shapely is distributed with the .pyx Cython file already transformed into a .c +# file. This patch imports the modified "build_ext" from the Cython Distutils, +# and then feeds it the .pyx (rather than .c) file. +# http://archive.ubuntu.com/ubuntu/pool/universe/p/python-shapely/python-shapely_1.2.10-1ubuntu1.debian.tar.gz Patch0: %{name}-1.2.12-re-run_cython.patch +# Upstream correction for attribute chaining test +Patch1: %{name}-1.2.14-chaintest.patch + +# Debian also has a patch on a locale test. Since this patch doesn't fail +# on our build systems, there's no need to patch it. + BuildRequires: Cython BuildRequires: python-devel BuildRequires: python-setuptools-devel BuildRequires: geos-devel -#Tests use numpy, but tests are broken for the time being + +# Tests use numpy BuildRequires: numpy # We don't want to provide private python extension libs @@ -38,19 +44,17 @@ Shapely lets you do PostGIS-ish stuff outside the context of a database using idiomatic Python. You can use this package with python-matplotlib and numpy. -See README.txt for more information! +See README.rst for more information! %prep %setup -q -n Shapely-%{version} -# Taken from Debian: -# Description: Generate .pyx at compile time. -# Shapely is distributed with the .pyx Cython file already transformed into a .c -# file. This patch imports the modified "build_ext" from the Cython Distutils, -# and then feeds it the .pyx (rather than .c) file. -# http://archive.ubuntu.com/ubuntu/pool/universe/p/python-shapely/python-shapely_1.2.10-1ubuntu1.debian.tar.gz -%patch0 -p1 -b .cython +#TODO: Upstream +%patch0 -p1 -b .cython~ +%patch1 -p1 -b .chaintest~ + +rm -f shapely/speedups/_speedups.c %build @@ -60,10 +64,7 @@ See README.txt for more information! %check -# Tests fail -# Sean Gillies, one of the authors, said, it was safe to ship either way -# http://trac.gispython.org/lab/ticket/244 -%{__python} setup.py test || true +%{__python} setup.py test %install @@ -72,7 +73,7 @@ See README.txt for more information! %files %doc CHANGES.txt README.rst CREDITS.txt LICENSE.txt -%doc PKG-INFO docs +%doc docs %doc %{python_sitearch}/shapely/examples %exclude %{python_sitearch}/shapely/tests %{python_sitearch}/shapely/algorithms @@ -83,6 +84,14 @@ See README.txt for more information! %changelog +* Sun Apr 8 2012 Volker Fröhlich - 1.2.14-1 +- Update for release 1.2.14 +- Remove duplicate PKG-INFO file +- Correct description -- pointing to README.rst now +- Add patch that corrects the attribute chaining test +- Tests now work fine, therefore respect their outcome +- Remove ready-made _speedups.c + * Sat Jan 14 2012 Fedora Release Engineering - 1.2.13-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild