Skip to content

Commit 3c6f115

Browse files
committed
MAINT: change how Google Colab is detected in setup.py
1 parent 252f4a8 commit 3c6f115

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import sys
23
import setuptools
34

@@ -10,7 +11,7 @@
1011
if sys.version_info[0] == 3 and sys.version_info[1] == 7:
1112
# Support for Python 3.7
1213
netCDF4_requirement = "netCDF4>=1.4,<1.6"
13-
if "google.colab" in sys.modules:
14+
if os.getenv("COLAB_RELEASE_TAG"):
1415
# Support for Google Colab
1516
netCDF4_requirement = "netCDF4>=1.4,<1.6"
1617

0 commit comments

Comments
 (0)