diff --git a/.gitignore b/.gitignore index e69de29..6936ccb 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/oslo.i18n-0.1.0.tar.gz diff --git a/python-oslo-i18n.spec b/python-oslo-i18n.spec new file mode 100644 index 0000000..b960bc5 --- /dev/null +++ b/python-oslo-i18n.spec @@ -0,0 +1,71 @@ +%global sname oslo.i18n + +Name: python-oslo-i18n +Version: 0.1.0 +Release: 2%{?dist} +Summary: OpenStack i18n library +License: ASL 2.0 +URL: https://github.com/openstack/oslo.i18n +Source0: https://pypi.python.org/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz + +BuildRequires: python2-devel +BuildRequires: python-setuptools +BuildRequires: python-pbr +BuildArch: noarch +Requires: python-setuptools + +%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: python-sphinx +BuildRequires: python-oslo-sphinx + +%description doc +Documentation for the oslo.i18n library. + + +%prep +%setup -q -n %{sname}-%{version} + +# Remove bundled egg-info +rm -rf %{sname}.egg-info + +# make doc build compatible with python-oslo-sphinx RPM +sed -i 's/oslosphinx/oslo.sphinx/' doc/source/conf.py + +%build +%{__python2} setup.py build + +%install +%{__python2} setup.py install -O1 --skip-build --root %{buildroot} + +# Delete tests +rm -fr %{buildroot}%{python_sitelib}/tests + +export PYTHONPATH="$( pwd ):$PYTHONPATH" +pushd doc +sphinx-build -b html -d build/doctrees source build/html +popd + +# Fix hidden-file-or-dir warnings +rm -fr doc/build/html/.buildinfo + +%files +%doc AUTHORS ChangeLog CONTRIBUTING.rst HACKING.rst LICENSE PKG-INFO README.rst +%{python2_sitelib}/oslo +%{python2_sitelib}/*.egg-info +%{python2_sitelib}/*.pth + +%files doc +%doc doc/build/html + +%changelog +* Thu Jul 10 2014 Parag Nemade - 0.1.0-2 +- Use correct upstream URL + +* Thu Jul 3 2014 Parag Nemade - 0.1.0-1 +- Initial release diff --git a/sources b/sources index e69de29..224c47f 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +7a4e9139c8d0a28bb07ff4c4ec1218cb oslo.i18n-0.1.0.tar.gz