diff --git a/debtcollector-1.20.0.tar.gz b/debtcollector-1.20.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..414f3eed261ce9b1c026bb632259b5b752982f0f Binary files /dev/null and b/debtcollector-1.20.0.tar.gz differ diff --git a/debtcollector-2.2.0.tar.gz b/debtcollector-2.2.0.tar.gz deleted file mode 100644 index d877dbb61cec45c666997777baacad5f8c83d817..0000000000000000000000000000000000000000 Binary files a/debtcollector-2.2.0.tar.gz and /dev/null differ diff --git a/python-debtcollector.spec b/python-debtcollector.spec index 6fbcf6d4610ae1ea90837473accdb3da0f6e70f2..ead0b2ba882e1b6ac8aa6c8cbe727af74b5d5ce3 100644 --- a/python-debtcollector.spec +++ b/python-debtcollector.spec @@ -1,78 +1,133 @@ -%global _empty_manifest_terminate_build 0 -Name: python-debtcollector -Version: 2.2.0 -Release: 2 -Summary: A collection of Python deprecation patterns and strategies that help you collect your technical debt in a non-destructive manner. -License: Apache-2.0 -URL: https://docs.openstack.org/debtcollector/latest -Source0: https://files.pythonhosted.org/packages/43/db/878dd456ccdbba6e466fc91e2534fd183a345a3fe261c4780a0e46c6dab0/debtcollector-2.2.0.tar.gz -BuildArch: noarch - -Requires: python3-pbr -Requires: python3-six -Requires: python3-wrapt +%global pypi_name debtcollector + +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%global with_python3 0 + +Name: python-%{pypi_name} +Version: 1.20.0 +Release: 1 +Summary: A collection of Python deprecation patterns and strategies + +License: Apache-2.0 +URL: https://pypi.python.org/pypi/%{pypi_name} +Source0: https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz + +BuildArch: noarch + +BuildRequires: git +BuildRequires: openstack-macros %description +It is a collection of functions/decorators which is used to signal a user when +* a method (static method, class method, or regular instance method) or a class + or function is going to be removed at some point in the future. +* to move a instance method/property/class from an existing one to a new one +* a keyword is renamed +* further customizing the emitted messages + +%package -n python2-%{pypi_name} +Summary: A collection of Python deprecation patterns and strategies +%{?python_provide:%python_provide python2-%{pypi_name}} + +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pbr + +Requires: python2-funcsigs +Requires: python2-pbr +Requires: python2-six +Requires: python2-wrapt + +%description -n python2-%{pypi_name} +It is a collection of functions/decorators which is used to signal a user when +* a method (static method, class method, or regular instance method) or a class + or function is going to be removed at some point in the future. +* to move a instance method/property/class from an existing one to a new one +* a keyword is renamed +* further customizing the emitted messages -%package -n python3-debtcollector -Summary: A collection of Python deprecation patterns and strategies that help you collect your technical debt in a non-destructive manner. -Provides: python-debtcollector -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-pip -BuildRequires: python3-pbr -%description -n python3-debtcollector +%package -n python-%{pypi_name}-doc +Summary: Documentation for the debtcollector module +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-fixtures +BuildRequires: python2-six +BuildRequires: python2-wrapt -%package help -Summary: Development documents and examples for debtcollector -Provides: python3-debtcollector-doc -%description help +%description -n python-%{pypi_name}-doc +Documentation for the debtcollector module +%if 0%{?with_python3} +%package -n python3-%{pypi_name} +Summary: A collection of Python deprecation patterns and strategies +%{?python_provide:%python_provide python3-%{pypi_name}} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr + +Requires: python3-funcsigs +Requires: python3-pbr +Requires: python3-six +Requires: python3-wrapt + +%description -n python3-%{pypi_name} +It is a collection of functions/decorators which is used to signal a user when +* a method (static method, class method, or regular instance method) or a class + or function is going to be removed at some point in the future. +* to move a instance method/property/class from an existing one to a new one +* a keyword is renamed +* further customizing the emitted messages +%endif %prep -%autosetup -n debtcollector-2.2.0 +%autosetup -n %{pypi_name}-%{upstream_version} -S git + +# let RPM handle deps +%py_req_cleanup %build +%py2_build + +# doc +%{__python2} setup.py build_sphinx -b html +# Fix hidden-file-or-dir warnings +rm -fr doc/build/html/.buildinfo + +%if 0%{?with_python3} %py3_build +%endif %install +%py2_install + +%if 0%{?with_python3} %py3_install -install -d -m755 %{buildroot}/%{_pkgdocdir} -if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi -if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi -if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi -if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi -pushd %{buildroot} -if [ -d usr/lib ]; then - find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/lib64 ]; then - find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/bin ]; then - find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/sbin ]; then - find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst -fi -touch doclist.lst -if [ -d usr/share/man ]; then - find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst -fi -popd -mv %{buildroot}/filelist.lst . -mv %{buildroot}/doclist.lst . - -%files -n python3-debtcollector -f filelist.lst -%dir %{python3_sitelib}/* - -%files help -f doclist.lst -%{_docdir}/* +%endif + +%files -n python2-%{pypi_name} +%doc README.rst CONTRIBUTING.rst +%license LICENSE +%{python2_sitelib}/%{pypi_name} +%{python2_sitelib}/%{pypi_name}*.egg-info +%exclude %{python2_sitelib}/%{pypi_name}/tests + +%files -n python-%{pypi_name}-doc +%doc doc/build/html +%license LICENSE + +%if 0%{?with_python3} +%files -n python3-%{pypi_name} +%doc README.rst CONTRIBUTING.rst +%license LICENSE +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/%{pypi_name}*.egg-info +%exclude %{python2_sitelib}/%{pypi_name}/tests +%endif %changelog -* Sat Jan 30 2021 zhangy -- Add buildrequires -* Fri Nov 20 2020 Python_Bot +* Fri May 14 2021 Python_Bot - Package Spec generated