diff --git a/python-httplib2.changes b/python-httplib2.changes index a743e1a..63405f6 100644 --- a/python-httplib2.changes +++ b/python-httplib2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Apr 19 14:16:35 UTC 2017 - toddrme2178@gmail.com + +- Spec file cleanups + ------------------------------------------------------------------- Wed Apr 12 18:16:09 UTC 2017 - toddrme2178@gmail.com diff --git a/python-httplib2.spec b/python-httplib2.spec index 405e315..fb01c55 100644 --- a/python-httplib2.spec +++ b/python-httplib2.spec @@ -15,6 +15,8 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # +# Tests require network connection +%bcond_with tests %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-httplib2 @@ -27,17 +29,16 @@ Group: Development/Libraries/Python Source: http://pypi.python.org/packages/source/h/httplib2/httplib2-%{version}.tar.gz # PATCH-FIX-OPENSUSE: Don't ship private copy of Mozilla NSS certs, use system certs instead (bnc#761162) Patch0: httplib2-use-system-certs.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build -#%%python_buildrequires -# Test requirements (for ssl module): -#BuildRequires: python -Requires: ca-certificates BuildRequires: %{python_module setuptools} BuildRequires: python-rpm-macros +%if %{with tests} +# Test requirements (for ssl module): +BuildRequires: python +BuildRequires: python3 +%endif +Requires: ca-certificates +BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch - -#%%define _specdir /home/matejcik/obs/home:matejcik:messing-with-macros/python-httplib2 - %python_subpackages %description @@ -55,13 +56,19 @@ left out of other HTTP libraries. %install %python_install -#%%check -#python2 python2/httplib2test.py -#python3 python3/httplib2test.py +%if %{with tests} +%check +%if %have_python2 +python2 python2/httplib2test.py +%endif +%if %have_python2 +python3 python3/httplib2test.py +%endif +%endif %files %{python_files} %defattr(-,root,root) -%{python_sitelib}/httplib2-%{version}-py%{python_version}.egg-info +%{python_sitelib}/httplib2-%{version}-py*.egg-info %{python_sitelib}/httplib2 %changelog