- Update to 1.0.0

- Create the docs subpackage for text docs even if we don't create the html docs.
- Make python3 subpackage
f38
Toshio Kuratomi 14 years ago
parent 123f1ca214
commit 7a9dd202ba

1
.gitignore vendored

@ -1,2 +1,3 @@
nose-0.11.3.tar.gz nose-0.11.3.tar.gz
nose-0.11.4.tar.gz nose-0.11.4.tar.gz
/nose-1.0.0.tar.gz

@ -3,31 +3,35 @@
%{!?python_version: %global python_version %(%{__python} -c "import sys ; print sys.version[:3]")} %{!?python_version: %global python_version %(%{__python} -c "import sys ; print sys.version[:3]")}
%endif %endif
%{!?python3_version: %global python3_version %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])")}
%if 0%{?fedora} > 12 || 0%{?rhel} > 6
%global with_python3 1
%endif
%global upstream_name nose %global upstream_name 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
%global with_docs 0 %global with_docs 0
Name: python-nose Name: python-nose
Version: 0.11.4 Version: 1.0.0
Release: 2%{?dist} Release: 1%{?dist}
Summary: A discovery-based unittest extension for Python Summary: Discovery-based unittest extension for Python
Group: Development/Languages Group: Development/Languages
License: LGPLv2+ and Public Domain License: LGPLv2+ and Public Domain
URL: http://somethingaboutorange.com/mrl/projects/nose/ URL: http://somethingaboutorange.com/mrl/projects/nose/
Source0: http://somethingaboutorange.com/mrl/projects/nose/nose-%{version}.tar.gz Source0: http://somethingaboutorange.com/mrl/projects/nose/nose-%{version}.tar.gz
# Upstream has this change already.
Patch0: nose-coverage-0.3.4.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch BuildArch: noarch
BuildRequires: python2-devel BuildRequires: python2-devel
%if 0%{?fedora} && 0%{?fedora} < 13 %if 0%{?with_python3}
BuildRequires: python-setuptools-devel BuildRequires: python3-devel
%else
BuildRequires: python-setuptools
%endif %endif
BuildRequires: python-setuptools
BuildRequires: dos2unix BuildRequires: dos2unix
BuildRequires: python-coverage BuildRequires: python-coverage
Requires: python-setuptools Requires: python-setuptools
@ -48,7 +52,6 @@ plugins. Plugins included with nose provide support for doctest, code
coverage and profiling, flexible attribute-based test selection, coverage and profiling, flexible attribute-based test selection,
output capture and more. output capture and more.
%if 0%{?with_docs}
%package docs %package docs
Summary: Nose Documentation Summary: Nose Documentation
Group: Documentation Group: Documentation
@ -56,37 +59,90 @@ BuildRequires: python-sphinx
%description docs %description docs
Documentation for Nose Documentation for Nose
%endif # with_docs
%if 0%{?with_python3}
%package -n python3-%{upstream_name}
Summary: Discovery-based unittest extension for Python3
Group: Development/Languages
%description -n python3-%{upstream_name}
nose extends the test loading and running features of unittest, making
it easier to write, find and run tests.
By default, nose will run tests in files or directories under the
current working directory whose names include "test" or "Test" at a
word boundary (like "test_this" or "functional_test" or "TestClass"
but not "libtest"). Test output is similar to that of unittest, but
also includes captured stdout output from failing tests, for easy
print-style debugging.
These features, and many more, are customizable through the use of
plugins. Plugins included with nose provide support for doctest, code
coverage and profiling, flexible attribute-based test selection,
output capture and more.
This package installs the nose module and nosetests3 program that can discover
python3 unittests.
%endif # with_python3
%prep %prep
%setup -q -n %{upstream_name}-%{version} %setup -q -n %{upstream_name}-%{version}
%patch0 -p1 -b .coverage
dos2unix examples/attrib_plugin.py dos2unix examples/attrib_plugin.py
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with_python3
%build %build
%{__python} setup.py build %{__python} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
popd
%endif # with_python3
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
# Must do the python3 install first because the scripts in /usr/bin are
# overwritten with every setup.py install (and we want the python2 version
# to be the default for now).
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot}
rm %{buildroot}%{_bindir}/nosetests
mkdir -m 0755 -p %{buildroot}%{_mandir}/man1/
mv %{buildroot}%{_prefix}/man/man1/nosetests.1 %{buildroot}%{_mandir}/man1/nosetests-%{python3_version}.1
popd
%endif # with_python3
%{__python} setup.py install --skip-build --root %{buildroot} \ %{__python} setup.py install --skip-build --root %{buildroot} \
--install-data=%{_datadir} --install-data=%{_datadir}
%if 0%{?with_docs} %if 0%{?with_docs}
pushd doc pushd doc
make html make html
]rm -rf .build/html/.buildinfo .build/html/_sources rm -rf .build/html/.buildinfo .build/html/_sources
mv .build/html .. mv .build/html ..
rm -rf .build rm -rf .build
popd popd
cp -a doc reST
%endif # with_docs %endif # with_docs
cp -a doc reST
rm -rf reST/.static reST/.templates
%check %check
%{__python} selftest.py %{__python} selftest.py
%if 0%{?with_python3}
pushd %{py3dir}
export PYTHONPATH=`pwd`/build/lib
%{__python3} setup.py build_tests
%{__python3} selftest.py
popd
%endif # with_python3
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
@ -100,13 +156,28 @@ rm -rf %{buildroot}
%{_mandir}/man1/nosetests.1.gz %{_mandir}/man1/nosetests.1.gz
%{python_sitelib}/nose* %{python_sitelib}/nose*
%if 0%{?with_docs} %if 0%{?with_python3}
%files -n python3-%{upstream_name}
%defattr(-,root,root,-)
%doc AUTHORS CHANGELOG lgpl.txt NEWS README.txt
%{_bindir}/nosetests-%{python3_version}
%{_mandir}/man1/nosetests-%{python3_version}.1.gz
%{python3_sitelib}/nose*
%endif
%files docs %files docs
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc html reST examples %doc reST examples
%if 0%{?with_docs}
%doc html
%endif # with_docs %endif # with_docs
%changelog %changelog
* Sun Dec 26 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.0.0-1
- Update to 1.0.0
- Create the docs subpackage for text docs even if we don't create the html docs.
- Make python3 subpackage
* Tue Dec 7 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.11.4-2 * Tue Dec 7 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.11.4-2
- Fix FTBFS with newer coverage - Fix FTBFS with newer coverage

@ -1 +1 @@
230a3dfc965594a06ce2d63def9f0d98 nose-0.11.4.tar.gz 9542d4c66e04880d8144990de76e0b88 nose-1.0.0.tar.gz

Loading…
Cancel
Save