Accepting request 922325 from devel:languages:python

- 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/request/show/922325
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-google-cloud-storage?expand=0&rev=10
This commit is contained in:
Dominique Leuenberger 2021-09-30 21:43:44 +00:00 committed by Git OBS Bridge
commit 4962a87ed0
2 changed files with 12 additions and 7 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Sep 30 09:04:12 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
- 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 <steven.kowalik@suse.com> Tue Jun 22 06:34:36 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>

View File

@ -42,7 +42,6 @@ BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: python-google-auth >= 1.11.0 Requires: python-google-auth >= 1.11.0
Requires: python-google-cloud-core >= 1.4.1 Requires: python-google-cloud-core >= 1.4.1
Requires: python-google-filesystem
Requires: python-google-resumable-media >= 1.2.0 Requires: python-google-resumable-media >= 1.2.0
Requires: python-googleapis-common-protos Requires: python-googleapis-common-protos
Requires: python-requests >= 2.18.0 Requires: python-requests >= 2.18.0
@ -63,14 +62,13 @@ to users via direct download. This package provides client to it.
%install %install
%python_install %python_install
%{python_expand touch %{buildroot}%{$python_sitelib}/google/cloud/__init__.py %{python_expand %fdupes %{buildroot}%{$python_sitelib}}
%fdupes %{buildroot}%{$python_sitelib}
}
%check %check
%{python_expand touch %{buildroot}%{$python_sitelib}/google/__init__.py} # We shouldn't be running tests from the BUILD/*/ directory, where pytest finds another google/ subdirectory
%pytest tests/unit -k 'not network' trap 'rm -rf -- ~/tests' INT TERM HUP EXIT
%{python_expand rm %{buildroot}%{$python_sitelib}/google/__init__.py} cp -r tests ~/ && cd
%pytest tests/unit -m 'not network'
%files %{python_files} %files %{python_files}
%license LICENSE %license LICENSE