f2c5b49
%global pkgname tilestache
f2c5b49
%global srcname TileStache
cc26754
f2c5b49
%global commit e96532bf59bf79c9991dcc06628f28b27bb19c08
f2c5b49
f2c5b49
Name:           python-%{pkgname}
f2c5b49
Version:        1.51.14
01827bd
Release:        16%{?dist}
cc26754
Summary:        A stylish alternative for caching your map tiles
cc26754
6f89afb
License:        BSD-3-Clause
cc26754
URL:            http://tilestache.org
f2c5b49
Source0:        https://github.com/%{srcname}/%{srcname}/archive/%{commit}/%{srcname}-%{commit}.tar.gz
f2c5b49
cc26754
# Modify font search to find the system DejaVuSansMono.ttf - Not submitted upstream
cc26754
Patch0:         %{name}-1.49.11-use-system-fonts.patch
cc26754
# Don't install the bundled font or docs - Not submitted upstream
cc26754
Patch1:         %{name}-1.49.11-unbundle-installs.patch
f2c5b49
# Compatibility with Fedora's CGI - Not submitted upstream
f2c5b49
Patch2:         %{name}-1.51.14-cgi-compat.patch
f2c5b49
# Python 3 compatibility - Submitted upstream as TileStache/TileStache#345
f2c5b49
Patch3:         %{name}-1.51.14-python3-compat.patch
f2c5b49
# Non-standard python executable - Submitted upstream as TileStache/TileStache#359
f2c5b49
Patch4:         %{name}-1.51.14-python3-executable.patch
f2c5b49
# Bad escape in string literal - Submitted upstream as TileStache/TileStache#358
f2c5b49
Patch5:         %{name}-1.51.14-escape-sequence.patch
9987626
# Support Shapely 2: Use shape instead of asShape from shapely.geometry
9987626
# Submitted upstream as TileStache/TileStache#375
9987626
Patch6:         %{name}-1.51.14-shapely2-compat.patch
2ea2d01
# Replace assertEquals with assertEqual
2ea2d01
# This deprecated unittest.TestCase alias was removed in Python 3.12.
2ea2d01
# Submitted upstream as TileStache/TileStache#377
2ea2d01
Patch7:         %{name}-1.51.14-assertEquals.patch
cc26754
cc26754
BuildArch:      noarch
cc26754
c18f95c
%global _description\
c18f95c
TileStache is a Python-based server application that can serve up map tiles\
c18f95c
based on rendered geographic data. You might be familiar with TileCache, the\
c18f95c
venerable open source WMS server from MetaCarta. TileStache is similar, but we\
c18f95c
hope simpler and better-suited to the needs of designers and cartographers.
c18f95c
c18f95c
%description %_description
c18f95c
cc26754
f2c5b49
%package examples
f2c5b49
Summary:        Example code for TileStache
cc26754
cc26754
%description examples
cc26754
Example code for TileStache: A stylish alternative for caching your map tiles
cc26754
f2c5b49
f2c5b49
%package -n python%{python3_pkgversion}-%{pkgname}
f2c5b49
Summary:        %{summary}
f2c5b49
BuildRequires:  python%{python3_pkgversion}-devel
f2c5b49
BuildRequires:  python%{python3_pkgversion}-gdal
f2c5b49
BuildRequires:  python%{python3_pkgversion}-memcached
f2c5b49
BuildRequires:  python%{python3_pkgversion}-modestmaps >= 1.3.0
f2c5b49
BuildRequires:  python%{python3_pkgversion}-nose
f2c5b49
BuildRequires:  python%{python3_pkgversion}-setuptools
f2c5b49
BuildRequires:  python%{python3_pkgversion}-shapely
f2c5b49
BuildRequires:  python%{python3_pkgversion}-werkzeug
f2c5b49
Requires:       font(dejavusansmono)
f2c5b49
Conflicts:      python2-%{pkgname} < %{version}-%{release}
f2c5b49
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pkgname}}
f2c5b49
f2c5b49
%if %{undefined __pythondist_requires}
f2c5b49
Requires:       python%{python3_pkgversion}-imaging
f2c5b49
Requires:       python%{python3_pkgversion}-modestmaps >= 1.3.0
f2c5b49
Requires:       python%{python3_pkgversion}-simplejson
f2c5b49
Requires:       python%{python3_pkgversion}-werkzeug
f2c5b49
%endif # __pythondist_requires
f2c5b49
f2c5b49
%description -n python%{python3_pkgversion}-tilestache %_description
f2c5b49
f2c5b49
cc26754
%prep
f2c5b49
%autosetup -p1 -n %{srcname}-%{commit}
cc26754
cc26754
# Remove shebang from a script
f2c5b49
sed -i '1{\@^#!/usr/bin/env python@d}' %{srcname}/Goodies/Caches/GoogleCloud.py
cc26754
cc26754
# Add shebang to a script
f2c5b49
sed -i '1i #!%{_bindir}/bash' examples/zoom_example/run_server.sh
f2c5b49
f2c5b49
sed -i '1{s@^#!/usr/bin/env python@#!%{__python3}@}' examples/geotiff/server.py
f2c5b49
cc26754
cc26754
%build
f2c5b49
%py3_build
f2c5b49
cc26754
cc26754
%install
f2c5b49
%py3_install
cc26754
f2c5b49
install -d %{buildroot}%{_mandir}/man1
cc26754
install -p -m0644 man/tilestache-clean.1 %{buildroot}%{_mandir}/man1/
f2c5b49
install -p -m0644 man/tilestache-compose.1 %{buildroot}%{_mandir}/man1/
f2c5b49
install -p -m0644 man/tilestache-list.1 %{buildroot}%{_mandir}/man1/
cc26754
install -p -m0644 man/tilestache-render.1 %{buildroot}%{_mandir}/man1/
cc26754
install -p -m0644 man/tilestache-seed.1 %{buildroot}%{_mandir}/man1/
cc26754
install -p -m0644 man/tilestache-server.1 %{buildroot}%{_mandir}/man1/
cc26754
f2c5b49
mkdir -p %{buildroot}%{_datadir}/%{srcname}
f2c5b49
cp -a examples %{buildroot}%{_datadir}/%{srcname}/
cc26754
f2c5b49
f2c5b49
%check
f2c5b49
NO_DATABASE=1 OFFLINE_TESTS=1 %{__python3} -m nose \
f2c5b49
  -I vectiles_tests.py \
