Skip to content

Commit 0be7017

Browse files
committed
Add optional argument toolset to GeosLibrary.build
1 parent 36f768e commit 0be7017

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ https://semver.org/spec/v2.0.0.html
1212

1313
## [1.3.6]
1414

15+
### Added
16+
- Optional argument `toolset` in `GeosLibrary.build` method.
17+
1518
### Changed
1619
- Upgrade `matplotlib` upper pin to 3.7.
1720
- Upgrade `pyproj` upper pin to 3.5.

packages/basemap/utils/GeosLibrary.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def extract(self, overwrite=True):
213213
line = line.replace(oldtext2, newtext2)
214214
fd.write(line.encode())
215215

216-
def build(self, installdir=None, njobs=1):
216+
def build(self, installdir=None, toolset=None, njobs=1):
217217
"""Build and install GEOS from source."""
218218

219219
# Download and extract zip file if not present.
@@ -244,6 +244,8 @@ def build(self, installdir=None, njobs=1):
244244
if os.name == "nt":
245245
config_opts += ["-DCMAKE_CXX_FLAGS='/wd4251 /wd4458 /wd4530 /EHsc'"]
246246
if version >= (3, 6, 0) and sys.version_info[:2] >= (3, 3):
247+
if toolset is not None:
248+
config_opts += ["-DCMAKE_GENERATOR_TOOLSET={0}".format(toolset)]
247249
build_opts = ["-j", "{0:d}".format(njobs)] + build_opts
248250
else:
249251
win64 = (8 * struct.calcsize("P") == 64)

0 commit comments

Comments
 (0)