diff --git a/automaton-1.15.0.tar.gz b/automaton-1.15.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..61bebdf1bd0d3f5e037ed1dfc9926f3ccdf8a39b Binary files /dev/null and b/automaton-1.15.0.tar.gz differ diff --git a/automaton-2.2.0.tar.gz b/automaton-2.2.0.tar.gz deleted file mode 100644 index 4436825ec723b248720ca6c70959130f37157e1d..0000000000000000000000000000000000000000 Binary files a/automaton-2.2.0.tar.gz and /dev/null differ diff --git a/python-automaton.spec b/python-automaton.spec index d9b68ed469293a77fb6e01c29bed035a40772356..cfc2f694cb0a8838123f7c579388a3f5f1996b83 100644 --- a/python-automaton.spec +++ b/python-automaton.spec @@ -1,78 +1,98 @@ -%global _empty_manifest_terminate_build 0 -Name: python-automaton -Version: 2.2.0 -Release: 1 -Summary: Friendly state machines for python. -License: Apache-2.0 -URL: https://docs.openstack.org/automaton/latest/ -Source0: https://files.pythonhosted.org/packages/42/8b/e6edfe8a75cd21215fe0529f700c75c6da325a3e948062c276cdcd036bcf/automaton-2.2.0.tar.gz -BuildArch: noarch - -Requires: python3-PrettyTable -Requires: python3-pbr -Requires: python3-pip -Requires: python3-six +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} +%global pypi_name automaton + +%global with_python3 0 + +Name: python-%{pypi_name} +Version: 1.15.0 +Release: 1 +Summary: Friendly state machines for python + +License: Apache-2.0 +URL: https://wiki.openstack.org/wiki/Oslo#automaton +Source0: https://pypi.io/packages/source/a/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch %description Friendly state machines for python. +%package -n python2-%{pypi_name} +Summary: Friendly state machines for python +%{?python_provide:%python_provide python2-%{pypi_name}} +BuildRequires: python2-devel +BuildRequires: python2-pbr +BuildRequires: git +BuildRequires: graphviz +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-prettytable + +Requires: python2-pbr >= 2.0.0 +Requires: python2-six >= 1.10.0 +Requires: python2-prettytable -%package -n python3-automaton -Summary: Friendly state machines for python. -Provides: python-automaton -BuildRequires: python3-devel -BuildRequires: python3-pip +%description -n python2-%{pypi_name} +Friendly state machines for python. + +%if 0%{?with_python3} +%package -n python3-%{pypi_name} +Summary: Friendly state machines for python +%{?python_provide:%python_provide python3-%{pypi_name}} +BuildRequires: python3-devel BuildRequires: python3-pbr -BuildRequires: python3-setuptools -%description -n python3-automaton + +Requires: python3-pbr >= 2.0.0 +Requires: python3-six >= 1.10.0 +Requires: python3-prettytable + +%description -n python3-%{pypi_name} Friendly state machines for python. +%endif + +%package -n python-%{pypi_name}-doc +Summary: Friendly state machines for python - documentation -%package help -Summary: Development documents and examples for automaton -Provides: python3-automaton-doc -%description help -Friendly state machines for python. (document) +%description -n python-%{pypi_name}-doc +Friendly state machines for python (documentation) %prep -%autosetup -n automaton-2.2.0 +%autosetup -n %{pypi_name}-%{upstream_version} -S git %build +%if 0%{?with_python3} %py3_build +%endif +%py2_build + +# generate html docs +%{__python2} setup.py build_sphinx -b html +# remove the sphinx-build leftovers +rm -rf doc/build/html/.{doctrees,buildinfo} %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-automaton -f filelist.lst -%dir %{python3_sitelib}/* - -%files help -f doclist.lst -%{_docdir}/* +%endif +%py2_install + +%files -n python2-%{pypi_name} +%doc README.rst +%license LICENSE +%{python2_sitelib}/%{pypi_name} +%{python2_sitelib}/*.egg-info + +%if 0%{?with_python3} +%files -n python3-%{pypi_name} +%doc README.rst +%license LICENSE +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/*.egg-info +%endif + +%files -n python-%{pypi_name}-doc +%doc doc/build/html +%license LICENSE %changelog -* Mon Nov 23 2020 Python_Bot +* Fri May 07 2021 Python_Bot - Package Spec generated