From 5864b01446ac1adda1314e81bce66e39bf6c8973 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Wed, 17 Feb 2021 05:02:27 +0200 Subject: [PATCH] tests: temporarily exclude gdrivefs from extras 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 c41f68108b..df7674c028 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 da6712efd9..f4f13d569d 100644 --- a/setup.py +++ b/setup.py @@ -153,7 +153,8 @@ def run(self): "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 c35497fbee..48216bf22a 100644 --- a/tests/remotes/gdrive.py +++ b/tests/remotes/gdrive.py @@ -46,7 +46,11 @@ def get_url(): @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: