[python-shapely] UPDATE FOR VERSION 1.2.11
Volker Fröhlich
volter at fedoraproject.org
Fri Aug 12 21:32:39 UTC 2011
commit 86718e911d8399ec0fba26bc191532858b25139c
Author: Volker Fröhlich <volker27 at gmx.at>
Date: Fri Aug 12 23:31:11 2011 +0200
UPDATE FOR VERSION 1.2.11
- New release
- Include a patch to build Cython .c file
.gitignore | 1 +
python-shapely-1.2.11-re-run_cython.patch | 20 ++++++++++++
python-shapely.spec | 46 ++++++++++++++++++++--------
sources | 2 +-
4 files changed, 55 insertions(+), 14 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 59ec2e4..ff2f4e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/Shapely-1.2.7.tar.gz
/Shapely-1.2.8.tar.gz
/Shapely-1.2.9.tar.gz
+/Shapely-1.2.11.tar.gz
diff --git a/python-shapely-1.2.11-re-run_cython.patch b/python-shapely-1.2.11-re-run_cython.patch
new file mode 100644
index 0000000..418b726
--- /dev/null
+++ b/python-shapely-1.2.11-re-run_cython.patch
@@ -0,0 +1,20 @@
+--- Shapely-1.2.11/setup.py 2011-08-03 18:19:24.000000000 +0200
++++ Shapely-1.2.11-re-run_cython/setup.py 2011-08-12 23:04:12.467450529 +0200
+@@ -12,7 +12,7 @@
+ from distutils.errors import CCompilerError, DistutilsExecError, \
+ DistutilsPlatformError
+ from setuptools.extension import Extension
+-from setuptools.command.build_ext import build_ext
++from Cython.Distutils import build_ext
+ from setuptools import setup, find_packages
+ import sys
+ import platform
+@@ -101,7 +101,7 @@
+ else:
+ ext_modules = [
+ Extension("shapely.speedups._speedups",
+- ["shapely/speedups/_speedups.c"], libraries=['geos_c']),
++ ["shapely/speedups/_speedups.pyx"], libraries=['geos_c']),
+ ]
+
+ try:
diff --git a/python-shapely.spec b/python-shapely.spec
index 100a6ad..52f395e 100644
--- a/python-shapely.spec
+++ b/python-shapely.spec
@@ -5,16 +5,19 @@
# Can be removed after EOL of F12
Name: python-shapely
-Version: 1.2.9
+Version: 1.2.11
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://gispython.org/dist/Shapely-%{version}.tar.gz
+Source0: http://pypi.python.org/packages/source/S/Shapely/Shapely-%{version}.tar.gz
-BuildArch: noarch
+Patch0: %{name}-%{version}-re-run_cython.patch
+
+BuildRequires: Cython
BuildRequires: python-devel
BuildRequires: python-setuptools-devel
@@ -23,6 +26,12 @@ BuildRequires: python-setuptools-devel
Requires: geos
+# We don't want to provide private python extension libs
+%{?filter_setup:
+%filter_provides_in %{python_sitearch}/.*\.so$
+%filter_setup
+}
+
%description
Shapely is a package for creation, manipulation, and analysis
of planar geometry objects – designed especially for developers
@@ -30,10 +39,21 @@ of cutting edge geographic information systems. In a nutshell:
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!
+
%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
+
%build
%{__python} setup.py build
@@ -47,25 +67,25 @@ database using idiomatic Python.
%install
-rm -rf %{buildroot}
%{__python} setup.py install --skip-build --root %{buildroot}
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%doc CHANGES.txt CREDITS.txt README.txt LICENSE.txt
%doc PKG-INFO docs
-%{python_sitelib}/shapely
-%{python_sitelib}/Shapely-%{version}-py*.egg-info
-# These two scripts are also in the examples directory, have no shebang
-# and seem to serve no purpose otherwise.
+%{python_sitearch}/shapely
+%{python_sitearch}/Shapely-%{version}-py*.egg-info
%changelog
+* Fri Aug 12 2011 Volker Fröhlich <volker27 at gmx.at> - 1.2.11-1
+- Updated for 1.2.11
+- Switch away from noarch
+- Remove useless clean section and rm in install
+- Debian patch to rebuild Cython .c file
+- Avoid private provides for .so
+- Extend package description
+
* Fri Apr 01 2011 Volker Fröhlich <volker27 at gmx.at> - 1.2.9-1
- Updated for 1.2.9
- Added tests again, but ignore the results
diff --git a/sources b/sources
index dc625e9..c66aa5f 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-d1e7dcf1072ad16998d42dd6f5fa1fdb Shapely-1.2.9.tar.gz
+2dc1de3000f0726e21c4e3b316085fd4 Shapely-1.2.11.tar.gz
More information about the scm-commits
mailing list