Blob Blame History Raw
Name:           python-shapely
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://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
BuildRequires:  numpy

# 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
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.rst for more information!


%prep
%setup -q -n Shapely-%{version}

#TODO: Upstream
%patch0 -p1 -b .cython~
%patch1 -p1 -b .chaintest~

rm -f shapely/speedups/_speedups.c


%build
%{__python} setup.py build
# TODO: Revisit Cython debugging
# http://docs.cython.org/src/userguide/debugging.html


%check
%{__python} setup.py test


%install
%{__python} setup.py install --skip-build --root %{buildroot}


%files
%doc CHANGES.txt README.rst CREDITS.txt LICENSE.txt
%doc docs
%doc %{python_sitearch}/shapely/examples
%exclude %{python_sitearch}/shapely/tests
%{python_sitearch}/shapely/algorithms
%{python_sitearch}/shapely/geometry
%{python_sitearch}/shapely/speedups
%{python_sitearch}/shapely/*.py*
%{python_sitearch}/Shapely-%{version}-py*.egg-info


%changelog
* Sun Apr  8 2012 Volker Fröhlich <volker27@gmx.at> - 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 <rel-eng@lists.fedoraproject.org> - 1.2.13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Mon Aug 16 2011 Volker Fröhlich <volker27@gmx.at> - 1.2.13-1
- Update for release 1.2.13

* Mon Aug 16 2011 Volker Fröhlich <volker27@gmx.at> - 1.2.12-1
- Update for release 1.2.12
- Don't ship tests
- Label examples as documentation

* Mon Aug 15 2011 Volker Fröhlich <volker27@gmx.at> - 1.2.11-2
- BR numpy for the tests

* Mon Aug 15 2011 Ville Skyttä <ville.skytta@iki.fi> - 1.2.11-2
- BR geos-devel to actually build arch specific bits
- Drop unneeded geos dep

* Fri Aug 12 2011 Volker Fröhlich <volker27@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@gmx.at> - 1.2.9-1 
- Updated for 1.2.9
- Added tests again, but ignore the results

* Sat Feb 25 2011 Volker Fröhlich <volker27@gmx.at> - 1.2.8-1 
- Updated for 1.2.8
- Disable tests

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sat Nov 27 2010 Volker Fröhlich <volker27@gmx.at> - 1.2.7-2 
- Explained excluded files; added check section

* Wed Nov 24 2010 Volker Fröhlich <volker27@gmx.at> - 1.2.7-1 
- Initial package for Fedora