Skip to content

Commit 3a4ca3f

Browse files
committed
fix for linux build
1 parent 6e5e652 commit 3a4ca3f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/wheels.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- [macos-13, macosx_x86_64]
3434
- [macos-14, macosx_arm64]
3535
- [windows-latest, win_amd64]
36-
python:
36+
python:
3737
- ["3.10", "cp310"]
3838
- ["3.11", "cp311"]
3939
- ["3.12", "cp312"]
@@ -55,7 +55,7 @@ jobs:
5555
CIBW_BEFORE_BUILD: yum install -y gsl-devel && pip install -e .
5656
with:
5757
output-dir: wheelhouse
58-
58+
5959
- name: Build wheels for macOS
6060
if: runner.os == 'macOS'
6161
uses: pypa/[email protected]
@@ -83,7 +83,7 @@ jobs:
8383
echo "INCLUDE=$env:INCLUDE" >> $env:GITHUB_ENV
8484
echo "LIB=$env:LIB" >> $env:GITHUB_ENV
8585
echo "CONDA_PREFIX=$env:CONDA_PREFIX" >> $env:GITHUB_ENV
86-
86+
8787
- name: Build wheels for Windows
8888
if: runner.os == 'Windows'
8989
uses: pypa/[email protected]

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ def get_gsl_config_win():
9595
compiler_type = get_compiler_type()
9696
if compiler_type in ("unix", "cygwin", "mingw32"):
9797
extra_compile_args = ["-std=c++11", "-Wall", "-Wno-write-strings", "-O3", "-funroll-loops", "-ffast-math"]
98-
extra_objects += ((p + "/libgsl.a") for p in gcfg["library_dirs"])
98+
extra_objects += [
99+
os.path.join(p, "libgsl.a") for p in gcfg["library_dirs"] if os.path.isfile(os.path.join(p, "libgsl.a"))
100+
]
99101
elif compiler_type == "msvc":
100102
define_macros += [("_USE_MATH_DEFINES", None)]
101103
extra_compile_args = ["/EHs"]
@@ -117,8 +119,6 @@ def get_gsl_config_win():
117119

118120
# define extension here
119121
def create_extensions():
120-
if sys.platform.startswith('linux'):
121-
return [Extension("diffpy.pdffit2.pdffit2", glob.glob("src/extensions/**/*.cc"))]
122122
ext = Extension("diffpy.pdffit2.pdffit2", glob.glob("src/extensions/**/*.cc"), **ext_kws)
123123
return [ext]
124124

0 commit comments

Comments
 (0)