Blame python-oslo-i18n.spec

730f30
%global sname oslo.i18n
730f30
730f30
Name:           python-oslo-i18n
82b4d2
Version:        0.2.0
82b4d2
Release:        1%{?dist}
730f30
Summary:        OpenStack i18n library
730f30
License:        ASL 2.0
82b4d2
URL:            https://github.com/openstack/%{sname}
730f30
Source0:        https://pypi.python.org/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
730f30
730f30
BuildRequires:  python2-devel
730f30
BuildRequires:  python-setuptools
730f30
BuildRequires:  python-pbr
730f30
BuildArch:      noarch
730f30
Requires:       python-setuptools
730f30
730f30
%description
730f30
The oslo.i18n library contain utilities for working with internationalization
730f30
(i18n) features, especially translation for text strings in an application
730f30
or library.
730f30
730f30
%package doc
730f30
Summary:    Documentation for OpenStack i18n library
730f30
BuildRequires: python-sphinx
730f30
BuildRequires: python-oslo-sphinx
730f30
730f30
%description doc
730f30
Documentation for the oslo.i18n library.
730f30
730f30
730f30
%prep
730f30
%setup -q -n %{sname}-%{version}
730f30
730f30
# Remove bundled egg-info
730f30
rm -rf %{sname}.egg-info
730f30
730f30
# make doc build compatible with python-oslo-sphinx RPM
730f30
sed -i 's/oslosphinx/oslo.sphinx/' doc/source/conf.py
730f30
730f30
%build
730f30
%{__python2} setup.py build
730f30
730f30
%install
730f30
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
730f30
730f30
# Delete tests
730f30
rm -fr %{buildroot}%{python_sitelib}/tests
730f30
730f30
export PYTHONPATH="$( pwd ):$PYTHONPATH"
730f30
pushd doc
730f30
sphinx-build -b html -d build/doctrees   source build/html
730f30
popd
730f30
730f30
# Fix hidden-file-or-dir warnings
730f30
rm -fr doc/build/html/.buildinfo
730f30
730f30
%files
730f30
%doc AUTHORS ChangeLog CONTRIBUTING.rst HACKING.rst LICENSE PKG-INFO README.rst
730f30
%{python2_sitelib}/oslo
730f30
%{python2_sitelib}/*.egg-info
730f30
%{python2_sitelib}/*.pth
730f30
730f30
%files doc
730f30
%doc doc/build/html
730f30
730f30
%changelog
82b4d2
* Thu Aug 21 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.2.0-1
82b4d2
- update to 0.2.0 release
82b4d2
730f30
* Thu Jul 10 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.1.0-2
730f30
- Use correct upstream URL
730f30
730f30
* Thu Jul 3 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.1.0-1
730f30
- Initial release