Add initial spec file for oslo.i18n

Change-Id: I7b650fa9f778e7379b9d73f19ee7fe43eab41c81
This commit is contained in:
Dirk Mueller 2015-09-03 14:12:40 +02:00
parent 976b758661
commit b960d13dd0

View File

@ -0,0 +1,60 @@
%global sname oslo.i18n
Name: {{ 'oslo.i18n' | pypackname_normalize }}
Version: 2.2.0
Release: 0
Summary: OpenStack i18n library
License: {{ 'Apache-2.0' | license_normalize }}
Url: https://launchpad.net/%{sname}
Source0: https://pypi.python.org/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros
BuildRequires: {{ 'Babel' | pypackname_normalize }}
BuildRequires: {{ 'oslotest' | pypackname_normalize }}
BuildRequires: {{ 'pbr' | pypackname_normalize }}
BuildRequires: {{ 'setuptools' | pypackname_normalize }}
Requires: {{ 'Babel' | pypackname_normalize }} >= 1.3
Requires: {{ 'six' | pypackname_normalize }} >= 1.9.0
BuildArch: noarch
%description
The oslo.i18n library contain utilities for working with internationalization
(i18n) features, especially translation for text strings in an application
or library.
%package doc
Summary: Documentation for OpenStack i18n library
BuildRequires: {{ 'Sphinx' | pypackname_normalize }}
BuildRequires: {{ 'oslosphinx' | pypackname_normalize }}
%description doc
Documentation for the oslo.i18n library.
%prep
%setup -q -n %{sname}-%{version}
%build
%{__python2} setup.py build
%install
%{__python2} setup.py install --skip-build --root %{buildroot}
# generate html docs
python setup.py build_sphinx
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%check
export PYTHONPATH="%{python2_sitelib}:%{buildroot}%{python2_sitelib}"
export PYTHON="python -S"
testr init && testr run --parallel
%files
%doc AUTHORS ChangeLog CONTRIBUTING.rst HACKING.rst LICENSE PKG-INFO README.rst
%{python2_sitelib}/oslo_i18n
%{python2_sitelib}/*.egg-info
%files doc
%doc html
%doc LICENSE
%changelog