Add spec file for packaging release-20160315 spin-release-latest
authorRong Jinhui <jinhui.rong@samsung.com>
Mon, 12 Oct 2015 06:50:03 +0000 (14:50 +0800)
committerRong Jinhui <jinhui.rong@samsung.com>
Mon, 12 Oct 2015 06:50:03 +0000 (14:50 +0800)
Change-Id: I511e2aa682af063f5734de54daad3310e4eef9a0
Signed-off-by: Rong Jinhui <jinhui.rong@samsung.com>
packaging/python-nose.spec [new file with mode: 0644]

diff --git a/packaging/python-nose.spec b/packaging/python-nose.spec
new file mode 100644 (file)
index 0000000..4b3b917
--- /dev/null
@@ -0,0 +1,104 @@
+%if 0%{?fedora} < 13 && 0%{?rhel} < 5
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%{!?python_version: %global python_version %(%{__python} -c "import sys ; print sys.version[:3]")}
+%endif
+
+%global upstream_name nose
+
+# Enable building without docs to avoid a circular dependency between this and python-sphinx
+%global with_docs 0
+
+Name:           python-nose
+Version:        1.2.1
+Release:        0
+Summary:        A discovery-based unittest extension for Python
+
+Group:          Development/Languages
+License:        LGPLv2+ and Public Domain
+URL:            https://pypi.python.org/pypi/nose/
+Source0:        https://pypi.python.org/pypi/nose/%{version}/nose-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      noarch
+BuildRequires:  python-devel
+%if 0%{?fedora} && 0%{?fedora} < 13
+BuildRequires: python-setuptools-devel
+%else
+BuildRequires: python-setuptools
+%endif
+BuildRequires: dos2unix
+BuildRequires:  python-coverage
+Requires:       python-setuptools
+Requires:       python-unittest2
+
+%description
+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.
+
+%if 0%{?with_docs}
+%package docs
+Summary:        Nose Documentation
+Group:          Documentation
+BuildRequires:  python-sphinx
+
+%description docs
+Documentation for Nose
+%endif # with_docs
+
+%prep
+%setup -q -n %{upstream_name}-%{version}
+
+dos2unix examples/attrib_plugin.py
+
+%build
+%{__python} setup.py build
+
+
+%install
+rm -rf %{buildroot}
+%{__python} setup.py install --skip-build --root %{buildroot} \
+           --install-data=%{_datadir}
+
+%if 0%{?with_docs}
+pushd doc
+make html
+]rm -rf .build/html/.buildinfo .build/html/_sources
+mv .build/html ..
+rm -rf .build
+popd
+cp -a doc reST
+%endif # with_docs
+
+
+
+%clean
+rm -rf %{buildroot}
+
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS CHANGELOG lgpl.txt NEWS README.txt
+%{_bindir}/nosetests
+%{_bindir}/nosetests-%{python_version}
+%{_mandir}/man1/nosetests.1.gz
+%{python_sitelib}/nose*
+
+%if 0%{?with_docs}
+%files docs
+%defattr(-,root,root,-)
+%doc html reST examples
+%endif # with_docs
+
+%changelog