|
 |
26f7b75 |
%global pkgname babelfish
|
|
 |
26f7b75 |
|
|
 |
26f7b75 |
Name: python-%{pkgname}
|
|
 |
26f7b75 |
Version: 0.5.5
|
|
 |
26f7b75 |
Release: 2%{?dist}
|
|
 |
26f7b75 |
Summary: Python library to work with countries and languages
|
|
 |
26f7b75 |
|
|
 |
26f7b75 |
License: BSD
|
|
 |
26f7b75 |
URL: https://babelfish.readthedocs.org/
|
|
 |
26f7b75 |
Source: https://github.com/Diaoul/%{pkgname}/archive/%{version}.tar.gz
|
|
 |
26f7b75 |
|
|
 |
26f7b75 |
BuildArch: noarch
|
|
 |
26f7b75 |
BuildRequires: python2-devel
|
|
 |
26f7b75 |
BuildRequires: python3-devel
|
|
 |
26f7b75 |
BuildRequires: python-sphinx
|
|
 |
26f7b75 |
#BuildRequires: python-sphinx_rtd_theme
|
|
 |
26f7b75 |
|
|
 |
26f7b75 |
%description
|
|
 |
26f7b75 |
Babelfish makes it easy to work with countries, languages, scripts, ISO codes
|
|
 |
26f7b75 |
and IETF codes from Python. It has converters between all different data
|
|
 |
26f7b75 |
can be extended to use custom converters and data.
|
|
 |
26f7b75 |
|
|
 |
26f7b75 |
%package -n python2-%{pkgname}
|
|
 |
26f7b75 |
Summary: Python library to work with countries and languages
|
|
 |
26f7b75 |
%{?python_provide:%python_provide python2-%{pkgname}}
|
|
 |
26f7b75 |
Suggests: %{name}-doc = %{version}-%{release}
|
|
 |
26f7b75 |
|
|
 |
26f7b75 |
%description -n python2-%{pkgname}
|
|
 |
26f7b75 |
Babelfish makes it easy to work with countries, languages, scripts, ISO codes
|
|
 |
26f7b75 |
and IETF codes from Python. It has converters between all different data
|
|
 |
26f7b75 |
can be extended to use custom converters and data.
|
|
 |
26f7b75 |
|
|
 |
26f7b75 |
%package -n python3-%{pkgname}
|
|
 |
26f7b75 |
Summary: Python library to work with countries and languages
|
|
 |
26f7b75 |
%{?python_provide:%python_provide python3-%{pkgname}}
|
|
 |
26f7b75 |
Suggests: %{name}-doc = %{version}-%{release}
|
|
 |
26f7b75 |
|
|
 |
26f7b75 |
%description -n python3-%{pkgname}
|
|
 |
26f7b75 |
Babelfish makes it easy to work with countries, languages, scripts, ISO codes
|
|
 |
26f7b75 |
and IETF codes from Python. It has converters between all different data
|
|
 |
26f7b75 |
can be extended to use custom converters and data.
|
|
 |
26f7b75 |
|
|
 |
26f7b75 |
%package doc
|
|
 |
26f7b75 |
Summary: Documentation for %{pkgname} python library
|
|
 |
26f7b75 |
|
|
 |
26f7b75 |
%description doc
|
|
 |
26f7b75 |
Documentation for %{pkgname} python library
|
|
 |
26f7b75 |
|
|
 |
26f7b75 |
%prep
|
|
 |
26f7b75 |
%autosetup -n %{pkgname}-%{version}
|
|
 |
26f7b75 |
|
|
 |
26f7b75 |
%build
|
|
 |
26f7b75 |
%py2_build
|
|
 |
26f7b75 |
%py3_build
|
|
 |
26f7b75 |
pushd docs
|
|
 |
26f7b75 |
%make_build text
|
|
 |
26f7b75 |
%make_build man
|
|
 |
26f7b75 |
find . -type f -name '.buildinfo' -delete
|
|
 |
26f7b75 |
popd
|
|
 |
26f7b75 |
|
|
 |
26f7b75 |
%install
|
|
 |
26f7b75 |
%py2_install
|
|
 |
26f7b75 |
%py3_install
|
|
 |
26f7b75 |
install -D -m 0644 docs/_build/man/%{pkgname}.1 %{buildroot}%{_mandir}/man1/%{pkgname}.1
|
|
 |
26f7b75 |
#!/usr/bin/env python
|
|
 |
26f7b75 |
chmod 755 %{buildroot}%{python2_sitelib}/%{pkgname}/tests.py
|
|
 |
26f7b75 |
chmod 755 %{buildroot}%{python3_sitelib}/%{pkgname}/tests.py
|
|
 |
26f7b75 |
sed -i -e 's,^#!/usr/bin/env python$,#!/usr/bin/env python3,g' %{buildroot}%{python3_sitelib}/%{pkgname}/tests.py
|
|
 |
26f7b75 |
|
|
 |
26f7b75 |
%check
|
|
 |
26f7b75 |
%{__python2} setup.py test
|
|
 |
26f7b75 |
%{__python3} setup.py test
|
|
 |
26f7b75 |
|
|
 |
26f7b75 |
%files -n python2-%{pkgname}
|
|
 |
26f7b75 |
%license LICENSE
|
|
 |
26f7b75 |
%{python2_sitelib}/%{pkgname}
|
|
 |
26f7b75 |
%{python2_sitelib}/%{pkgname}-%{version}-py*.egg-info
|
|
 |
26f7b75 |
|
|
 |
26f7b75 |
%files -n python3-%{pkgname}
|
|
 |
26f7b75 |
%license LICENSE
|
|
 |
26f7b75 |
%{python3_sitelib}/%{pkgname}
|
|
 |
26f7b75 |
%{python3_sitelib}/%{pkgname}-%{version}-py*.egg-info
|
|
 |
26f7b75 |
|
|
 |
26f7b75 |
%files doc
|
|
 |
26f7b75 |
%doc AUTHORS README.rst HISTORY.rst docs/_build/text
|
|
 |
26f7b75 |
%license LICENSE
|
|
 |
26f7b75 |
%{_mandir}/man1/%{pkgname}.1*
|
|
 |
26f7b75 |
|
|
 |
26f7b75 |
%changelog
|
|
 |
26f7b75 |
* Fri Mar 11 2016 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.5.5-2
|
|
 |
26f7b75 |
- LICENSE in doc subpackage
|
|
 |
26f7b75 |
- Make test.py executable
|
|
 |
26f7b75 |
|
|
 |
26f7b75 |
* Wed Jan 13 2016 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.5.5-1
|
|
 |
26f7b75 |
- Initial package
|