@@ -82,22 +82,6 @@ def lint_setup_py(session):
8282 session .run ("python" , "setup.py" , "check" , "--restructuredtext" , "--strict" )
8383
8484
85- def install_alembic_for_python_38 (session , constraints_path ):
86- """
87- install alembic for Python 3.8 unit and system tests
88-
89- We do not require alembic and most tests should run without it, however
90-
91- - We run some unit tests (Python 3.8) to cover the alembic
92- registration that happens when alembic is installed.
93-
94- - We have a system test that demonstrates working with alembic and
95- proves that the things we think should work do work. :)
96- """
97- if session .python == "3.8" :
98- session .install ("alembic" , "-c" , constraints_path )
99-
100-
10185def default (session ):
10286 # Install all test dependencies, then install this package in-place.
10387
@@ -114,8 +98,13 @@ def default(session):
11498 constraints_path ,
11599 )
116100
117- install_alembic_for_python_38 (session , constraints_path )
118- session .install ("-e" , "." , "-c" , constraints_path )
101+ if session .python == "3.8" :
102+ extras = "[alembic]"
103+ elif session .python == "3.9" :
104+ extras = "[geography]"
105+ else :
106+ extras = ""
107+ session .install ("-e" , f".{ extras } " , "-c" , constraints_path )
119108
120109 # Run py.test against the unit tests.
121110 session .run (
@@ -167,8 +156,13 @@ def system(session):
167156 # Install all test dependencies, then install this package into the
168157 # virtualenv's dist-packages.
169158 session .install ("mock" , "pytest" , "google-cloud-testutils" , "-c" , constraints_path )
170- install_alembic_for_python_38 (session , constraints_path )
171- session .install ("-e" , "." , "-c" , constraints_path )
159+ if session .python == "3.8" :
160+ extras = "[alembic]"
161+ elif session .python == "3.9" :
162+ extras = "[geography]"
163+ else :
164+ extras = ""
165+ session .install ("-e" , f".{ extras } " , "-c" , constraints_path )
172166
173167 # Run py.test against the system tests.
174168 if system_test_exists :
@@ -216,7 +210,13 @@ def compliance(session):
216210 "-c" ,
217211 constraints_path ,
218212 )
219- session .install ("-e" , "." , "-c" , constraints_path )
213+ if session .python == "3.8" :
214+ extras = "[alembic]"
215+ elif session .python == "3.9" :
216+ extras = "[geography]"
217+ else :
218+ extras = ""
219+ session .install ("-e" , f".{ extras } " , "-c" , constraints_path )
220220
221221 session .run (
222222 "py.test" ,
@@ -251,7 +251,9 @@ def docs(session):
251251 """Build the docs for this library."""
252252
253253 session .install ("-e" , "." )
254- session .install ("sphinx==4.0.1" , "alabaster" , "recommonmark" )
254+ session .install (
255+ "sphinx==4.0.1" , "alabaster" , "geoalchemy2" , "shapely" , "recommonmark"
256+ )
255257
256258 shutil .rmtree (os .path .join ("docs" , "_build" ), ignore_errors = True )
257259 session .run (
@@ -274,7 +276,12 @@ def docfx(session):
274276
275277 session .install ("-e" , "." )
276278 session .install (
277- "sphinx==4.0.1" , "alabaster" , "recommonmark" , "gcp-sphinx-docfx-yaml"
279+ "sphinx==4.0.1" ,
280+ "alabaster" ,
281+ "geoalchemy2" ,
282+ "shapely" ,
283+ "recommonmark" ,
284+ "gcp-sphinx-docfx-yaml" ,
278285 )
279286
280287 shutil .rmtree (os .path .join ("docs" , "_build" ), ignore_errors = True )
0 commit comments