Open abrisco opened 2 months ago
It is potentially possible to initialize StubInfo
without pyproject.toml
. As you say, what we need is the module name and where the stub file is generated.
Rather, I never try to build PyO3 project by Bazel (or other than maturin). Could you share a link describing how to setup Bazel based PyO3 project? It could help to support resolving this issue.
@termoshtt I have created https://github.com/abrisco/rules_pyo3/pull/3 to try and integrate this tool into some Bazel rules I wrote and am stuck at the point where I need to figure out how to write stubs to a specific location https://github.com/abrisco/rules_pyo3/blob/5a9b1dffaa8a6840446c0387dd7b0c56e9db7fdb/pyo3/private/pyo3_stub_generator.rs#L1-L11
The command line arguments to this script are currently that argv[1]
is the output location and my hope was that I can deduce the module name from the crate itself. Hopefully this gives you the insight you needed into my desired use case.
@termoshtt friendly ping 😄
@termoshtt another ping. I'm happy to make a PR I just want sign-off on an implementation 🙏
Hi, would it be possible/realistic to configure StubInfo and StubInfoBuilder to work without needing a
pyproject.toml
? I would like to integrate this into Bazel which does not usepyproject.toml
and it doesn't appear that I have any other means of defining the output location forpyi
files, nor can I specify the module name. It would be great if I could explicitly specify both of these so I could write something like this:Does this sound roughly like an acceptable idea and do maintainers have thoughts on the additions/changes to the existing interface?
Thanks!