fa55fd1
%global pypi_name oslo.i18n
730f308
Alan Pevec cf8c10b
%if 0%{?fedora}
Alan Pevec cf8c10b
%global with_python3 1
Alan Pevec cf8c10b
%endif
Alan Pevec cf8c10b
730f308
Name:           python-oslo-i18n
d0ed5de
Version:        2.6.0
d0ed5de
Release:        1%{?dist}
2a45254
Summary:        OpenStack i18n library
730f308
License:        ASL 2.0
fa55fd1
URL:            https://github.com/openstack/%{pypi_name}
fa55fd1
Source0:        https://pypi.python.org/packages/source/o/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
730f308
2a45254
BuildArch:      noarch
2a45254
2a45254
%description
2a45254
The oslo.i18n library contain utilities for working with internationalization
2a45254
(i18n) features, especially translation for text strings in an application
2a45254
or library.
2a45254
2a45254
%package -n python2-oslo-i18n
2a45254
Summary:        OpenStack i18n Python 2 library
2a45254
%{?python_provide:%python_provide python2-oslo-i18n}
14712ac
# python_provide does not exist in CBS Cloud buildroot
14712ac
Provides:       python-oslo-i18n = %{version}-%{release}
14712ac
Obsoletes:      python-oslo-i18n < 2.5.0-2
14712ac
730f308
BuildRequires:  python2-devel
730f308
BuildRequires:  python-setuptools
730f308
BuildRequires:  python-pbr
837366a
BuildRequires:  python-babel
d524180
BuildRequires:  python-six
837366a
BuildRequires:  python-fixtures
837366a
730f308
Requires:       python-setuptools
837366a
Requires:       python-babel
d524180
Requires:       python-six
d524180
Requires:       python-fixtures
730f308
2a45254
%description -n python2-oslo-i18n
730f308
The oslo.i18n library contain utilities for working with internationalization
730f308
(i18n) features, especially translation for text strings in an application
730f308
or library.
730f308
Alan Pevec cf8c10b
%if 0%{?with_python3}
95653d4
%package -n python3-oslo-i18n
95653d4
Summary:        OpenStack i18n Python 3 library
2a45254
%{?python_provide:%python_provide python3-oslo-i18n}
95653d4
BuildRequires:  python3-devel
95653d4
BuildRequires:  python3-setuptools
95653d4
BuildRequires:  python3-pbr
b8d2ae6
BuildRequires:  python3-babel
95653d4
BuildRequires:  python3-six
b8d2ae6
BuildRequires:  python3-fixtures
b8d2ae6
95653d4
Requires:       python3-setuptools
b8d2ae6
Requires:       python3-babel
95653d4
Requires:       python3-six
95653d4
Requires:       python3-fixtures
95653d4
95653d4
%description -n python3-oslo-i18n
95653d4
The oslo.i18n library contain utilities for working with internationalization
95653d4
(i18n) features, especially translation for text strings in an application
95653d4
or library.
Alan Pevec cf8c10b
%endif
95653d4
2a45254
%package -n python2-oslo-i18n-doc
87d35e8
Summary:        Documentation for OpenStack i18n library
14712ac
%{?python_provide:%python_provide python2-oslo-i18n-doc}
14712ac
# python_provide does not exist in CBS Cloud buildroot
14712ac
Provides:       python-oslo-i18n-doc = %{version}-%{release}
14712ac
Obsoletes:      python-oslo-i18n-doc < 2.5.0-2
14712ac
87d35e8
BuildRequires:  python-sphinx
87d35e8
BuildRequires:  python-oslo-sphinx
87d35e8
2a45254
%description -n python2-oslo-i18n-doc
730f308
Documentation for the oslo.i18n library.
730f308
fa55fd1
%if 0%{?with_python3}
b8d2ae6
%package -n python3-oslo-i18n-doc
87d35e8
Summary:        Documentation for OpenStack i18n library
14712ac
%{?python_provide:%python_provide python3-oslo-i18n-doc}
14712ac
fa55fd1
BuildRequires:  python3-sphinx
fa55fd1
BuildRequires:  python3-oslo-sphinx
fa55fd1
b8d2ae6
%description -n python3-oslo-i18n-doc
b8d2ae6
Documentation for the oslo.i18n library.
fa55fd1
%endif
730f308
730f308
%prep
fa55fd1
%setup -qc
fa55fd1
mv %{pypi_name}-%{version} python2
fa55fd1
fa55fd1
pushd python2
fa55fd1
rm -rf *.egg-info
fa55fd1
fa55fd1
# Let RPM handle the dependencies
fa55fd1
rm -f test-requirements.txt requirements.txt
fa55fd1
fa55fd1
cp -p LICENSE ChangeLog CONTRIBUTING.rst PKG-INFO README.rst ../
fa55fd1
popd
fa55fd1
2a45254
find python2 -name '*.py' | xargs sed -i 's|^#!python|#!%{__python2}|'
2a45254
Alan Pevec cf8c10b
%if 0%{?with_python3}
fa55fd1
cp -a python2 python3
b8d2ae6
find python3 -name '*.py' | xargs sed -i 's|^#!python|#!%{__python3}|'
Alan Pevec cf8c10b
%endif
730f308
730f308
%build
fa55fd1
pushd python2
730f308
%{__python2} setup.py build
fa55fd1
popd
Alan Pevec cf8c10b
%if 0%{?with_python3}
fa55fd1
pushd python3
95653d4
%{__python3} setup.py build
95653d4
popd
Alan Pevec cf8c10b
%endif
730f308
730f308
%install
2a45254
pushd python2
2a45254
%{__python2} setup.py install --skip-build --root %{buildroot}
fa55fd1
export PYTHONPATH="$( pwd ):$PYTHONPATH"
fa55fd1
pushd doc
2a45254
sphinx-build -b html -d build/doctrees   source build/html
fa55fd1
# Fix hidden-file-or-dir warnings
fa55fd1
rm -fr build/html/.buildinfo
730f308
fa55fd1
# Fix this rpmlint warning
fa55fd1
sed -i "s|\r||g" build/html/_static/jquery.js
fa55fd1
popd
fa55fd1
popd
730f308
2a45254
%if 0%{?with_python3}
2a45254
pushd python3
2a45254
%{__python3} setup.py install --skip-build --root %{buildroot}
730f308
export PYTHONPATH="$( pwd ):$PYTHONPATH"
730f308
pushd doc
2a45254
sphinx-build-3 -b html -d build/doctrees   source build/html
2a45254
730f308
# Fix hidden-file-or-dir warnings
fa55fd1
rm -fr build/html/.buildinfo
837366a
837366a
# Fix this rpmlint warning
fa55fd1
sed -i "s|\r||g" build/html/_static/jquery.js
fa55fd1
popd
95653d4
popd
2a45254
%endif
95653d4
2a45254
%files -n python2-oslo-i18n
b8d2ae6
%doc ChangeLog CONTRIBUTING.rst PKG-INFO README.rst
9f34f52
%license LICENSE
d524180
%{python2_sitelib}/oslo_i18n
730f308
%{python2_sitelib}/*.egg-info
730f308
Alan Pevec cf8c10b
%if 0%{?with_python3}
95653d4
%files -n python3-oslo-i18n
b8d2ae6
%doc ChangeLog CONTRIBUTING.rst PKG-INFO README.rst
95653d4
%license LICENSE
95653d4
%{python3_sitelib}/oslo_i18n
95653d4
%{python3_sitelib}/*.egg-info
Alan Pevec cf8c10b
%endif
95653d4
2a45254
%files -n python2-oslo-i18n-doc
b8d2ae6
%license LICENSE
b8d2ae6
%doc python2/doc/build/html
730f308
fa55fd1
%if 0%{?with_python3}
b8d2ae6
%files -n python3-oslo-i18n-doc
b8d2ae6
%license LICENSE
fa55fd1
%doc python3/doc/build/html
fa55fd1
%endif
fa55fd1
730f308
%changelog
d0ed5de
* Wed Sep 16 2015 Parag Nemade <pnemade AT redhat DOT com> - 2.6.0-1
d0ed5de
- Update to upstream 2.6.0
d0ed5de
14712ac
* Thu Sep 03 2015 Parag Nemade <pnemade AT redhat DOT com> - 2.5.0-4
14712ac
- Add explicit Provides: python-oslo-i18n for CBS Cloud buildroot
14712ac
- also add missing python_provide macro for -doc subpackages
14712ac
87d35e8
* Thu Sep 03 2015 Parag Nemade <pnemade AT redhat DOT com> - 2.5.0-3
87d35e8
- Also Obsolete python-oslo-i18n-doc package
87d35e8
2a45254
* Wed Sep 02 2015 Parag Nemade <pnemade AT redhat DOT com> - 2.5.0-2
2a45254
- Try to follow some new snippets from Python guidelines
2a45254
fa55fd1
* Wed Aug 26 2015 Parag Nemade <pnemade AT redhat DOT com> - 2.5.0-1
fa55fd1
- Update to upstream 2.5.0
b8d2ae6
- fix %%docs file list
b8d2ae6
- Add missing BuildRequires: python3-babel, python3-fixtures
b8d2ae6
- fix python shebang using sed
b8d2ae6
- Add python3-oslo-i18n-doc
fa55fd1
fc33a92
* Wed Aug 05 2015 Parag Nemade <pnemade AT redhat DOT com> - 2.4.0-1
fc33a92
- Update to upstream 2.4.0
fc33a92
fc33a92
* Wed Aug 05 2015 Parag Nemade <pnemade AT redhat DOT com> - 2.3.0-1
849bc52
- Update to upstream 2.3.0
849bc52
fc33a92
* Tue Jul 28 2015 Parag Nemade <pnemade AT redhat DOT com> - 2.2.0-1
1cb86a8
- Update to upstream 2.2.0
1cb86a8
fc33a92
* Wed Jul 22 2015 Parag Nemade <pnemade AT redhat DOT com> - 2.1.0-1
8061412
- Update to upstream 2.1.0
8061412
Alan Pevec e28b6a6
* Mon Jun 29 2015 Alan Pevec <alan.pevec@redhat.com> 2.0.0-1
Alan Pevec e28b6a6
- Update to upstream 2.0.0
Alan Pevec e28b6a6
e6473a9
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.0-4
e6473a9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
e6473a9
95653d4
* Thu Mar 12 2015 Parag Nemade <pnemade AT redhat DOT com> - 1.5.0-3
95653d4
- Add python3 subpackage
95653d4
837366a
* Thu Mar 12 2015 Parag Nemade <pnemade AT redhat DOT com> - 1.5.0-2
837366a
- Add missing buildtime and runtime dependencies
837366a
- fix rpmlint warning message
837366a
9f34f52
* Thu Mar 12 2015 Parag Nemade <pnemade AT redhat DOT com> - 1.5.0-1
9f34f52
- update to 1.5.0 release
9f34f52
- use %%license macro for license file
9f34f52
Alan Pevec 3e3c117
* Tue Feb 24 2015 Alan Pevec <alan.pevec@redhat.com> 1.4.0-1
Alan Pevec 3e3c117
- Update to upstream 1.4.0
Alan Pevec 3e3c117
23e73bb
* Fri Jan 09 2015 Parag Nemade <pnemade AT redhat DOT com> - 1.3.0-1
23e73bb
- update to 1.3.0 release
d524180
- Added BR: python-six
23e73bb
37b0f87
* Fri Dec 05 2014 Parag Nemade <pnemade AT redhat DOT com> - 1.1.0-1
37b0f87
- update to 1.1.0 release
37b0f87
f826744
* Fri Sep 19 2014 Parag Nemade <pnemade AT redhat DOT com> - 1.0.0-1
f826744
- update to 1.0.0 release
f826744
ea2ac21
* Thu Sep 18 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.4.0-1
ea2ac21
- update to 0.4.0 release
ea2ac21
1b6368d
* Wed Sep 10 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.3.0-1
1b6368d
- update to 0.3.0 release
1b6368d
82b4d22
* Thu Aug 21 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.2.0-1
82b4d22
- update to 0.2.0 release
82b4d22
730f308
* Thu Jul 10 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.1.0-2
730f308
- Use correct upstream URL
730f308
730f308
* Thu Jul 3 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.1.0-1
730f308
- Initial release