|
@@ -1,10 +1,8 @@
|
|
|
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
-%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")}
|
|
|
-
|
|
|
+%define modname nose
|
|
|
%define pkg_release 1%{?_dist_release}
|
|
|
|
|
|
Name: python-nose
|
|
|
-Version: 1.3.0
|
|
|
+Version: 1.3.7
|
|
|
Release: %{pkg_release}
|
|
|
Summary: A discovery-based unittest extension for Python
|
|
|
Summary(ja): Python 用の発見型ユニットテスト・エクステンション
|
|
@@ -12,13 +10,33 @@ Summary(ja): Python 用の発見型ユニットテスト・エクステンショ
|
|
|
Group: Development/Languages
|
|
|
License: LGPLv2
|
|
|
URL: http://somethingaboutorange.com/mrl/projects/nose/
|
|
|
+Vendor: Project Vine
|
|
|
+Distribution: Vine Linux
|
|
|
+
|
|
|
Source0: http://somethingaboutorange.com/mrl/projects/nose/nose-%{version}.tar.gz
|
|
|
-#Patch0: no-google-analytics.patch
|
|
|
+
|
|
|
+# Make compatible with coverage 4.1
|
|
|
+# https://github.com/nose-devs/nose/pull/1004
|
|
|
+Patch0: python-nose-coverage4.patch
|
|
|
+# Fix python 3.5 compat
|
|
|
+# https://github.com/nose-devs/nose/pull/983
|
|
|
+Patch1: python-nose-py35.patch
|
|
|
+# Fix UnicodeDecodeError with captured output
|
|
|
+# https://github.com/nose-devs/nose/pull/988
|
|
|
+Patch2: python-nose-unicode.patch
|
|
|
+# Allow docutils to read utf-8 source
|
|
|
+Patch3: python-nose-readunicode.patch
|
|
|
+# Fix Python 3.6 compatibility
|
|
|
+# Python now returns ModuleNotFoundError instead of the previous ImportError
|
|
|
+# https://github.com/nose-devs/nose/pull/1029
|
|
|
+Patch4: python-nose-py36.patch
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
|
|
BuildArch: noarch
|
|
|
-BuildRequires: python-devel, python-setuptools
|
|
|
+BuildRequires: dos2unix
|
|
|
+BuildRequires: python-devel, python-setuptools, python-rpm-macros
|
|
|
+BuildRequires: python3-devel, python3-setuptools, python3-rpm-macros
|
|
|
Requires: python-setuptools
|
|
|
|
|
|
|
|
@@ -30,16 +48,67 @@ one that is intended to mimic the behavior of py.test as much as is
|
|
|
reasonably possible without resorting to too much magic.
|
|
|
|
|
|
|
|
|
+%package -n python3-nose
|
|
|
+Summary: A discovery-based unittest extension for Python
|
|
|
+Summary(ja): Python 用の発見型ユニットテスト・エクステンション
|
|
|
+Group: Development/Languages
|
|
|
+Requires: python3-setuptools
|
|
|
+
|
|
|
+%description -n python3-nose
|
|
|
+nose: a discovery-based unittest extension.
|
|
|
+
|
|
|
+nose provides an alternate test discovery and running process for unittest,
|
|
|
+one that is intended to mimic the behavior of py.test as much as is
|
|
|
+reasonably possible without resorting to too much magic.
|
|
|
+
|
|
|
%prep
|
|
|
-%setup -q -n nose-%{version}
|
|
|
-#%patch0 -p1
|
|
|
+%setup -qc
|
|
|
+pushd %{modname}-%{version}
|
|
|
+%autopatch -p1
|
|
|
+dos2unix examples/attrib_plugin.py
|
|
|
+cp -pr lgpl.txt AUTHORS CHANGELOG examples NEWS README.txt ..
|
|
|
+popd
|
|
|
+mv %{modname}-%{version} python2
|
|
|
+cp -pr python2 python3
|
|
|
|
|
|
%build
|
|
|
-CFLAGS="${RPM_OPT_FLAGS}" %{__python} setup.py build
|
|
|
+pushd python2
|
|
|
+%py_build
|
|
|
+popd
|
|
|
+pushd python3
|
|
|
+%py3_build
|
|
|
+popd
|
|
|
|
|
|
%install
|
|
|
rm -rf ${RPM_BUILD_ROOT}
|
|
|
-%{__python} setup.py install -O1 --skip-build --root ${RPM_BUILD_ROOT} --install-data=%{_datadir}
|
|
|
+
|
|
|
+mkdir -p %{buildroot}%{_mandir}/man1
|
|
|
+pushd python2
|
|
|
+%py_install
|
|
|
+mv %{buildroot}%{_bindir}/nosetests{,-%{python_version}}
|
|
|
+ln -sf nosetests-%{python_version} %{buildroot}%{_bindir}/nosetests-2
|
|
|
+mv %{buildroot}%{_prefix}/man/man1/nosetests.1 %{buildroot}%{_mandir}/man1/nosetests-%{python_version}.1
|
|
|
+ln -sf nosetests-%{python_version}.1 %{buildroot}%{_mandir}/man1/nosetests-2.1
|
|
|
+popd
|
|
|
+pushd python3
|
|
|
+%py3_install
|
|
|
+mv %{buildroot}%{_bindir}/nosetests{,-%{python3_version}}
|
|
|
+ln -sf nosetests-%{python3_version} %{buildroot}%{_bindir}/nosetests-3
|
|
|
+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
|
|
|
+popd
|
|
|
+
|
|
|
+ln -sf nosetests-2 %{buildroot}%{_bindir}/nosetests
|
|
|
+ln -sf nosetests-2.1 %{buildroot}%{_mandir}/man1/nosetests.1
|
|
|
+
|
|
|
+%check
|
|
|
+pushd python2
|
|
|
+%{__python} selftest.py
|
|
|
+popd
|
|
|
+pushd python3
|
|
|
+%{__python3} setup.py build_tests
|
|
|
+%{__python3} selftest.py
|
|
|
+popd
|
|
|
|
|
|
%clean
|
|
|
rm -rf ${RPM_BUILD_ROOT}
|
|
@@ -48,12 +117,25 @@ rm -rf ${RPM_BUILD_ROOT}
|
|
|
%defattr(-,root,root,-)
|
|
|
%doc AUTHORS CHANGELOG lgpl.txt NEWS README.txt
|
|
|
%{_bindir}/nosetests
|
|
|
-%{_bindir}/nosetests-2.7
|
|
|
-%{_mandir}/man1/nosetests.1.gz
|
|
|
+%{_bindir}/nosetests-2*
|
|
|
+%{_mandir}/man1/nosetests.1*
|
|
|
+%{_mandir}/man1/nosetests-2*
|
|
|
%{python_sitelib}/nose-%{version}-py%{pyver}.egg-info
|
|
|
%{python_sitelib}/nose
|
|
|
|
|
|
+%files -n python3-nose
|
|
|
+%defattr(-,root,root,-)
|
|
|
+%doc AUTHORS CHANGELOG lgpl.txt NEWS README.txt
|
|
|
+%{_bindir}/nosetests-3*
|
|
|
+%{_mandir}/man1/nosetests-3*
|
|
|
+%{python3_sitelib}/nose-%{version}-py%{python3_version}.egg-info
|
|
|
+%{python3_sitelib}/nose
|
|
|
+
|
|
|
%changelog
|
|
|
+* Tue Nov 27 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.7-1
|
|
|
+- new upstream release.
|
|
|
+- added python3 support.
|
|
|
+
|
|
|
* Sun Apr 28 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.3.0-1
|
|
|
- new upstream release
|
|
|
- deleted Patch0
|