File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 uses : PyO3/maturin-action@v1
2929 with :
3030 target : ${{ matrix.target }}
31- args : --release --out dist --features extension-module
31+ # Maturin will use [tool.maturin.features = ["python"]] from pyproject.toml
32+ args : --release --out dist
3233 sccache : ' true'
3334 manylinux : auto
3435 - name : Upload wheels
6364 target : aarch64-apple-darwin
6465 suffix : macos-aarch64
6566 binary_ext : " "
67+ env :
68+ PYO3_NO_PYTHON : 1 # Ensure pyo3-build-config doesn't look for Python
6669 steps :
6770 - uses : actions/checkout@v4
6871
@@ -161,4 +164,4 @@ jobs:
161164 uses : softprops/action-gh-release@v2
162165 with :
163166 files : assets/*
164- generate_release_notes : true
167+ generate_release_notes : true
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ name = "fbtk-build"
2323path = " src/bin/build.rs"
2424
2525[dependencies ]
26- pyo3 = { version = " 0.23" , features = [" abi3-py38" ] }
27- numpy = " 0.23"
26+ pyo3 = { version = " 0.23" , features = [" abi3-py38" ], optional = true }
27+ numpy = { version = " 0.23" , optional = true }
2828rayon = " 1.10"
2929anyhow = " 1.0"
3030serde = { version = " 1.0" , features = [" derive" ] }
@@ -38,4 +38,5 @@ uff-relax = "1.0.0"
3838glam = " 0.31"
3939
4040[features ]
41+ python = [" pyo3" , " numpy" , " extension-module" ]
4142extension-module = [" pyo3/extension-module" ]
Original file line number Diff line number Diff line change @@ -29,4 +29,4 @@ fbtk-build = "fbtk.cli:build"
2929
3030[tool .maturin ]
3131module-name = " fbtk.fbtk"
32- features = [" pyo3/abi3-py38 " ]
32+ features = [" python " ]
Original file line number Diff line number Diff line change 11pub mod core;
22pub mod parsers;
3+
4+ #[ cfg( feature = "python" ) ]
35pub mod python;
46
7+ #[ cfg( feature = "python" ) ]
58use pyo3:: prelude:: * ;
9+ #[ cfg( feature = "python" ) ]
610use crate :: python:: { PyBuilder , PySystem , PyMolecule } ;
11+ #[ cfg( feature = "python" ) ]
712use crate :: python:: functions:: * ;
813
14+ #[ cfg( feature = "python" ) ]
915#[ pymodule]
1016fn fbtk ( m : & Bound < ' _ , PyModule > ) -> PyResult < ( ) > {
1117 // Thread pool initialization
You can’t perform that action at this time.
0 commit comments