Skip to content

Commit bd2e779

Browse files
committed
statical linking of libgmp.a for darwin platform
1 parent 0d2a6cf commit bd2e779

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

setup.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,16 @@
2929
ext = '.pyx' if USE_CYTHON else '.c'
3030

3131

32-
extensions = [
33-
Extension('bls_py.fields_t_c', [f'extmod/bls_py/fields_t_c{ext}'],
34-
libraries=[MP_LIB]),
35-
]
32+
if sys.platform == 'darwin':
33+
extensions = [
34+
Extension('bls_py.fields_t_c', [f'extmod/bls_py/fields_t_c{ext}'],
35+
extra_objects=['gmp/libgmp.a']),
36+
]
37+
else:
38+
extensions = [
39+
Extension('bls_py.fields_t_c', [f'extmod/bls_py/fields_t_c{ext}'],
40+
libraries=[MP_LIB]),
41+
]
3642

3743

3844
if USE_CYTHON:

0 commit comments

Comments
 (0)