diff --git a/.gitignore b/.gitignore index e69de29..89d4185 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/oslo.policy-0.3.1.tar.gz diff --git a/python-oslo-policy.spec b/python-oslo-policy.spec new file mode 100644 index 0000000..c3995bf --- /dev/null +++ b/python-oslo-policy.spec @@ -0,0 +1,70 @@ +%global pypi_name oslo.policy + +Name: python-oslo-policy +Version: 0.3.1 +Release: 1%{?dist} +Summary: OpenStack Oslo Policy library + +License: ASL 2.0 +URL: https://launchpad.net/oslo +Source0: https://pypi.python.org/packages/source/o/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python2-devel +BuildRequires: python-pbr +# for docs build +BuildRequires: python-oslo-config >= 1.9.0 +BuildRequires: python-oslo-i18n >= 1.3.0 +BuildRequires: python-oslo-serialization >= 1.2.0 + +Requires: python-oslo-config >= 1.9.0 +Requires: python-oslo-i18n >= 1.3.0 +Requires: python-oslo-serialization >= 1.2.0 + +%description +The OpenStack Oslo Policy library. +RBAC policy enforcement library for OpenStack. + +%package doc +Summary: Documentation for the Oslo Policy library +Group: Documentation + +BuildRequires: python-sphinx +BuildRequires: python-oslo-sphinx + +%description doc +Documentation for the Oslo Policy library. + +%prep +%setup -q -n %{pypi_name}-%{version} +# Let RPM handle the dependencies +rm -f requirements.txt + +%build +%{__python2} setup.py build + +# generate html docs +sphinx-build doc/source html +# remove the sphinx-build leftovers +rm -rf html/.{doctrees,buildinfo} + +%install +%{__python2} setup.py install --skip-build --root %{buildroot} + +#delete tests +rm -fr %{buildroot}%{python2_sitelib}/%{pypi_name}/tests/ + +%files +%{!?_licensedir:%global license %%doc} +%license LICENSE +%doc README.rst +%{python2_sitelib}/oslo_policy +%{python2_sitelib}/*.egg-info + +%files doc +%license LICENSE +%doc html + +%changelog +* Sat Mar 7 2015 Dan Prince - 0.3.1-1 +- Initial package diff --git a/sources b/sources index e69de29..8e7854b 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +4a0b2d6ac1c64967eacb83a527871007 oslo.policy-0.3.1.tar.gz