f2c5b49
  tests
f2c5b49
f2c5b49
f2c5b49
%files examples
f2c5b49
%license LICENSE
f2c5b49
%doc README.md
f2c5b49
%{_datadir}/%{srcname}
f2c5b49
f2c5b49
%files -n python%{python3_pkgversion}-%{pkgname}
f2c5b49
%license LICENSE
f2c5b49
%doc API.html CHANGELOG README.md
f2c5b49
%{python3_sitelib}/%{srcname}/
f2c5b49
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/
cc26754
%{_bindir}/tilestache-clean.py
cc26754
%{_bindir}/tilestache-compose.py
cc26754
%{_bindir}/tilestache-list.py
cc26754
%{_bindir}/tilestache-render.py
cc26754
%{_bindir}/tilestache-seed.py
cc26754
%{_bindir}/tilestache-server.py
cc26754
%{_mandir}/man1/tilestache-clean.1.gz
f2c5b49
%{_mandir}/man1/tilestache-compose.1.gz
f2c5b49
%{_mandir}/man1/tilestache-list.1.gz
cc26754
%{_mandir}/man1/tilestache-render.1.gz
cc26754
%{_mandir}/man1/tilestache-seed.1.gz
cc26754
%{_mandir}/man1/tilestache-server.1.gz
cc26754
cc26754
cc26754
%changelog
01827bd
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.51.14-16
01827bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
01827bd
5914a74
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.51.14-15
5914a74
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
5914a74
9987626
* Tue Jul 25 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 1.51.14-14
9987626
- Patch for Shapely 2
6f89afb
- Update License to SPDX
2ea2d01
- Patch for Python 3.12
9987626
e87d2d5
* Thu Jul 20 2023 Python Maint <python-maint@redhat.com> - 1.51.14-13
e87d2d5
- Rebuilt for Python 3.12
e87d2d5
dbd6101
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.51.14-12
dbd6101
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
dbd6101
25e1aea
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.51.14-11
25e1aea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
25e1aea
5fed02c
* Wed Jun 15 2022 Python Maint <python-maint@redhat.com> - 1.51.14-10
5fed02c
- Rebuilt for Python 3.11
5fed02c
e9f63d0
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.51.14-9
e9f63d0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
e9f63d0
a8d7b83
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.51.14-8
a8d7b83
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
a8d7b83
1306f63
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.51.14-7
1306f63
- Rebuilt for Python 3.10
1306f63
890e81a
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.51.14-6
890e81a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
890e81a
35031ee
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.51.14-5
35031ee
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
35031ee
d350171
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.51.14-4
d350171
- Rebuilt for Python 3.9
d350171
21f687f
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.51.14-3
21f687f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
21f687f
6e861c2
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.51.14-2
6e861c2
- Rebuilt for Python 3.8.0rc1 (#1748018)
6e861c2
f2c5b49
* Tue Aug 27 2019 Scott K Logan <logans@cottsay.net> - 1.51.14-1
f2c5b49
- Update to 1.51.14
f2c5b49
- Drop python 2 subpackage (f32+) (rhbz#1738198)
f2c5b49
- Handle automatic dependency generation (f30+)
f2c5b49
- Add some of the tests
f2c5b49
b60db18
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.49.11-14
b60db18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
b60db18
65cef87
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.49.11-13
65cef87
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
65cef87
f9629f2
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.49.11-12
f9629f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
f9629f2
ba31f33
* Wed Feb 28 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.49.11-11
ba31f33
- Update Python 2 dependency declarations to new packaging standards
ba31f33
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
ba31f33
50d26ed
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.49.11-10
50d26ed
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
50d26ed
c18f95c
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.49.11-9
c18f95c
- Python 2 binary package renamed to python2-tilestache
c18f95c
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
c18f95c
bf3c741
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.49.11-8
bf3c741
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
bf3c741
9b40ac0
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.49.11-7
9b40ac0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
9b40ac0
921f24c
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.49.11-6
921f24c
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
921f24c
05a24a5
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.49.11-5
05a24a5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
05a24a5
7462198
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.49.11-4
7462198
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
7462198
cc26754
* Mon Dec 15 2014 Scott K Logan <logans@cottsay.net> - 1.49.11-3
cc26754
- More spec clean-ups for Package Review
cc26754
- Use GitHub upstream
cc26754
- Add examples subpackage
cc26754
cc26754
* Sun Nov 30 2014 Scott K Logan <logans@cottsay.net> - 1.49.11-2
cc26754
- Spec clean-ups for Package Review
cc26754
cc26754
* Sun Sep 28 2014 Scott K Logan <logans@cottsay.net> - 1.49.11-1
cc26754
- Initial package