%bcond_with runtests %global debug_package %{nil} Name: pykickstart Version: 3.16 Release: 2 Summary: Python tools for using kickstart files. License: GPLv2 and MIT Url: http://fedoraproject.org/wiki/pykickstart Source0: %{name}-%{version}.tar.gz BuildRequires: gettext git BuildRequires: python2-coverage python2-devel python2-nose python2-ordered-set python2-setuptools python2-requests BuildRequires: python3-coverage python3-devel python3-nose python3-ordered-set python3-requests python3-setuptools python3-six python3-sphinx Requires: python3-kickstart = %{version}-%{release} %description %{name} provides python utilities for manipulating kickstart files. python-kickstart and python3-kickstart provide libraries and header files respectively. %package help Summary: Help manual for %{name} %description help The %{name}-help package conatins man manual %package -n python2-kickstart %{?python_provide:%python_provide python2-kickstart} %{?python_provide:%python_provide python2-pykickstart} Summary: Python 2 library for manipulating kickstart files. Requires: python2-six python2-requests python2-ordered-set %description -n python2-kickstart Python 2 library and header files of %{name} %package -n python3-kickstart Summary: Python 3 library for manipulating kickstart files. Requires: python3-six python3-requests python3-ordered-set %description -n python3-kickstart Python 3 library and header files of %{name} %package -n python-kickstart-help Summary: Help manual for python2-kickstart and python3-kickstart %description -n python-kickstart-help The python-kickstart-help package conatins kickstart-docs and programmers-guide %prep %autosetup -n %{name}-%{version} -p1 -Sgit rm -rf %{py3dir} mkdir %{py3dir} cp -a . %{py3dir} %build make PYTHON=%{__python2} make -C %{py3dir} PYTHON=%{__python3} %install make PYTHON=%{__python2} DESTDIR=%{buildroot} install make -C %{py3dir} PYTHON=%{__python3} DESTDIR=%{buildroot} install %check %if %{with runtests} make -C %{py3dir} PYTHON=%{__python3} test %endif %files %license COPYING %doc data/kickstart.vim %doc README.rst %{_bindir}/ksvalidator %{_bindir}/ksflatten %{_bindir}/ksverdiff %{_bindir}/ksshell %files help %{_mandir}/man1/ksflatten.1.gz %{_mandir}/man1/ksshell.1.gz %{_mandir}/man1/ksvalidator.1.gz %{_mandir}/man1/ksverdiff.1.gz %files -n python2-kickstart %{python2_sitelib}/pykickstart*.egg-info %{python2_sitelib}/pykickstart %files -n python3-kickstart %{python3_sitelib}/pykickstart %{python3_sitelib}/pykickstart*.egg-info %files -n python-kickstart-help %doc docs/2to3 %doc docs/programmers-guide %doc docs/kickstart-docs.txt %changelog * Sat Oct 19 2019 openEuler Buildteam - 3.16-2 - Package init