thm pushed to pytest (master). "Update to 2.7.0. (..more)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Thu Apr 23 18:52:54 UTC 2015
>From 77ca0cf08679b2ad6c79b6d482269a8379c321b9 Mon Sep 17 00:00:00 2001
From: Thomas Moschny <thm at fedoraproject.org>
Date: Thu, 23 Apr 2015 20:52:28 +0200
Subject: Update to 2.7.0.
- Apply updated Python packaging guidelines.
- Mark LICENSE with %license.
diff --git a/.gitignore b/.gitignore
index 292c6ef..7e469a1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,4 @@
/pytest-2.6.2.tar.gz
/pytest-2.6.3.tar.gz
/pytest-2.6.4.tar.gz
+/pytest-2.7.0.tar.gz
diff --git a/pytest.spec b/pytest.spec
index d4f9fe7..555c3cf 100644
--- a/pytest.spec
+++ b/pytest.spec
@@ -1,14 +1,16 @@
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{!?__python2: %global __python2 /usr/bin/python2}
+%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%endif
+
%if 0%{?fedora}
%global with_python3 1
%endif
-%if 0%{?rhel} && 0%{?rhel} < 6
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
-%endif
%global pylib_version 1.4.26
Name: pytest
-Version: 2.6.4
+Version: 2.7.0
Release: 1%{?dist}
Summary: Simple powerful testing with Python
@@ -19,7 +21,7 @@ Source0: http://pypi.python.org/packages/source/p/%{name}/%{name}-%{versi
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
-BuildRequires: python-devel
+BuildRequires: python2-devel
BuildRequires: python-setuptools
Requires: python-setuptools
BuildRequires: python-py >= %{pylib_version}
@@ -70,15 +72,18 @@ py.test provides simple, yet powerful testing for Python.
%prep
-%setup -q
+%setup -qc -n %{name}-%{version}
+
+mv %{name}-%{version} python2
%if 0%{?with_python3}
-cp -a . %{py3dir}
+cp -a python2 python3
%endif # with_python3
%build
-%{__python} setup.py build
+pushd python2
+%{__python2} setup.py build
%if 0%{?rhel} > 6 || 0%{?fedora}
for l in doc/* ; do
@@ -89,24 +94,35 @@ for l in doc/* ; do
make -C $l html SPHINXBUILD=sphinx-1.0-build PYTHONPATH=$(pwd)
done
%endif # fedora
+popd
%if 0%{?with_python3}
-pushd %{py3dir}
+pushd python3
%{__python3} setup.py build
popd
%endif # with_python3
%install
-rm -rf %{buildroot}
-%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+pushd python2
+%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
# remove shebangs from all scripts
-find %{buildroot}%{python_sitelib} -name '*.py' \
+find %{buildroot}%{python2_sitelib} -name '*.py' \
-exec sed -i -e '1{/^#!/d}' {} \;
+mkdir -p _htmldocs/html
+for l in doc/* ; do
+ # remove hidden file
+ rm ${l}/_build/html/.buildinfo
+ mv ${l}/_build/html _htmldocs/html/${l##doc/}
+done
+
+rst2html README.rst > README.html
+popd
+
%if 0%{?with_python3}
-pushd %{py3dir}
+pushd python3
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
# remove shebangs from all scripts
@@ -116,31 +132,21 @@ find %{buildroot}%{python3_sitelib} -name '*.py' \
popd
%endif # with_python3
-mkdir -p _htmldocs/html
-for l in doc/* ; do
- # remove hidden file
- rm ${l}/_build/html/.buildinfo
- mv ${l}/_build/html _htmldocs/html/${l##doc/}
-done
-
-rst2html README.rst > README.html
-
# use 2.X per default
pushd %{buildroot}%{_bindir}
ln -snf py.test-2.* py.test
popd
-%clean
-rm -rf %{buildroot}
-
-
%check
+pushd python2
PATH=%{buildroot}%{_bindir}:${PATH} \
-PYTHONPATH=%{buildroot}%{python_sitelib} \
+PYTHONPATH=%{buildroot}%{python2_sitelib} \
%{buildroot}%{_bindir}/py.test -r s testing
+popd
+
%if 0%{?with_python3}
-pushd %{py3dir}
+pushd python3
PATH=%{buildroot}%{_bindir}:${PATH} \
PYTHONPATH=%{buildroot}%{python3_sitelib} \
%{buildroot}%{_bindir}/py.test-3.* -r s testing
@@ -149,25 +155,41 @@ popd
%files
-%defattr(-,root,root,-)
-%doc CHANGELOG LICENSE README.html
-%doc _htmldocs/html
+%doc python2/CHANGELOG
+%doc python2/README.html
+%doc python2/_htmldocs/html
+%if 0%{?_licensedir:1}
+%license python2/LICENSE
+%else
+%doc python2/LICENSE
+%endif # licensedir
%{_bindir}/py.test
%{_bindir}/py.test-2.*
-%{python_sitelib}/*
+%{python2_sitelib}/*
%if 0%{?with_python3}
%files -n python3-pytest
-%defattr(-,root,root,-)
-%doc CHANGELOG LICENSE README.html
-%doc _htmldocs/html
+%doc python3/CHANGELOG
+# HTML docs generated with Python2 for now
+%doc python2/README.html
+%doc python2/_htmldocs/html
+%if 0%{?_licensedir:1}
+%license python3/LICENSE
+%else
+%doc python2/LICENSE
+%endif # licensedir
%{_bindir}/py.test-3.*
%{python3_sitelib}/*
%endif # with_python3
%changelog
+* Mon Apr 20 2015 Thomas Moschny <thomas.moschny at gmx.de> - 2.7.0-1
+- Update to 2.7.0.
+- Apply updated Python packaging guidelines.
+- Mark LICENSE with %%license.
+
* Tue Dec 2 2014 Thomas Moschny <thomas.moschny at gmx.de> - 2.6.4-1
- Update to 2.6.4.
diff --git a/sources b/sources
index 4ccd6a0..259b18b 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-14341e122f7e9031a0948eb6b01a2640 pytest-2.6.4.tar.gz
+14cde91b1106c937c48497728ea37dc6 pytest-2.7.0.tar.gz
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/pytest.git/commit/?h=master&id=77ca0cf08679b2ad6c79b6d482269a8379c321b9
More information about the scm-commits
mailing list