Compare commits
No commits in common. "c8" and "c8s-stream-3.6" have entirely different histories.
c8
...
c8s-stream
@ -1,8 +1,18 @@
|
|||||||
|
%bcond_without python3
|
||||||
|
%bcond_with python36_module
|
||||||
|
|
||||||
%global modname nose
|
%global modname nose
|
||||||
|
|
||||||
# Enable building without docs to avoid a circular dependency between this and python-sphinx
|
# Enable building without docs to avoid a circular dependency between this and python-sphinx
|
||||||
|
#
|
||||||
|
# Docs disabled permanently because the docs build config is not ported to
|
||||||
|
# Python 3 and thus cannot be built with Python 3 version of Sphinx.
|
||||||
%bcond_with docs
|
%bcond_with docs
|
||||||
|
|
||||||
|
# python2X and python3X are built form the same module, so we need a conditional for python2 bits
|
||||||
|
# the state of the conditional is not important in the spec, it is set in modulemd
|
||||||
|
%bcond_with python2
|
||||||
|
|
||||||
%global desc nose extends the test loading and running features of unit test, making\
|
%global desc nose extends the test loading and running features of unit test, making\
|
||||||
it easier to write, find and run tests.\
|
it easier to write, find and run tests.\
|
||||||
\
|
\
|
||||||
@ -21,7 +31,7 @@ output capture and more.\
|
|||||||
|
|
||||||
Name: python-%{modname}
|
Name: python-%{modname}
|
||||||
Version: 1.3.7
|
Version: 1.3.7
|
||||||
Release: 23%{?dist}
|
Release: 31%{?dist}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
License: LGPLv2+ and Public Domain
|
License: LGPLv2+ and Public Domain
|
||||||
@ -51,33 +61,47 @@ BuildRequires: dos2unix
|
|||||||
|
|
||||||
%package docs
|
%package docs
|
||||||
Summary: Nose Documentation
|
Summary: Nose Documentation
|
||||||
|
%if %{with python3}
|
||||||
%if %{with docs}
|
%if %{with docs}
|
||||||
BuildRequires: %{_bindir}/sphinx-build
|
BuildRequires: %{_bindir}/sphinx-build-3
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description docs
|
%description docs
|
||||||
Documentation for Nose.
|
Documentation for Nose.
|
||||||
|
|
||||||
|
%if %{with python2}
|
||||||
%package -n python2-%{modname}
|
%package -n python2-%{modname}
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
BuildRequires: python2-setuptools
|
BuildRequires: python2-setuptools
|
||||||
|
BuildRequires: python2-coverage >= 3.4-1
|
||||||
Requires: python2-setuptools
|
Requires: python2-setuptools
|
||||||
%{?python_provide:%python_provide python2-%{modname}}
|
%{?python_provide:%python_provide python2-%{modname}}
|
||||||
|
|
||||||
%description -n python2-%{modname}
|
%description -n python2-%{modname}
|
||||||
%{desc}
|
%{desc}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
%package -n python3-%{modname}
|
%package -n python3-%{modname}
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
|
%if %{with python36_module}
|
||||||
|
BuildRequires: python36-devel
|
||||||
|
BuildRequires: python36-rpm-macros
|
||||||
|
%else
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
|
%endif
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
BuildRequires: python3-coverage >= 3.4-1
|
BuildRequires: python3-coverage >= 3.4-1
|
||||||
%if 0%{?rhel} && 0%{?rhel} >= 8
|
|
||||||
Requires: platform-python-setuptools
|
# Require alternatives version that implements the --keep-foreign flag
|
||||||
%else
|
Requires(postun): alternatives >= 1.19.1-1
|
||||||
|
# For alternatives
|
||||||
|
Requires: python36
|
||||||
|
Requires(post): python36
|
||||||
|
Requires(postun): python36
|
||||||
Requires: python3-setuptools
|
Requires: python3-setuptools
|
||||||
%endif
|
|
||||||
%{?python_provide:%python_provide python3-%{modname}}
|
%{?python_provide:%python_provide python3-%{modname}}
|
||||||
Obsoletes: platform-python-%{modname} < %{version}-%{release}
|
Obsoletes: platform-python-%{modname} < %{version}-%{release}
|
||||||
|
|
||||||
@ -86,6 +110,7 @@ Obsoletes: platform-python-%{modname} < %{version}-%{release}
|
|||||||
|
|
||||||
This package installs the nose module and nosetests3 program that can discover
|
This package installs the nose module and nosetests3 program that can discover
|
||||||
python3 unit tests.
|
python3 unit tests.
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -qc
|
%setup -qc
|
||||||
@ -94,63 +119,106 @@ pushd %{modname}-%{version}
|
|||||||
dos2unix examples/attrib_plugin.py
|
dos2unix examples/attrib_plugin.py
|
||||||
cp -pr lgpl.txt AUTHORS CHANGELOG examples NEWS README.txt ..
|
cp -pr lgpl.txt AUTHORS CHANGELOG examples NEWS README.txt ..
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
mv %{modname}-%{version} python3
|
||||||
|
%endif
|
||||||
|
%if %{with python2}
|
||||||
mv %{modname}-%{version} python2
|
mv %{modname}-%{version} python2
|
||||||
cp -pr python2 python3
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if %{with python2}
|
||||||
pushd python2
|
pushd python2
|
||||||
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
|
|
||||||
%py2_build
|
%py2_build
|
||||||
popd
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
pushd python3
|
pushd python3
|
||||||
%py3_build
|
%py3_build
|
||||||
popd
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %{buildroot}%{_mandir}/man1
|
mkdir -p %{buildroot}%{_mandir}/man1
|
||||||
|
|
||||||
|
%if %{with python2}
|
||||||
pushd python2
|
pushd python2
|
||||||
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
|
|
||||||
%py2_install
|
%py2_install
|
||||||
mv %{buildroot}%{_bindir}/nosetests{,-%{python2_version}}
|
mv %{buildroot}%{_bindir}/nosetests{,-%{python2_version}}
|
||||||
ln -sf nosetests-%{python2_version} %{buildroot}%{_bindir}/nosetests-2
|
ln -sf nosetests-%{python2_version} %{buildroot}%{_bindir}/nosetests-2
|
||||||
mv %{buildroot}%{_prefix}/man/man1/nosetests.1 %{buildroot}%{_mandir}/man1/nosetests-%{python2_version}.1
|
mv %{buildroot}%{_prefix}/man/man1/nosetests.1 %{buildroot}%{_mandir}/man1/nosetests-%{python2_version}.1
|
||||||
ln -sf nosetests-%{python2_version}.1 %{buildroot}%{_mandir}/man1/nosetests-2.1
|
ln -sf nosetests-%{python2_version}.1 %{buildroot}%{_mandir}/man1/nosetests-2.1
|
||||||
popd
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
pushd python3
|
pushd python3
|
||||||
%py3_install
|
%py3_install
|
||||||
mv %{buildroot}%{_bindir}/nosetests{,-%{python3_version}}
|
mv %{buildroot}%{_bindir}/nosetests{,-%{python3_version}}
|
||||||
ln -sf nosetests-%{python3_version} %{buildroot}%{_bindir}/nosetests-3
|
touch %{buildroot}%{_bindir}/nosetests-3 # for alternatives
|
||||||
mv %{buildroot}%{_prefix}/man/man1/nosetests.1 %{buildroot}%{_mandir}/man1/nosetests-%{python3_version}.1
|
mv %{buildroot}%{_prefix}/man/man1/nosetests.1 %{buildroot}%{_mandir}/man1/nosetests-%{python3_version}.1
|
||||||
ln -sf nosetests-%{python3_version}.1 %{buildroot}%{_mandir}/man1/nosetests-3.1
|
touch %{buildroot}%{_mandir}/man1/nosetests-3.1 # for alternatives
|
||||||
popd
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
ln -sf nosetests-2 %{buildroot}%{_bindir}/nosetests
|
%if %{with python2}
|
||||||
ln -sf nosetests-2.1 %{buildroot}%{_mandir}/man1/nosetests.1
|
ln -sf nosetests-2.1 %{buildroot}%{_mandir}/man1/nosetests.1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
%if %{with docs}
|
%if %{with docs}
|
||||||
pushd python2/doc
|
pushd python3/doc
|
||||||
sphinx-build -b html -d .build/doctrees . .build/html
|
sphinx-build-3 -b html -d .build/doctrees . .build/html
|
||||||
rm -vrf .build/html/.buildinfo .build/html/_sources
|
rm -vrf .build/html/.buildinfo .build/html/_sources
|
||||||
mv .build/html ../..
|
mv .build/html ../..
|
||||||
rm -vrf .build
|
rm -vrf .build
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
cp -a python2/doc reST
|
cp -a python3/doc reST
|
||||||
rm -vrf reST/{.static,.templates}
|
rm -vrf reST/{.static,.templates}
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with python2}
|
||||||
pushd python2
|
pushd python2
|
||||||
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
|
|
||||||
%{__python2} selftest.py
|
%{__python2} selftest.py
|
||||||
popd
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
pushd python3
|
pushd python3
|
||||||
%{__python3} setup.py build_tests
|
%{__python3} setup.py build_tests
|
||||||
%{__python3} selftest.py
|
%{__python3} selftest.py
|
||||||
popd
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
%post -n python3-%{modname}
|
||||||
|
alternatives --add-slave python3 %{_bindir}/python%{python3_version} \
|
||||||
|
%{_bindir}/nosetests-3 \
|
||||||
|
nosetests-3 \
|
||||||
|
%{_bindir}/nosetests-%{python3_version}
|
||||||
|
|
||||||
|
alternatives --add-slave python3 %{_bindir}/python%{python3_version} \
|
||||||
|
%{_mandir}/man1/nosetests-3.1.gz \
|
||||||
|
nosetests-3-man \
|
||||||
|
%{_mandir}/man1/nosetests-%{python3_version}.1.gz
|
||||||
|
|
||||||
|
%postun -n python3-%{modname}
|
||||||
|
if [ $1 -eq 0 ]; then
|
||||||
|
alternatives --keep-foreign --remove-slave python3 \
|
||||||
|
%{_bindir}/python%{python3_version} nosetests-3
|
||||||
|
|
||||||
|
alternatives --keep-foreign --remove-slave python3 \
|
||||||
|
%{_bindir}/python%{python3_version} nosetests-3-man
|
||||||
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with python2}
|
||||||
%files -n python2-%{modname}
|
%files -n python2-%{modname}
|
||||||
%license lgpl.txt
|
%license lgpl.txt
|
||||||
%{_bindir}/nosetests
|
|
||||||
%{_bindir}/nosetests-2
|
%{_bindir}/nosetests-2
|
||||||
%{_bindir}/nosetests-%{python2_version}
|
%{_bindir}/nosetests-%{python2_version}
|
||||||
%{_mandir}/man1/nosetests.1*
|
%{_mandir}/man1/nosetests.1*
|
||||||
@ -158,39 +226,72 @@ popd
|
|||||||
%{_mandir}/man1/nosetests-%{python2_version}.1*
|
%{_mandir}/man1/nosetests-%{python2_version}.1*
|
||||||
%{python2_sitelib}/nose-*.egg-info/
|
%{python2_sitelib}/nose-*.egg-info/
|
||||||
%{python2_sitelib}/nose/
|
%{python2_sitelib}/nose/
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
%files -n python3-%{modname}
|
%files -n python3-%{modname}
|
||||||
%license lgpl.txt
|
%license lgpl.txt
|
||||||
%exclude %{_bindir}/nosetests-3
|
%ghost %{_bindir}/nosetests-3
|
||||||
%{_bindir}/nosetests-%{python3_version}
|
%{_bindir}/nosetests-%{python3_version}
|
||||||
%exclude %{_mandir}/man1/nosetests-3.1*
|
%ghost %{_mandir}/man1/nosetests-3.1*
|
||||||
%{_mandir}/man1/nosetests-%{python3_version}.1*
|
%{_mandir}/man1/nosetests-%{python3_version}.1*
|
||||||
%{python3_sitelib}/nose-*.egg-info/
|
%{python3_sitelib}/nose-*.egg-info/
|
||||||
%{python3_sitelib}/nose/
|
%{python3_sitelib}/nose/
|
||||||
|
%endif
|
||||||
|
|
||||||
%files docs
|
%files docs
|
||||||
%license lgpl.txt
|
%license lgpl.txt
|
||||||
%doc AUTHORS CHANGELOG examples NEWS README.txt reST
|
%doc AUTHORS CHANGELOG examples NEWS README.txt
|
||||||
|
%if %{with python3}
|
||||||
%if %{with docs}
|
%if %{with docs}
|
||||||
%doc html
|
%doc html reST
|
||||||
%endif
|
%endif # with docs
|
||||||
|
%endif # with python3
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Nov 28 2018 Lumír Balhar <lbalhar@redhat.com> - 1.3.7-23
|
* Fri Jul 30 2021 Tomas Orsava <torsava@redhat.com> - 1.3.7-31
|
||||||
- Require platform-python-setuptools instead of python3-setuptools
|
- Adjusted the postun scriptlets to enable upgrading to RHEL 9
|
||||||
- Resolves: rhbz#1654302
|
- Resolves: rhbz#1933055
|
||||||
|
|
||||||
* Mon Aug 06 2018 Petr Viktorin <pviktori@redhat.com> - 1.3.7-22
|
* Thu Apr 25 2019 Tomas Orsava <torsava@redhat.com> - 1.3.7-30
|
||||||
- Remove unversioned executables (only *-3.6 should be provided)
|
- Bumping due to problems with modular RPM upgrade path
|
||||||
|
- Resolves: rhbz#1695587
|
||||||
|
|
||||||
* Mon Jul 09 2018 Petr Viktorin <pviktori@redhat.com> - 1.3.7-21
|
* Thu Oct 04 2018 Lumír Balhar <lbalhar@redhat.com> - 1.3.7-29
|
||||||
- Remove dependency on python2-coverage
|
- Fix alternatives - post and postun sections only with python3
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=1595193
|
- Resolves: rhbz#1633534
|
||||||
|
|
||||||
* Mon Jun 25 2018 Petr Viktorin <pviktori@redhat.com> - 1.3.7-20
|
* Tue Oct 02 2018 Lumír Balhar <lbalhar@redhat.com> - 1.3.7-28
|
||||||
- Allow Python 2 for build
|
- Add alternatives for the executable and manpage
|
||||||
see https://hurl.corp.redhat.com/rhel8-py2
|
- Resolves: rhbz#1633534
|
||||||
- Build without docs to fix FTBFS
|
|
||||||
|
* Wed Aug 15 2018 Lumír Balhar <lbalhar@redhat.com> - 1.3.7-27
|
||||||
|
- Remove nosetest-3 executable/manpage. This will be provided by python3 module.
|
||||||
|
- Resolves: rhbz#1615727
|
||||||
|
|
||||||
|
* Wed Aug 08 2018 Lumír Balhar <lbalhar@redhat.com> - 1.3.7-26
|
||||||
|
- Remove unversioned binaries from python2 subpackage
|
||||||
|
- Resolves: rhbz#1613343
|
||||||
|
|
||||||
|
* Tue Jul 31 2018 Lumír Balhar <lbalhar@redhat.com> - 1.3.7-25
|
||||||
|
- Make possible to disable python3 subpackage
|
||||||
|
|
||||||
|
* Wed Jul 18 2018 Tomas Orsava <torsava@redhat.com> - 1.3.7-24
|
||||||
|
- BuildRequire also python36-rpm-macros as part of the python36 module build
|
||||||
|
|
||||||
|
* Wed Jul 04 2018 Miro Hrončok <mhroncok@redhat.com> - 1.3.7-23
|
||||||
|
- Add a bcond for python2
|
||||||
|
- Build docs with python3 explicitly
|
||||||
|
|
||||||
|
* Tue Jun 26 2018 Tomas Orsava <torsava@redhat.com> - 1.3.7-22
|
||||||
|
- Use python2 macros instead of unversioned python macros
|
||||||
|
|
||||||
|
* Mon Jun 18 2018 Tomas Orsava <torsava@redhat.com> - 1.3.7-21
|
||||||
|
- Disabled docs because the docs build config is not ported to Python 3 and
|
||||||
|
thus cannot be built with Python 3 version of Sphinx
|
||||||
|
|
||||||
|
* Mon Apr 30 2018 Tomas Orsava <torsava@redhat.com> - 1.3.7-20
|
||||||
|
- Require the python36-devel package when building for the python36 module
|
||||||
|
|
||||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.7-19
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.7-19
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
Loading…
Reference in New Issue
Block a user