From 282e83c4818f38c2de41f862d3a0db00e0947b20 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Wed, 17 Feb 2021 05:49:34 +0200 Subject: [PATCH] tests: temporarily exclude gdrivefs from extras (#5483) When trying to publish to pypi, we get: ``` Invalid value for requires_dist. Error: Can't have direct dependency: "gdrivefs @ git+https://github.com/intake/gdrivefs.git ; extra == 'tests'" ``` --- .github/workflows/tests.yaml | 2 +- setup.py | 3 ++- tests/remotes/gdrive.py | 6 +++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c41f68108..df7674c02 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -27,7 +27,7 @@ jobs: with: python-version: 3.8 - name: Install requirements - run: pip install ".[all,tests]" Pygments collective.checkdocs pre-commit + run: pip install ".[all,tests]" Pygments collective.checkdocs pre-commit git+https://github.com/intake/gdrivefs.git - name: Check README run: python setup.py checkdocs - uses: pre-commit/action@v2.0.0 diff --git a/setup.py b/setup.py index da6712efd..f4f13d569 100644 --- a/setup.py +++ b/setup.py @@ -153,7 +153,8 @@ tests_requirements = [ "mypy", "wsgidav", "crc32c", - "gdrivefs @ git+https://github.com/intake/gdrivefs.git", + # pypi doesn't allow for direct dependencies + # "gdrivefs @ git+https://github.com/intake/gdrivefs.git", ] setup( diff --git a/tests/remotes/gdrive.py b/tests/remotes/gdrive.py index c35497fbe..48216bf22 100644 --- a/tests/remotes/gdrive.py +++ b/tests/remotes/gdrive.py @@ -46,7 +46,11 @@ class GDrive(Base, CloudURLInfo): @cached_property def client(self): import pydata_google_auth - from gdrivefs import GoogleDriveFileSystem + + try: + from gdrivefs import GoogleDriveFileSystem + except ImportError: + pytest.skip("gdrivefs is not installed") tmp_path = tmp_fname() with open(tmp_path, "w") as stream: