adamwill pushed to python-cached_property (f20). "add missing pytest dep, improve test conditionalization"
notifications at fedoraproject.org
notifications at fedoraproject.org
Thu Mar 26 00:40:40 UTC 2015
>From 646b7f283d4ad6b1bf81a7604593cfd264f89d83 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam at redhat.com>
Date: Wed, 25 Mar 2015 16:53:46 -0700
Subject: add missing pytest dep, improve test conditionalization
diff --git a/python-cached_property.spec b/python-cached_property.spec
index cbc6c5b..3ee73ab 100644
--- a/python-cached_property.spec
+++ b/python-cached_property.spec
@@ -6,6 +6,14 @@
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
%endif
+# --skip-missing-interpreters only exists in tox >= 1.7.2.
+# --sitepackages only exists in tox >= 1.7.0.
+# Fedora 20 and 21 have 1.7.1, RHEL 6 and 7 have 1.4.2.
+# I'm gonna go ahead and guess RHEL 8 will have something new enough...
+%if 0%{?fedora} > 21 || 0%{?rhel} > 7
+%global with_tests 1
+%endif
+
%global projectname cached-property
%global modulename cached_property
%global commit 2990020888089841314ad9dd4b0aa6f4d63c4d25
@@ -13,7 +21,7 @@
Name: python-%{modulename}
Version: 1.0.0
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: A cached-property for decorating methods in Python classes
License: BSD
URL: https://github.com/pydanny/%{projectname}
@@ -22,12 +30,19 @@ Source0: https://github.com/pydanny/%{projectname}/archive/%{commit}/%{pr
BuildArch: noarch
Provides: python2-%{modulename}
BuildRequires: python2-devel
+
+%if 0%{?with_tests}
BuildRequires: python-tox
BuildRequires: python-freezegun
+BuildRequires: pytest
+%endif # with_tests
%if 0%{?with_python3}
BuildRequires: python3-devel
+%if 0%{?with_tests}
BuildRequires: python3-freezegun
+BuildRequires: python3-pytest
+%endif # with_tests
%endif # with_python3
%description
@@ -70,13 +85,9 @@ popd
%endif # with_python3
%check
-# --skip-missing-interpreters only exists in tox >= 1.7.2.
-# --sitepackages only exists in tox >= 1.7.0.
-# Fedora 20 and 21 have 1.7.1, RHEL 6 and 7 have 1.4.2.
-# I'm gonna go ahead and guess RHEL 8 will have something new enough...
-%if 0%{?fedora} > 21 || 0%{?rhel} > 7
+%if 0%{?with_tests}
tox --sitepackages --skip-missing-interpreters
-%endif
+%endif # with_tests
%files
%{!?_licensedir:%global license %%doc}
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/python-cached_property.git/commit/?h=f20&id=646b7f283d4ad6b1bf81a7604593cfd264f89d83
More information about the scm-commits
mailing list