File tree Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,6 @@ readme = "README.md"
2121license = { text = " MPL-2.0" }
2222classifiers = [
2323 " Programming Language :: Python :: 3" ,
24- " Programming Language :: Python :: 3.8" ,
25- " Programming Language :: Python :: 3.9" ,
26- " Programming Language :: Python :: 3.10" ,
2724 " Programming Language :: Python :: Implementation :: CPython" ,
2825 " Programming Language :: C++" ,
2926 " Programming Language :: Cython" ,
@@ -101,7 +98,7 @@ manylinux-aarch64-image = "manylinux2014"
10198[tool .cibuildwheel .macos ]
10299build = [" cp*-macosx_*" ]
103100archs = [" x86_64" , " arm64" ]
104- environment = { CC =" clang" , CXX =" clang++" , MACOSX_DEPLOYMENT_TARGET = " 10.15 " }
101+ environment = { CC =" clang" , CXX =" clang++" }
105102# Skip trying to test arm64 builds on Intel Macs
106103test-skip = [" *-macosx_arm64" , " *-macosx_universal2:arm64" ]
107104
Original file line number Diff line number Diff line change @@ -129,6 +129,8 @@ def generate_build_ext(pkg_dir: Path, pkg_name: str):
129129 "-fvisibility=hidden" ,
130130 ]
131131 lflags += ["-lpthread" , "-O3" ]
132+ # for linux/macos add visibility to the init function
133+ define_macros .append (("PyMODINIT_FUNC" , 'extern "C" __attribute__((visibility ("default"))) PyObject*' ))
132134 # # extra flag for Mac
133135 if platform .system () == "Darwin" :
134136 # compiler flag to set version
@@ -145,17 +147,6 @@ def generate_build_ext(pkg_dir: Path, pkg_name: str):
145147 cython_src_cpp = [x .with_suffix (".cpp" ) for x in cython_src ]
146148 print ("Generated cpp files" )
147149 print (cython_src_cpp )
148- # for linux add visibility to the init function
149- if not if_win :
150- for cpp_src in cython_src_cpp :
151- with open (cpp_src ) as f :
152- cpp_code = f .read ()
153- cpp_code_modified = cpp_code .replace (
154- "#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC" ,
155- '#define __Pyx_PyMODINIT_FUNC extern "C" __attribute__((visibility ("default"))) PyObject* ' ,
156- )
157- with open (cpp_src , "w" ) as f :
158- f .write (cpp_code_modified )
159150
160151 # list of extensions of generated cpp files from cython
161152 exts = [
You can’t perform that action at this time.
0 commit comments