%global sum Returns Unicode slugs
Name: python-slugify
Version: 1.2.1
Release: 4%{?dist}
Summary: %{sum}
License: BSD
URL: https://github.com/un33k/python-slugify
Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
BuildArch: noarch
%description
A Python slugify application that handles Unicode.
%package -n python2-slugify
Summary: %{sum}
%{?python_provide:%python_provide python2-slugify}
Requires: python2-unidecode
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%description -n python2-slugify
A Python slugify application that handles Unicode.
%package -n python3-slugify
Summary: %{sum}
%{?python_provide:%python_provide python3-slugify}
Requires: python3-unidecode
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%description -n python3-slugify
A Python slugify application that handles Unicode.
%prep
%autosetup
%build
%py2_build
%py3_build
%install
%py2_install
mv %{buildroot}/%{_bindir}/slugify \
%{buildroot}/%{_bindir}/python2-slugify
%py3_install
# rename binaries, make compat symlinks
pushd %{buildroot}%{_bindir}
for i in slugify-{2,%{?python2_version}}; do
ln -s python2-slugify $i
done
for i in slugify-{3,%{?python3_version}}; do
ln -s slugify $i
done
%files -n python2-slugify
%license LICENSE
%{_bindir}/python2-*
%{_bindir}/slugify-2*
%{python2_sitelib}/slugify/
%{python2_sitelib}/python_slugify-%{version}-py?.?.egg-info
%files -n python3-slugify
%license LICENSE
%{_bindir}/slugify
%{_bindir}/slugify-3*
%{python3_sitelib}/slugify/
%{python3_sitelib}/python_slugify-%{version}-py?.?.egg-info
%changelog
* Tue Jan 30 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.2.1-4
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri Jan 27 2017 William Moreno <williamjmorenor@gmail.com> - 1.2.1-1
- Update to v1.2.1
- Update source url
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.2.0-4
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sun Jan 17 2016 Eduardo Mayorga Téllez <mayorga@fedoraproject.org> - 1.2.0
- Update to 1.2.0 (switching to sources from new upstream)
- Add Python 3 support
* Thu Sep 17 2015 William Moreno Reyes <williamjmorenor at gmail.com> - 0.0.1-7
- Update python macros
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Thu Jun 11 2015 William José Moreno Reyes <williamjmorenor at gmail.com> - 0.0.1-5
- Fix %%Requires
* Thu Dec 25 2014 William Moreno Reyes < williamjmorenor at gmail.com> - 0.0.1.4
- Fix %%license macro
* Sun Dec 07 2014 William Moreno Reyes < williamjmorenor at gmail.com> - 0.0.1-3
- Add %%license macro
* Mon Oct 27 2014 William José Moreno Reyes <williamjmorenor at gmail.com> - 0.0.1-2
- Patching Licence
* Mon Oct 20 2014 William José Moreno Reyes <williamjmorenor at gmail.com> - 0.0.1-1
- Initial package.