[python-flask-script/f20] Fixes to specfile Move Python3 requires into proper place Use versioned macros Use pytest to run tes

Robert Kuska rkuska at fedoraproject.org
Thu Jul 3 12:11:24 UTC 2014


commit 0bc3d0453dfab2a4f631dc035241cdae2890df9f
Author: Robert Kuska <rkuska at redhat.com>
Date:   Thu Jul 3 14:11:05 2014 +0200

    Fixes to specfile
    Move Python3 requires into proper place
    Use versioned macros
    Use pytest to run tests

 python-flask-script.spec |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)
---
diff --git a/python-flask-script.spec b/python-flask-script.spec
index f03337c..d8189a4 100644
--- a/python-flask-script.spec
+++ b/python-flask-script.spec
@@ -6,7 +6,7 @@
 
 Name:       python-flask-script
 Version:    0.6.7
-Release:    1%{?dist}
+Release:    2%{?dist}
 Summary:    Scripting support for Flask
 
 License:    BSD
@@ -19,17 +19,16 @@ BuildRequires:  python-setuptools
 BuildRequires:  pytest
 BuildRequires:  python-flask
 BuildRequires:  python-sphinx
+BuildRequires:  pytest
 %if 0%{?with_python3}
 BuildRequires:  python3-devel
 BuildRequires:  python3-setuptools
 BuildRequires:  python3-pytest
 BuildRequires:  python3-flask
 BuildRequires:  python3-sphinx
+BuildRequires:  python3-pytest
 %endif
 Requires:       python-flask
-%if 0%{?with_python3}
-Requires:       python3-flask
-%endif
 
 %description
 The Flask-Script extension provides support for writing external scripts in
@@ -41,6 +40,8 @@ belong outside the web application itself.
 %package -n python3-flask-script
 Summary:    Scripting support for flask in python3-flask
 
+Requires:       python3-flask
+
 %description -n python3-flask-script
 The Flask-Script extension provides support for writing external scripts in
 Flask.This includes running a development server, a customized Python shell,
@@ -59,7 +60,7 @@ cp -a . %{py3dir}
 %endif
 
 %build
-%{__python} setup.py build
+%{__python2} setup.py build
 # generate sphinx documentation
 cd docs && make html
 # deleting unneeded buildinfo, we dont expect users to change html docs
@@ -74,16 +75,16 @@ popd
 %endif
 
 %check
-%{__python} setup.py test
+py.test-%{python2_version} tests.py
 
 %if 0%{?with_python3}
 pushd %{py3dir}
-%{__python3} setup.py test
+py.test-%{python3_version} tests.py
 popd
 %endif
 
 %install
-%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
 
 %if 0%{?with_python3}
 pushd %{py3dir}
@@ -94,8 +95,8 @@ popd
 
 %files
 %doc docs/_build/html README.rst LICENSE 
-%{python_sitelib}/*.egg-info/
-%{python_sitelib}/flask_script/*.py*
+%{python2_sitelib}/*.egg-info/
+%{python2_sitelib}/flask_script/*.py*
 
 %if 0%{?with_python3}
 %files -n python3-flask-script
@@ -105,6 +106,10 @@ popd
 %endif
 
 %changelog
+* Thu Jul 03 2014 Robert Kuska <rkuska at redhat.com> - 0.6.7-2
+- Update spec to use python versioned macros
+- Move Python 3 requires to proper place
+
 * Mon Apr 28 2014 Robert Kuska <rkuska at redhat.com> - 0.6.7-1
 - Update to 0.6.7
 


More information about the scm-commits mailing list