diff --git a/.gitignore b/.gitignore index 561f276..2faca06 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /oslo.middleware-2.3.0.tar.gz /oslo.middleware-2.5.0.tar.gz /oslo.middleware-2.8.0.tar.gz +/oslo.middleware-3.7.0.tar.gz diff --git a/Changelog.old b/Changelog.old new file mode 100644 index 0000000..c05e199 --- /dev/null +++ b/Changelog.old @@ -0,0 +1,17 @@ +* Thu Feb 04 2016 Fedora Release Engineering - 2.8.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Sep 17 2015 Alan Pevec 2.8.0-1 +- Update to upstream 2.8.0 + +* Tue Aug 18 2015 Alan Pevec 2.5.0-1 +- Update to upstream 2.5.0 + +* Mon Jun 29 2015 Alan Pevec 2.3.0-1 +- Update to upstream 2.3.0 + +* Thu Jun 18 2015 Fedora Release Engineering - 1.0.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri Mar 27 2015 Alan Pevec - 1.0.0-2 +- Initial package based on openstack-packages spec by dprince diff --git a/python-oslo-middleware.spec b/python-oslo-middleware.spec index 7454fc2..5cfed72 100644 --- a/python-oslo-middleware.spec +++ b/python-oslo-middleware.spec @@ -1,8 +1,15 @@ +%if 0%{?fedora} >= 24 +%global with_python3 1 +%endif + %global pypi_name oslo.middleware +%global pkg_name oslo-middleware + +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} Name: python-oslo-middleware -Version: 2.8.0 -Release: 2%{?dist} +Version: 3.7.0 +Release: 1%{?dist} Summary: OpenStack Oslo Middleware library License: ASL 2.0 @@ -10,28 +17,93 @@ URL: https://launchpad.net/oslo Source0: https://pypi.python.org/packages/source/o/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch +%package -n python2-%{pkg_name} +Summary: OpenStack Oslo Middleware library +%{?python_provide:%python_provide python2-%{pkg_name}} + BuildRequires: python2-devel BuildRequires: python-pbr # for docs build BuildRequires: python-oslo-config BuildRequires: python-oslo-context BuildRequires: python-oslo-i18n +BuildRequires: python-oslo-utils +# Required for testing +BuildRequires: python-fixtures +BuildRequires: python-hacking +BuildRequires: python-mock +BuildRequires: python-oslotest +BuildRequires: python-testtools +BuildRequires: python-webob Requires: python-babel +Requires: python-jinja2 Requires: python-oslo-config Requires: python-oslo-context Requires: python-oslo-i18n +Requires: python-oslo-utils Requires: python-six Requires: python-stevedore Requires: python-webob -%description +%description -n python2-%{pkg_name} +The OpenStack Oslo Middleware library. +Oslo middleware library includes components that can be injected into wsgi +pipelines to intercept request/response flows. The base class can be +enhanced with functionality like add/delete/modification of http headers +and support for limiting size/connection etc. + +%if 0%{?with_python3} +%package -n python3-%{pkg_name} +Summary: OpenStack Oslo Middleware library +%{?python_provide:%python_provide python3-%{pkg_name}} + +BuildRequires: python3-devel +BuildRequires: python3-pbr +# for docs build +BuildRequires: python3-oslo-config +BuildRequires: python3-oslo-context +BuildRequires: python3-oslo-i18n +# Required for testing +BuildRequires: python3-fixtures +BuildRequires: python3-hacking +BuildRequires: python3-mock +BuildRequires: python3-oslotest +BuildRequires: python3-testtools +BuildRequires: python3-webob + +Requires: python3-babel +Requires: python3-jinja2 +Requires: python3-oslo-config +Requires: python3-oslo-context +Requires: python3-oslo-i18n +Requires: python3-oslo-utils +Requires: python3-six +Requires: python3-stevedore +Requires: python3-webob + +%description -n python3-%{pkg_name} The OpenStack Oslo Middleware library. Oslo middleware library includes components that can be injected into wsgi pipelines to intercept request/response flows. The base class can be enhanced with functionality like add/delete/modification of http headers and support for limiting size/connection etc. +%package -n python3-%{pkg_name}-tests +Summary: Tests for the Oslo Middleware library + +Requires: python3-%{pkg_name} = %{version}-%{release} +Requires: python3-fixtures +Requires: python3-hacking +Requires: python3-mock +Requires: python3-oslotest +Requires: python3-testtools + +%description -n python3-%{pkg_name}-tests +Tests for the Oslo Middleware library. + +%endif + %package doc Summary: Documentation for the Oslo Middleware library Group: Documentation @@ -42,13 +114,37 @@ BuildRequires: python-oslo-sphinx %description doc Documentation for the Oslo Middleware library. +%package -n python2-%{pkg_name}-tests +Summary: Tests for the Oslo Middleware library + +Requires: python-%{pkg_name} = %{version}-%{release} +Requires: python-fixtures +Requires: python-hacking +Requires: python-mock +Requires: python-oslotest +Requires: python-testtools + +%description -n python2-%{pkg_name}-tests +Tests for the Oslo Middleware library. + +%description +The OpenStack Oslo Middleware library. +Oslo middleware library includes components that can be injected into wsgi +pipelines to intercept request/response flows. The base class can be +enhanced with functionality like add/delete/modification of http headers +and support for limiting size/connection etc. + %prep -%setup -q -n %{pypi_name}-%{version} +%setup -q -n %{pypi_name}-%{upstream_version} # Let RPM handle the dependencies -rm -f requirements.txt +rm -rf {test-,}requirements.txt %build -%{__python2} setup.py build +%py2_build + +%if 0%{?with_python3} +%py3_build +%endif # generate html docs sphinx-build doc/source html @@ -56,40 +152,45 @@ sphinx-build doc/source html rm -rf html/.{doctrees,buildinfo} %install -%{__python2} setup.py install --skip-build --root %{buildroot} +%py2_install + +%if 0%{?with_python3} +%py3_install +%endif -#delete tests -rm -fr %{buildroot}%{python2_sitelib}/%{pypi_name}/tests/ +%check +%{__python2} setup.py test +%if 0%{?with_python3} +rm -rf .testrepository +%{__python3} setup.py test +%endif -%files -%{!?_licensedir:%global license %%doc} +%files -n python2-%{pkg_name} %license LICENSE %doc README.rst %{python2_sitelib}/oslo_middleware %{python2_sitelib}/*.egg-info -# compatibility oslo namespace -%{python2_sitelib}/oslo -%{python2_sitelib}/*-nspkg.pth +%exclude %{python2_sitelib}/oslo_middleware/tests/ -%files doc +%if 0%{?with_python3} +%files -n python3-%{pkg_name} %license LICENSE -%doc html - -%changelog -* Thu Feb 04 2016 Fedora Release Engineering - 2.8.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild +%doc README.rst +%{python3_sitelib}/oslo_middleware +%{python3_sitelib}/*.egg-info -* Thu Sep 17 2015 Alan Pevec 2.8.0-1 -- Update to upstream 2.8.0 +%files -n python3-%{pkg_name}-tests +%{python3_sitelib}/oslo_middleware/tests/ +%endif -* Tue Aug 18 2015 Alan Pevec 2.5.0-1 -- Update to upstream 2.5.0 +%files doc +%license LICENSE +%doc html -* Mon Jun 29 2015 Alan Pevec 2.3.0-1 -- Update to upstream 2.3.0 +%files -n python2-%{pkg_name}-tests +%{python2_sitelib}/oslo_middleware/tests/ -* Thu Jun 18 2015 Fedora Release Engineering - 1.0.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild +%changelog +* Wed Mar 23 2016 Haikel Guemar 3.7.0- +- Update to 3.7.0 -* Fri Mar 27 2015 Alan Pevec - 1.0.0-2 -- Initial package based on openstack-packages spec by dprince diff --git a/sources b/sources index 0d233f3..b265d11 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9620373b36771dc4cafd4a5e7776af4e oslo.middleware-2.8.0.tar.gz +fd6d001bc83106096cbc942b10e0a823 oslo.middleware-3.7.0.tar.gz