4b6f602
%global srcname mapnik
4b6f602
7e3f830
%global commit 7da019cf9eb12af8f8aa88b7d75789dfcd1e901b
4b6f602
%global shortcommit %(c=%{commit}; echo ${c:0:7})
4b6f602
3104d64
%global testcommit dd0c41c3f9f5dc98291a727af00bb42734d2a8c0
3104d64
%global visualcommit 1f20cf257f35224d3c139a6015b1cf70814b0d24
4b6f602
7e3f830
%global mapnik_version 3.0.23
f10767f
4b6f602
Name:           python-%{srcname}
7e3f830
Version:        3.0.23
fade471
Release:        20.20200224git%{shortcommit}%{?dist}
4b6f602
Summary:        Python bindings for Mapnik
4b6f602
4b6f602
License:        LGPLv2+
4b6f602
URL:            https://github.com/mapnik/python-mapnik
4b6f602
Source0:        https://github.com/mapnik/python-mapnik/archive/%{commit}/%{name}-%{commit}.tar.gz
4b6f602
Source1:        https://github.com/mapnik/test-data/archive/%{testcommit}/test-data-%{testcommit}.tar.gz
4b6f602
Source2:        https://github.com/mapnik/test-data-visual/archive/%{visualcommit}/test-data-visual-%{visualcommit}.tar.gz
4b6f602
# Stop setup.py trying to fiddle with compiler flags
4b6f602
Patch0:         python-mapnik-flags.patch
4b6f602
# Allow more variation in comparisons
d0f1c0a
Patch1:         python-mapnik-precision.patch
4b6f602
# Remove test that relies on WKT data missing from Fedora's gdal
d0f1c0a
Patch2:         python-mapnik-gdal.patch
7e3f830
# Disable some failing tests
3104d64
Patch3:         python-mapnik-compositing.patch
aaa1838
# https://github.com/mapnik/python-mapnik/commit/708290aff1ecbc2de080cab5588019caea1a02e1
3104d64
Patch4:         python-mapnik-buffer.patch
3104d64
# Update for new proj API support
3104d64
Patch5:         python-mapnik-proj.patch
4b6f602
b34f8e4
# Exclude big endian architectures as mapnik does not support them
b34f8e4
# https://github.com/mapnik/mapnik/issues/2313
b34f8e4
# https://bugzilla.redhat.com/show_bug.cgi?id=1395208
cf71fc5
ExcludeArch:    ppc ppc64 s390 s390x
b34f8e4
2891ff9
BuildRequires:  gcc-c++
3104d64
BuildRequires:  sqlite-devel
1afc103
BuildRequires:  python3-devel
da725ff
BuildRequires:  python3-setuptools
1afc103
BuildRequires:  python3-nose
1afc103
BuildRequires:  python3-PyPDF2
4b6f602
f10767f
BuildRequires:  mapnik-devel >= %{mapnik_version}
f10767f
BuildRequires:  mapnik-static >= %{mapnik_version}
f10767f
BuildRequires:  mapnik-utils >= %{mapnik_version}
f10767f
4b6f602
BuildRequires:  git-core
1afc103
BuildRequires:  boost-devel boost-python3-devel
1afc103
BuildRequires:  python3-cairo-devel
9f62d40
BuildRequires:  postgresql-test-rpm-macros postgis
4b6f602
4b6f602
%description
4b6f602
%{summary}.
4b6f602
4b6f602
4b6f602
%package -n python3-%{srcname}
4b6f602
Summary:        %{summary}
4b6f602
%{?python_provide:%python_provide python3-%{srcname}}
4b6f602
4b6f602
%description -n python3-%{srcname}
4b6f602
%{summary}.
4b6f602
4b6f602
4b6f602
%prep
7e3f830
%autosetup -p 1 -n %{name}-%{commit}
4b6f602
tar --directory=test/data --strip-components=1 --gunzip --extract --file=%{SOURCE1} 
4b6f602
tar --directory=test/data-visual --strip-components=1 --gunzip --extract --file=%{SOURCE2} 
4b6f602
4b6f602
4b6f602
%build
4b6f602
export PYCAIRO=true
8e5af41
export BOOST_PYTHON_LIB=boost_python%{python3_version_nodots}
4b6f602
%py3_build
4b6f602
4b6f602
4b6f602
%install
8e5af41
export BOOST_PYTHON_LIB=boost_python%{python3_version_nodots}
4b6f602
%py3_install
4b6f602
4b6f602
4b6f602
%check
4b6f602
# start a postgres instance for the tests to use
16148e9
PGTESTS_LOCALE="C.UTF-8" %postgresql_tests_run
9f62d40
createdb template_postgis
9f62d40
psql -c "CREATE EXTENSION postgis" template_postgis
4b6f602
# run the tests
3104d64
rm test/data/broken_maps/duplicate_stylename.xml
3104d64
rm test/data/good_maps/layer_scale_denominator.xml
de6ea6f
rm test/python_tests/pdf_printing_test.py
3104d64
rm test/python_tests/projection_test.py
8e5af41
PGHOST="$PWD" LANG="C.UTF-8" BOOST_PYTHON_LIB=boost_python%{python3_version_nodots} %{__python3} setup.py test
4b6f602
4b6f602
4b6f602
%files -n python3-%{srcname}
4b6f602
%doc README.md AUTHORS.md CHANGELOG.md CONTRIBUTING.md
4b6f602
%license COPYING
4b6f602
%{python3_sitearch}/*
4b6f602
4b6f602
4b6f602
%changelog
fade471
* Mon Aug 01 2022 Frantisek Zatloukal <fzatlouk@redhat.com> - 3.0.23-20.20200224git7da019c
fade471
- Rebuilt for ICU 71.1
fade471
4c18f3b
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.23-19.20200224git7da019c
4c18f3b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
4c18f3b
3c9549a
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 3.0.23-18.20200224git7da019c
3c9549a
- Rebuilt for Python 3.11
3c9549a
6dd336b
* Wed May 04 2022 Thomas Rodgers <trodgers@redhat.com> - 3.0.23-17.20200224git7da019c
6dd336b
- Rebuilt for Boost 1.78
6dd336b
c168e63
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.23-16.20200224git7da019c
c168e63
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
c168e63
b24d17b
* Sat Aug 07 2021 Jonathan Wakely <jwakely@redhat.com> - 3.0.23-15.20200224git7da019c
b24d17b
- Rebuilt for Boost 1.76
b24d17b
3104d64
* Thu Jul 29 2021 Tom Hughes <tom@compton.nu> - 3.0.23-13.20200224git%(c=%{commit}; echo ${c:0:7})%{?dist}
3104d64
- Add upstream patch to support new proj API
3104d64
6126f65
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.23-13.20200224git7da019c
6126f65
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
6126f65
fb229b3
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 3.0.23-12.20200224git7da019c
fb229b3
- Rebuilt for Python 3.10
fb229b3
0c871bb
* Thu May 20 2021 Pete Walter <pwalter@fedoraproject.org> - 3.0.23-11.20200224git7da019c
0c871bb
- Rebuild for ICU 69
0c871bb
07b946f
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.23-10.20200224git7da019c
07b946f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
07b946f
b811b66
* Fri Jan 22 2021 Jonathan Wakely <jwakely@redhat.com> - 3.0.23-9.20200224git7da019c
b811b66
- Rebuilt for Boost 1.75
b811b66
2501481
* Sat Jan  9 2021 Tom Hughes <tom@compton.nu> - 3.0.23-8.20200224git7da019c
d705be0
- Rebuild for mapnik 3.1.0
d705be0
2501481
* Mon Nov 23 2020 Tom Hughes <tom@compton.nu> - 3.0.23-7.20200224git7da019c
aaa1838
- Add patch for python 3.10 compatibility
aaa1838
da725ff
* Mon Oct  5 2020 Tom Hughes <tom@compton.nu> - 3.0.23-6.20200224git7da019c
da725ff
- Require setuptools
da725ff
7267d1e
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.23-5.20200224git7da019c
7267d1e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
7267d1e
df1efa1
* Tue Jun  2 2020 Tom Hughes <tom@compton.nu> - 3.0.23-4.20200224git7da019c
df1efa1
- Rebuilt for Boost 1.73
df1efa1
7f57ad8
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.23-3.20200224git7da019c
7f57ad8
- Rebuilt for Python 3.9
7f57ad8
ee025b7
* Sat May 16 2020 Pete Walter <pwalter@fedoraproject.org> - 3.0.23-2.20200224git7da019c
ee025b7
- Rebuild for ICU 67
ee025b7
7e3f830
* Tue Mar  3 2020 Tom Hughes <tom@compton.nu> - 3.0.23-1.20200224git7da019c
7e3f830
- Update to new upstream snapshot
7e3f830
49624cd
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1-50.20180723git588fc90
49624cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
49624cd
c093abc
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.1-49.20180723git588fc90
c093abc
- Rebuilt for Python 3.8.0rc1 (#1748018)
c093abc
49d46cb
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.1-48.20180723git588fc90
49d46cb
- Rebuilt for Python 3.8
49d46cb
4da7f6b
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1-47.20180723git588fc90
4da7f6b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
4da7f6b
afbc2c2
* Mon Jun 24 2019 Tom Hughes <tom@compton.nu> - 0.1-46.20180723git588fc90
566e09d
- Update to new shapshot
566e09d
- Fix various python 3.8 warnings
566e09d
df6a076
* Tue Feb  5 2019 Tom Hughes <tom@compton.nu> - 0.1-45.20180411gitfe47aa1
df6a076
- Rebuilt for proj 5
df6a076
133d159
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1-44.20180411gitfe47aa1
133d159
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
133d159
3fdddb4
* Sun Jan 27 2019 Tom Hughes <tom@compton.nu> - 0.1-43.20180411gitfe47aa1
3fdddb4
- Rebuilt for Boost 1.69
3fdddb4
16148e9
* Tue Nov  6 2018 Tom Hughes <tom@compton.nu> - 0.1-42.20180411gitfe47aa1
16148e9
- Replace en_US.UTF-8 with C.UTF-8
16148e9
1afc103
* Mon Sep 17 2018 Tom Hughes <tom@compton.nu> - 0.1-41.20180411gitfe47aa1
1afc103
- Drop python2 subpackage
1afc103
9f62d40
* Tue Aug 28 2018 Tom Hughes <tom@compton.nu> - 0.1-40.20180411gitfe47aa1
9f62d40
- Use new postgres test macro
9f62d40
9a3283d
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1-39.20180411gitfe47aa1
9a3283d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
9a3283d
f15898e
* Tue Jul 10 2018 Pete Walter <pwalter@fedoraproject.org> - 0.1-38.20180411gitfe47aa1
f15898e
- Rebuild for ICU 62
f15898e
9079a50
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.1-37.20180411gitfe47aa1
9079a50
- Rebuilt for Python 3.7
9079a50
fb05e27
* Mon Apr 30 2018 Pete Walter <pwalter@fedoraproject.org> - 0.1-36.20180411gitfe47aa1
fb05e27
- Rebuild for ICU 61.1
fb05e27
1f09fda
* Sat Apr 28 2018 Tom Hughes <tom@compton.nu> - 0.1-35.20180411gitfe47aa1
1f09fda
- Update to new snapshot
1f09fda
ba15f81
* Fri Apr 27 2018 Tom Hughes <tom@compton.nu> - 0.1-34.20170614git1635afe
ba15f81
- Update boost-python and pycairo dependencies
ba15f81
f10767f
* Sun Apr 22 2018 Tom Hughes <tom@compton.nu> - 0.1-33.20170614git1635afe
f10767f
- Rebuild against mapnik 3.0.20
f10767f
433b791
* Sun Apr 22 2018 Tom Hughes <tom@compton.nu> - 0.1-32.20170614git1635afe
433b791
- Rebuild against mapnik 3.0.20
433b791
c39fe45
* Tue Mar  6 2018 Tom Hughes <tom@compton.nu> - 0.1-31.20170614git1635afe
c39fe45
- Rebuild against mapnik 3.0.19
c39fe45
2891ff9
* Sun Feb 18 2018 Tom Hughes <tom@compton.nu> - 0.1-30.20170614git1635afe
2891ff9
- Require gcc-c++
2891ff9
03e389a
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1-29.20170614git1635afe
03e389a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
03e389a
f86a245
* Sun Jan 28 2018 Tom Hughes <tom@compton.nu> - 0.1-28.20170614git1635afe
f86a245
- Rebuild against mapnik 3.0.18
f86a245
df4a7c8
* Tue Jan 23 2018 Jonathan Wakely <jwakely@redhat.com> - 0.1-27.20170614git1635afe
df4a7c8
- Rebuilt for Boost 1.66
df4a7c8
f39032d
* Thu Nov 30 2017 Pete Walter <pwalter@fedoraproject.org> - 0.1-26.20170614git1635afe
f39032d
- Rebuild for ICU 60.1
f39032d
8e5ab7e
* Thu Nov 30 2017 Tom Hughes <tom@compton.nu> - 0.1-25.20170614git1635afe
8e5ab7e
- Rebuild against mapnik 3.0.17
8e5ab7e
677c674
* Tue Nov 21 2017 Tom Hughes <tom@compton.nu> - 0.1-24.20170614git1635afe
677c674
- Rebuild against mapnik 3.0.16
677c674
77bbf66
* Thu Aug 10 2017 Tom Hughes <tom@compton.nu> - 0.1-23.20170614git1635afe
77bbf66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
77bbf66
7a87e42
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1-22.20170614git1635afe
7a87e42
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
7a87e42
b4f2251
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1-21.20170614git1635afe
b4f2251
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b4f2251
6b97d77
* Fri Jul 21 2017 Kalev Lember <klember@redhat.com> - 0.1-20.20170614git1635afe
6b97d77
- Rebuilt for Boost 1.64
6b97d77
f55ba1f
* Fri Jun 16 2017 Tom Hughes <tom@compton.nu> - 0.1-19.20170614git1635afe
f55ba1f
- Rebuild against mapnik 3.0.15
f55ba1f
3f8e96f
* Wed Jun 14 2017 Tom Hughes <tom@compton.nu> - 0.1-18.20170614git1635afe
3f8e96f
- Update to new snapshot
3f8e96f
- Rebuild against mapnik 3.0.14
3f8e96f
694ae67
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-17.20170214git8139e5c
694ae67
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
694ae67
d6cbde7
* Thu May  4 2017 Tom Hughes <tom@compton.nu> - 0.1-16.20170214git8139e5c
d6cbde7
- Rebuild for ARM ABI fix
d6cbde7
de6ea6f
* Tue Feb 14 2017 Tom Hughes <tom@compton.nu> - 0.1-15.20170214git8139e5c
1cd3023
- Update to new snapshot
1cd3023
- Rebuild against current mapnik
1cd3023
1c646ad
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1-14.20160909git541fd96
1c646ad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
1c646ad
3937200
* Wed Feb 01 2017 Sandro Mani <manisandro@gmail.com> - 0.1-13.20160909git541fd96
3937200
- Rebuild (libwebp)
3937200
ac1e39c
* Wed Jan 25 2017 Tom Hughes <tom@compton.nu> - 0.1-12.20160909git541fd96
ac1e39c
- Rebuild for proj 4.9.3
ac1e39c
1093c1a
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.1-11.20160909git541fd96
1093c1a
- Rebuild for Python 3.6
1093c1a
b34f8e4
* Wed Nov 16 2016 Tom Hughes <tom@compton.nu> - 0.1-10.20160909git541fd96
b34f8e4
- Exclude big endian architectures as mapnik does not support them
b34f8e4
dd4a860
* Fri Sep  9 2016 Tom Hughes <tom@compton.nu> - 0.1-9.20160909git541fd96
dd4a860
- Update to new snapshot
dd4a860
- Rebuild against current mapnik
dd4a860
d592ba9
* Tue Jul 26 2016 Tom Hughes <tom@compton.nu> - 0.1-8.20160202git1cb6851
d592ba9
- Update to new snapshot
d592ba9
- Rebuild against current mapnik
d592ba9
7a94b79
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-7.20151209gitdb7c1fd
7a94b79
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
7a94b79
1288560
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.1-6.20151209gitdb7c1fd
1288560
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
1288560
d0f1c0a
* Sun Jan 24 2016 Tom Hughes <tom@compton.nu> - 0.1-5.20151209gitdb7c1fd
d0f1c0a
- Update to new snapshot
d0f1c0a
- Patch some boost 1.60.0 issues
d0f1c0a
ad861e7
* Fri Jan 22 2016 Tom Hughes <tom@compton.nu> - 0.1-5.20151209gitf81d5f8
ad861e7
- Rebuild for boost 1.60.0
ad861e7
4b6f602
* Wed Dec  9 2015 Tom Hughes <tom@compton.nu> - 0.1-4.20151209gitf81d5f8
4b6f602
- Update to new snapshot with license fix
4b6f602
- Bump epoch on mapnik-python provide
4b6f602
- Patch out setting of rpath
4b6f602
- Update to latest test data
4b6f602
4b6f602
* Sun Dec  6 2015 Tom Hughes <tom@compton.nu> - 0.1-3.20151127gitfae6388
4b6f602
- Update to new upstream snapshot
4b6f602
4b6f602
* Wed Dec  2 2015 Tom Hughes <tom@compton.nu> - 0.1-2.20151125gitff364e1
4b6f602
- Provide a postgres instance for the tests
4b6f602
- Enable cairo support
4b6f602
4b6f602
* Mon Nov 30 2015 Tom Hughes <tom@compton.nu> - 0.1-1.20151125gitff364e1
4b6f602
- Rebuild against mapnik 3.0.9
4b6f602
4b6f602
* Wed Nov 25 2015 Tom Hughes <tom@compton.nu> - 0-0.1.20151125gitff364e1
4b6f602
- Initial build