Blob Blame History Raw
%if 0%{?rhel} && 0%{?rhel} <= 7
%bcond_with python3
%else
%bcond_without python3
%endif

%global modname translationstring

Name:           python-%{modname}
Version:        1.3
Release:        3%{?dist}
Summary:        Library used for internationalization (i18n) duties related to translation

License:        BSD
URL:            http://pypi.python.org/pypi/translationstring
Source0:        https://github.com/Pylons/translationstring/archive/%{version}/%{modname}-%{version}.tar.gz

BuildArch:      noarch

%global _description \
A library used by various Pylons Project packages for\
internationalization (i18n) duties related to translation.\
\
This package provides a translation string class, a translation string factory\
class, translation and pluralization primitives, and a utility that helps\
Chameleon templates use translation facilities of this package. It does not\
depend on Babel, but its translation and pluralization services are meant to\
work best when provided with an instance of the babel.support.Translations class.

%description %{_description}

%package -n python2-%{modname}
Summary:        %{summary}
%{?python_provide:%python_provide python2-%{modname}}
BuildRequires:  python2-devel
BuildRequires:  python2-setuptools

%description -n python2-%{modname} %{_description}

Python 2 version.

%if %{with python3}
%package -n python3-%{modname}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{modname}}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools

%description -n python3-%{modname} %{_description}

Python 3 version.
%endif

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

%build
%py2_build

%if %{with python3}
%py3_build
%endif

%install
%py2_install

%if %{with python3}
%py3_install
%endif

%check
%{__python2} setup.py test

%if 0%{?with_python3}
%{__python3} setup.py test
%endif

%files -n python2-%{modname}
%license LICENSE.txt
%doc README.rst changes.rst
%{python2_sitelib}/%{modname}/
%{python2_sitelib}/%{modname}-*.egg-info/

%if 0%{?with_python3}
%files -n python3-%{modname}
%license LICENSE.txt
%doc README.rst changes.rst
%{python3_sitelib}/%{modname}/
%{python3_sitelib}/%{modname}-*.egg-info/
%endif

%changelog
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 1.3-3
- Rebuild for Python 3.6

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

* Tue May 10 2016 Igor Gnatenko <ignatenko@redhat.com> - 1.3-1
- Modernize spec
- Update to 1.3

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

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-11
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

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

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.1-8
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

* Fri Dec 06 2013 Pierre-Yves Chibon <pingou@pingoured>fr - 1.1-7
- Change BR from python-setuptools-devel to python-setuptools
  See https://fedoraproject.org/wiki/Changes/Remove_Python-setuptools-devel

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Wed Jan 16 2013 Ralph Bean <rbean@redhat.com> - 1.1-4
- Looks like python3-babel isn't actually required.  Removed req.
- Enabled python3-translationstring subpackage.

* Fri Dec 07 2012 Ralph Bean <rbean@redhat.com> - 1.1-3
- Laid groundwork for packaging python3 support.  Waiting on python3-babel.
- Removed unnecessary defattr.
- Removed unnecessary removal of the buildroot.
- Removed unnecessary clean section.
- Removed bundled egg-info.

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Tue Mar 13 2012 Luke Macken <lmacken@redhat.com> - 1.1-1
- Bump to version 1.1

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed Jan  2 2010 Luke Macken <lmacken@redhat.com> - 0.3-1
- Initial package