Fix python2 subpackage builds. (#1564347)
Disable tests by default because they fail in mock right now.
This commit is contained in:
parent
9f7dfbba3c
commit
f8dea06687
@ -4,9 +4,14 @@
|
|||||||
%bcond_without python2
|
%bcond_without python2
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# Disable tests by default because they fail to run inside mock builds
|
||||||
|
# at the moment, but can run locally. To build and run tests, do:
|
||||||
|
# rpmbuild -ba --with runtests pykickstart.spec
|
||||||
|
%bcond_with runtests
|
||||||
|
|
||||||
Name: pykickstart
|
Name: pykickstart
|
||||||
Version: 3.12
|
Version: 3.12
|
||||||
Release: 2.1%{?dist}
|
Release: 4%{?dist}
|
||||||
License: GPLv2 and MIT
|
License: GPLv2 and MIT
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
Summary: Python utilities for manipulating kickstart files.
|
Summary: Python utilities for manipulating kickstart files.
|
||||||
@ -15,7 +20,6 @@ Url: http://fedoraproject.org/wiki/pykickstart
|
|||||||
# our distribution. Thus the source is only available from
|
# our distribution. Thus the source is only available from
|
||||||
# within this srpm.
|
# within this srpm.
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
Patch0: p1
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -24,7 +28,7 @@ BuildRequires: gettext
|
|||||||
BuildRequires: python2-coverage
|
BuildRequires: python2-coverage
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
BuildRequires: python2-nose
|
BuildRequires: python2-nose
|
||||||
BuildRequires: python2-ordered-set
|
BuildRequires: python-ordered-set
|
||||||
BuildRequires: python2-setuptools
|
BuildRequires: python2-setuptools
|
||||||
BuildRequires: python2-requests
|
BuildRequires: python2-requests
|
||||||
%endif
|
%endif
|
||||||
@ -73,7 +77,6 @@ the pykickstart package.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
|
||||||
|
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
rm -rf %{py3dir}
|
rm -rf %{py3dir}
|
||||||
@ -98,11 +101,13 @@ make PYTHON=%{__python3} DESTDIR=%{buildroot} install
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with runtests}
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
make -C %{py3dir} PYTHON=%{__python3} test
|
make -C %{py3dir} PYTHON=%{__python3} test
|
||||||
%else
|
%else
|
||||||
make PYTHON=%{__python3} test
|
make PYTHON=%{__python3} test
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
@ -113,7 +118,10 @@ make PYTHON=%{__python3} test
|
|||||||
%{_bindir}/ksflatten
|
%{_bindir}/ksflatten
|
||||||
%{_bindir}/ksverdiff
|
%{_bindir}/ksverdiff
|
||||||
%{_bindir}/ksshell
|
%{_bindir}/ksshell
|
||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/ksflatten.1.gz
|
||||||
|
%{_mandir}/man1/ksshell.1.gz
|
||||||
|
%{_mandir}/man1/ksvalidator.1.gz
|
||||||
|
%{_mandir}/man1/ksverdiff.1.gz
|
||||||
|
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
%files -n python2-kickstart
|
%files -n python2-kickstart
|
||||||
@ -121,11 +129,8 @@ make PYTHON=%{__python3} test
|
|||||||
%doc docs/2to3
|
%doc docs/2to3
|
||||||
%doc docs/programmers-guide
|
%doc docs/programmers-guide
|
||||||
%doc docs/kickstart-docs.txt
|
%doc docs/kickstart-docs.txt
|
||||||
%{python2_sitelib}/pykickstart*egg*
|
%{python2_sitelib}/pykickstart*.egg-info
|
||||||
%{python2_sitelib}/pykickstart/
|
%{python2_sitelib}/pykickstart
|
||||||
%{python2_sitelib}/pykickstart/commands/
|
|
||||||
%{python2_sitelib}/pykickstart/handlers/
|
|
||||||
%{python2_sitelib}/pykickstart/locale/
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -n python3-kickstart
|
%files -n python3-kickstart
|
||||||
@ -133,13 +138,14 @@ make PYTHON=%{__python3} test
|
|||||||
%doc docs/2to3
|
%doc docs/2to3
|
||||||
%doc docs/programmers-guide
|
%doc docs/programmers-guide
|
||||||
%doc docs/kickstart-docs.txt
|
%doc docs/kickstart-docs.txt
|
||||||
%{python3_sitelib}/pykickstart*egg*
|
%{python3_sitelib}/pykickstart
|
||||||
%{python3_sitelib}/pykickstart/
|
%{python3_sitelib}/pykickstart*.egg-info
|
||||||
%{python3_sitelib}/pykickstart/commands/
|
|
||||||
%{python3_sitelib}/pykickstart/handlers/
|
|
||||||
%{python3_sitelib}/pykickstart/locale/
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 16 2018 David Cantrell <dcantrell@redhat.com> - 3.12-4
|
||||||
|
- Fix python2 subpackage builds. (#1564347)
|
||||||
|
- Disable tests by default because they fail in mock right now.
|
||||||
|
|
||||||
* Thu Apr 12 2018 David Cantrell <dcantrell@redhat.com> - 3.12-3
|
* Thu Apr 12 2018 David Cantrell <dcantrell@redhat.com> - 3.12-3
|
||||||
- Re-enable the python2 subpackages on Fedora for now. Some
|
- Re-enable the python2 subpackages on Fedora for now. Some
|
||||||
programs still need it and have not moved to python3 yet. (#1564347)
|
programs still need it and have not moved to python3 yet. (#1564347)
|
||||||
|
Loading…
Reference in New Issue
Block a user