File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -23,14 +23,18 @@ jobs:
2323 - name : Install cibuildwheel
2424 run : python -m pip install cibuildwheel
2525
26+ # Build the C library first
2627 - name : Build lib
2728 run : python setup.py build_lib
2829
30+ # This will now create platform-specific wheels with compiled CFFI extensions
2931 - name : Build wheels
3032 run : python -m cibuildwheel --output-dir wheelhouse
3133 env :
3234 # Override pyproject.toml settings if needed
3335 CIBW_BUILD_VERBOSITY : 1
36+ # Ensure CFFI can find the static library during compilation
37+ CIBW_ENVIRONMENT : " SMPT_LIB_DIR=./lib SMPT_INCLUDE_DIR=./smpt/ScienceMode_Library/include"
3438
3539 - uses : actions/upload-artifact@v4
3640 with :
Original file line number Diff line number Diff line change @@ -380,8 +380,8 @@ def copy_headers_to_package():
380380 },
381381 )
382382else :
383- # Full setup for normal installation using static CFFI definitions
384- # Note: cffi_modules is removed since we now use static definitions
383+ # Full setup for normal installation with CFFI compilation
384+ # This will create platform-specific wheels with compiled extensions
385385 setup (
386386 name = "sciencemode-cffi" ,
387387 packages = ["sciencemode" ],
@@ -397,7 +397,9 @@ def copy_headers_to_package():
397397 "Development Status :: 3 - Alpha" ,
398398 "Programming Language :: Python :: 3" ,
399399 ],
400- # Only cffi is required at runtime now (no pycparser needed)
400+ # CFFI compilation - this creates platform-specific wheels
401+ cffi_modules = ["sciencemode/_cffi.py:ffi" ],
402+ setup_requires = ["cffi>=1.0.0" ],
401403 install_requires = ["cffi>=1.0.0" ],
402404 cmdclass = {
403405 "build_lib" : BuildLibraryCommand ,
You can’t perform that action at this time.
0 commit comments