Blob Blame History Raw
%{?!_without_python2:%global with_python2 0%{?_with_python2:1} || !(0%{?rhel} >= 8)}
%{?!_without_python3:%global with_python3 0%{?_with_python3:1} || !0%{?rhel}}

%global commit 524d5d36bdedc4995f06cdefaaa82546c41a75c2
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global pkgname modestmaps
%global srcname ModestMaps

Name:           python-%{pkgname}
Version:        1.4.7
Release:        1%{?dist}
Summary:        Modest Maps python port

Group:          Development/Libraries
License:        BSD
URL:            http://modestmaps.com
Source0:        https://github.com/stamen/%{pkgname}-py/archive/%{commit}/%{pkgname}-py-%{shortcommit}.tar.gz

BuildArch:      noarch

%description
Modest Maps is a small, extensible, and free library for designers and
developers who want to use interactive maps in their own projects. It provides
a core set of features in a tight, clean package with plenty of hooks for
additional functionality.

%if 0%{?with_python2}
%package -n python2-%{pkgname}
Summary:        %{summary}

BuildRequires:  python2-devel
Requires:       python%{!?rhel:2}-imaging

%if 0%{?fedora}
%{?python_provide:%python_provide python2-modestmaps}
%endif # fedora

%description -n python2-%{pkgname}
Modest Maps is a small, extensible, and free library for designers and
developers who want to use interactive maps in their own projects. It provides
a core set of features in a tight, clean package with plenty of hooks for
additional functionality.
%endif # with_python2

%if 0%{?with_python3}
%package -n python%{python3_pkgversion}-%{pkgname}
Summary:        %{summary}

BuildRequires:  python%{python3_pkgversion}-devel
Requires:       python%{python3_pkgversion}-imaging

%if 0%{?fedora}
%{?python_provide:%python_provide python%{python3_pkgversion}-modestmaps}
%endif # fedora

%description -n python%{python3_pkgversion}-%{pkgname}
Modest Maps is a small, extensible, and free library for designers and
developers who want to use interactive maps in their own projects. It provides
a core set of features in a tight, clean package with plenty of hooks for
additional functionality.
%endif # with_python3

%prep
%autosetup -p1 -n %{pkgname}-py-%{commit}

%build
%if 0%{?with_python2}
%py2_build
%endif # with_python2

%if 0%{?with_python3}
%py3_build
%endif # with_python3

%install
%if 0%{?with_python2}
%py2_install
%endif # with_python2

%if 0%{?with_python3}
%py3_install
%endif # with_python3

%if 0%{?with_python2}
%files -n python2-%{pkgname}
%doc CHANGELOG
%{python2_sitelib}/%{srcname}/
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info
%endif # with_python2

%if 0%{?with_python3}
%files -n python%{python3_pkgversion}-%{pkgname}
%doc CHANGELOG
%{python3_sitelib}/%{srcname}/
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
%endif # with_python3

%changelog
* Fri Nov 16 2018 Scott K Logan <logans@cottsay.net> - 1.4.7-1
- Update to 1.4.7
- Add python3 package
- Switch to Github upstream

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.6-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.6-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.6-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sun Feb 05 2017 Scott K Logan <logans@cottsay.net> - 1.4.6-6
- Update to latest Fedora packaging guidelines

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.6-5
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Fri Nov 28 2014 Scott K Logan <logans@cottsay.net> - 1.4.6-2
- Clean-ups from package review

* Sun Sep 28 2014 Scott K Logan <logans@cottsay.net> - 1.4.6-1
- Initial package