diff options
author | Jiri Popelka <jpopelka@redhat.com> | 2015-11-10 13:36:13 +0100 |
---|---|---|
committer | Jiri Popelka <jpopelka@redhat.com> | 2015-11-10 13:36:13 +0100 |
commit | 8778f5f5d918e73e84f90e3b55d9147ee56ff495 (patch) | |
tree | 9d8e5bcfb48a1d953559410ee615e3c8525a25ab | |
parent | 56609522038c070b3b93d14f0ac1ab0c742bb941 (diff) | |
download | python-dockerfile-parse-8778f5f5d918e73e84f90e3b55d9147ee56ff495.tar.gz python-dockerfile-parse-8778f5f5d918e73e84f90e3b55d9147ee56ff495.tar.xz python-dockerfile-parse-8778f5f5d918e73e84f90e3b55d9147ee56ff495.zip |
%check section
-rw-r--r-- | python-dockerfile-parse.spec | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/python-dockerfile-parse.spec b/python-dockerfile-parse.spec index 4afbd54..3f5d8a2 100644 --- a/python-dockerfile-parse.spec +++ b/python-dockerfile-parse.spec @@ -2,12 +2,15 @@ %{!?__python2: %global __python2 /usr/bin/python2} %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%{!?python2_version: %global python2_version %(%{__python2} -c "import sys; sys.stdout.write(sys.version[:3])")} %endif %if (0%{?fedora} >= 21 || 0%{?rhel} >= 8) %global with_python3 1 %endif +%global with_check 1 + %global owner DBuildService %global project dockerfile-parse @@ -16,7 +19,7 @@ Name: python-dockerfile-parse Version: 0.0.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python library for Dockerfile manipulation Group: Development/Tools @@ -28,12 +31,20 @@ BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools +%if 0%{?with_check} +BuildRequires: pytest +%endif # with_check + Requires: python-setuptools %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools -%endif +%if 0%{?with_check} +BuildRequires: python3-pytest +%endif # with_check +%endif # with_python3 + %description Python library for Dockerfile manipulation @@ -77,6 +88,14 @@ popd %{__python} setup.py install --skip-build --root %{buildroot} +%if 0%{?with_check} +%check +%if 0%{?with_python3} +LANG=en_US.utf8 py.test-%{python3_version} -vv tests +%endif # with_python3 + +LANG=en_US.utf8 py.test-%{python2_version} -vv tests +%endif # with_check %files %doc README.md @@ -99,6 +118,9 @@ popd %endif # with_python3 %changelog +* Fri Nov 06 2015 Jiri Popelka <jpopelka@redhat.com> - 0.0.5-2 +- %%check section + * Mon Sep 21 2015 Jiri Popelka <jpopelka@redhat.com> - 0.0.5-1 - 0.0.5 |