File tree Expand file tree Collapse file tree 2 files changed +28
-12
lines changed Expand file tree Collapse file tree 2 files changed +28
-12
lines changed Original file line number Diff line number Diff line change @@ -66,26 +66,23 @@ jobs:
66
66
with :
67
67
output-dir : wheelhouse
68
68
69
- - name : Set up conda for Windows
70
- if : runner.os == 'Windows'
71
- uses : conda-incubator/setup-miniconda@v3
72
- with :
73
- activate-environment : gsl
74
- auto-update-conda : true
75
- environment-file : environment.yml
76
- auto-activate-base : false
77
-
78
- - name : install gsl for Windows
69
+ - name : Install GSL and Set Environment for GSL on Windows
79
70
if : runner.os == 'Windows'
71
+ shell : pwsh
80
72
run : |
81
- conda config --set always_yes yes --set changeps1 no
82
- conda install gsl
73
+ git clone https://github.com/microsoft/vcpkg.git C:\vcpkg
74
+ cd C:\vcpkg
75
+ .\bootstrap-vcpkg.bat
76
+ .\vcpkg integrate install
77
+ .\vcpkg install gsl gsl:x64-windows
83
78
84
79
- name : Build wheels for Windows
85
80
if : runner.os == 'Windows'
86
81
87
82
env :
88
83
CIBW_BUILD : ${{ matrix.python[1] }}-${{ matrix.buildplat[1] }}
84
+ CIBW_ENVIRONMENT : |
85
+ GSL_PATH=C:/vcpkg/installed/x64-windows
89
86
CONDA_PREFIX : ${{ env.CONDA_PREFIX }}
90
87
with :
91
88
output-dir : wheelhouse
Original file line number Diff line number Diff line change @@ -76,6 +76,25 @@ def get_gsl_config_win():
76
76
return rv
77
77
78
78
79
+ def get_gsl_config_win ():
80
+ """Return dictionary with paths to GSL library on Windows."""
81
+ gsl_path = os .environ .get ("GSL_PATH" )
82
+ if gsl_path :
83
+ inc = os .path .join (gsl_path , "include" )
84
+ lib = os .path .join (gsl_path , "lib" )
85
+ else :
86
+ conda_prefix = os .environ .get ("CONDA_PREFIX" )
87
+ if conda_prefix :
88
+ inc = os .path .join (conda_prefix , "Library" , "include" )
89
+ lib = os .path .join (conda_prefix , "Library" , "lib" )
90
+ else :
91
+ raise EnvironmentError (
92
+ "Neither GSL_PATH nor CONDA_PREFIX environment variables are set. "
93
+ "Please ensure GSL is installed and GSL_PATH is correctly set."
94
+ )
95
+
96
+ return {"include_dirs" : [inc ], "library_dirs" : [lib ]}
97
+
79
98
# ----------------------------------------------------------------------------
80
99
81
100
# compile and link options
You can’t perform that action at this time.
0 commit comments