From 713645f79dd8deb2c7a11251b819c172c9e96f1d3f8556f3f7dbf3cf5f0f1fe9 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 30 Sep 2021 09:06:14 +0000 Subject: [PATCH] - Copy the testsuite before we run it to avoid import problems. - Remove horrible workarounds creating __init__.py and then removing them. - Drop Requires on python-google-filesystem. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-google-cloud-storage?expand=0&rev=27 --- python-google-cloud-storage.changes | 7 +++++++ python-google-cloud-storage.spec | 12 +++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/python-google-cloud-storage.changes b/python-google-cloud-storage.changes index f7824d8..1363e2a 100644 --- a/python-google-cloud-storage.changes +++ b/python-google-cloud-storage.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Sep 30 09:04:12 UTC 2021 - Steve Kowalik + +- Copy the testsuite before we run it to avoid import problems. +- Remove horrible workarounds creating __init__.py and then removing them. +- Drop Requires on python-google-filesystem. + ------------------------------------------------------------------- Tue Jun 22 06:34:36 UTC 2021 - Steve Kowalik diff --git a/python-google-cloud-storage.spec b/python-google-cloud-storage.spec index 9bf44a9..d73bc76 100644 --- a/python-google-cloud-storage.spec +++ b/python-google-cloud-storage.spec @@ -42,7 +42,6 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-google-auth >= 1.11.0 Requires: python-google-cloud-core >= 1.4.1 -Requires: python-google-filesystem Requires: python-google-resumable-media >= 1.2.0 Requires: python-googleapis-common-protos Requires: python-requests >= 2.18.0 @@ -63,14 +62,13 @@ to users via direct download. This package provides client to it. %install %python_install -%{python_expand touch %{buildroot}%{$python_sitelib}/google/cloud/__init__.py -%fdupes %{buildroot}%{$python_sitelib} -} +%{python_expand %fdupes %{buildroot}%{$python_sitelib}} %check -%{python_expand touch %{buildroot}%{$python_sitelib}/google/__init__.py} -%pytest tests/unit -k 'not network' -%{python_expand rm %{buildroot}%{$python_sitelib}/google/__init__.py} +# We shouldn't be running tests from the BUILD/*/ directory, where pytest finds another google/ subdirectory +trap 'rm -rf -- ~/tests' INT TERM HUP EXIT +cp -r tests ~/ && cd +%pytest tests/unit -m 'not network' %files %{python_files} %license LICENSE