Compare commits

...

No commits in common. "c8" and "stream-python36-3.6-rhel-8.10.0" have entirely different histories.

9 changed files with 149 additions and 36 deletions

14
.gitignore vendored
View File

@ -1 +1,13 @@
SOURCES/nose-1.3.7.tar.gz
nose-0.11.3.tar.gz
nose-0.11.4.tar.gz
/nose-1.0.0.tar.gz
/nose-1.1.1.tar.gz
/nose-1.1.2.tar.gz
/nose-1.2.0.tar.gz
/nose-1.2.1.tar.gz
/nose-1.3.0.tar.gz
/nose-1.3.1.tar.gz
/nose-1.3.2.tar.gz
/nose-1.3.4.tar.gz
/nose-1.3.6.tar.gz
/nose-1.3.7.tar.gz

View File

@ -1 +0,0 @@
97f2a04c9d43b29ddf4794a1a1d1ba803f1074c6 SOURCES/nose-1.3.7.tar.gz

View File

@ -1,8 +1,18 @@
%bcond_without python3
%bcond_with python36_module
%global modname nose
# 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
# 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\
it easier to write, find and run tests.\
\
@ -21,7 +31,7 @@ output capture and more.\
Name: python-%{modname}
Version: 1.3.7
Release: 23%{?dist}
Release: 31%{?dist}
BuildArch: noarch
License: LGPLv2+ and Public Domain
@ -51,33 +61,47 @@ BuildRequires: dos2unix
%package docs
Summary: Nose Documentation
%if %{with python3}
%if %{with docs}
BuildRequires: %{_bindir}/sphinx-build
BuildRequires: %{_bindir}/sphinx-build-3
%endif
%endif
%description docs
Documentation for Nose.
%if %{with python2}
%package -n python2-%{modname}
Summary: %{summary}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-coverage >= 3.4-1
Requires: python2-setuptools
%{?python_provide:%python_provide python2-%{modname}}
%description -n python2-%{modname}
%{desc}
%endif
%if %{with python3}
%package -n python3-%{modname}
Summary: %{summary}
%if %{with python36_module}
BuildRequires: python36-devel
BuildRequires: python36-rpm-macros
%else
BuildRequires: python3-devel
%endif
BuildRequires: python3-setuptools
BuildRequires: python3-coverage >= 3.4-1
%if 0%{?rhel} && 0%{?rhel} >= 8
Requires: platform-python-setuptools
%else
# Require alternatives version that implements the --keep-foreign flag
Requires(postun): alternatives >= 1.19.1-1
# For alternatives
Requires: python36
Requires(post): python36
Requires(postun): python36
Requires: python3-setuptools
%endif
%{?python_provide:%python_provide python3-%{modname}}
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
python3 unit tests.
%endif
%prep
%setup -qc
@ -94,63 +119,106 @@ pushd %{modname}-%{version}
dos2unix examples/attrib_plugin.py
cp -pr lgpl.txt AUTHORS CHANGELOG examples NEWS README.txt ..
popd
%if %{with python3}
mv %{modname}-%{version} python3
%endif
%if %{with python2}
mv %{modname}-%{version} python2
cp -pr python2 python3
%endif
%build
%if %{with python2}
pushd python2
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
%py2_build
popd
%endif
%if %{with python3}
pushd python3
%py3_build
popd
%endif
%install
mkdir -p %{buildroot}%{_mandir}/man1
%if %{with python2}
pushd python2
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
%py2_install
mv %{buildroot}%{_bindir}/nosetests{,-%{python2_version}}
ln -sf nosetests-%{python2_version} %{buildroot}%{_bindir}/nosetests-2
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
popd
%endif
%if %{with python3}
pushd python3
%py3_install
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
ln -sf nosetests-%{python3_version}.1 %{buildroot}%{_mandir}/man1/nosetests-3.1
touch %{buildroot}%{_mandir}/man1/nosetests-3.1 # for alternatives
popd
%endif
ln -sf nosetests-2 %{buildroot}%{_bindir}/nosetests
%if %{with python2}
ln -sf nosetests-2.1 %{buildroot}%{_mandir}/man1/nosetests.1
%endif
%if %{with python3}
%if %{with docs}
pushd python2/doc
sphinx-build -b html -d .build/doctrees . .build/html
pushd python3/doc
sphinx-build-3 -b html -d .build/doctrees . .build/html
rm -vrf .build/html/.buildinfo .build/html/_sources
mv .build/html ../..
rm -vrf .build
popd
%endif
cp -a python2/doc reST
cp -a python3/doc reST
rm -vrf reST/{.static,.templates}
%endif
%check
%if %{with python2}
pushd python2
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
%{__python2} selftest.py
popd
%endif
%if %{with python3}
pushd python3
%{__python3} setup.py build_tests
%{__python3} selftest.py
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}
%license lgpl.txt
%{_bindir}/nosetests
%{_bindir}/nosetests-2
%{_bindir}/nosetests-%{python2_version}
%{_mandir}/man1/nosetests.1*
@ -158,39 +226,72 @@ popd
%{_mandir}/man1/nosetests-%{python2_version}.1*
%{python2_sitelib}/nose-*.egg-info/
%{python2_sitelib}/nose/
%endif
%if %{with python3}
%files -n python3-%{modname}
%license lgpl.txt
%exclude %{_bindir}/nosetests-3
%ghost %{_bindir}/nosetests-3
%{_bindir}/nosetests-%{python3_version}
%exclude %{_mandir}/man1/nosetests-3.1*
%ghost %{_mandir}/man1/nosetests-3.1*
%{_mandir}/man1/nosetests-%{python3_version}.1*
%{python3_sitelib}/nose-*.egg-info/
%{python3_sitelib}/nose/
%endif
%files docs
%license lgpl.txt
%doc AUTHORS CHANGELOG examples NEWS README.txt reST
%doc AUTHORS CHANGELOG examples NEWS README.txt
%if %{with python3}
%if %{with docs}
%doc html
%endif
%doc html reST
%endif # with docs
%endif # with python3
%changelog
* Wed Nov 28 2018 Lumír Balhar <lbalhar@redhat.com> - 1.3.7-23
- Require platform-python-setuptools instead of python3-setuptools
- Resolves: rhbz#1654302
* Fri Jul 30 2021 Tomas Orsava <torsava@redhat.com> - 1.3.7-31
- Adjusted the postun scriptlets to enable upgrading to RHEL 9
- Resolves: rhbz#1933055
* Mon Aug 06 2018 Petr Viktorin <pviktori@redhat.com> - 1.3.7-22
- Remove unversioned executables (only *-3.6 should be provided)
* Thu Apr 25 2019 Tomas Orsava <torsava@redhat.com> - 1.3.7-30
- 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
- Remove dependency on python2-coverage
https://bugzilla.redhat.com/show_bug.cgi?id=1595193
* Thu Oct 04 2018 Lumír Balhar <lbalhar@redhat.com> - 1.3.7-29
- Fix alternatives - post and postun sections only with python3
- Resolves: rhbz#1633534
* Mon Jun 25 2018 Petr Viktorin <pviktori@redhat.com> - 1.3.7-20
- Allow Python 2 for build
see https://hurl.corp.redhat.com/rhel8-py2
- Build without docs to fix FTBFS
* Tue Oct 02 2018 Lumír Balhar <lbalhar@redhat.com> - 1.3.7-28
- Add alternatives for the executable and manpage
- Resolves: rhbz#1633534
* 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
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (nose-1.3.7.tar.gz) = e65c914f621f8da06b9ab11a0ff2763d6e29b82ce2aaed56da0e3773dc899d9deb1f20015789d44c65a5dad7214520f5b659b3f8d7695fb207ad3f78e5cf1b62