-
-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stub file not getting included when using --manifest
flag or building wheels
#1517
Comments
I think the issue is related to this line: Line 412 in 6a695e2
Unless I’m terribly mistaken when the |
Ah yeah, we default to looking for Lines 133 to 137 in 6a695e2
|
Which is then used here: Lines 837 to 847 in 6a695e2
|
So ideally we would pass information about the active manifest dir in the Line 18 in 6a695e2
this seems like a minor change since Lines 56 to 61 in 6a695e2
This would effectively infer the |
You could add Pull requests are welcome! |
That’s a good idea! I’ll send you a PR over the next couple of days. |
On second thought, you should move stub file next to
And this shouldn't work. |
Let me try this, I was originally having trouble getting that to work as well |
Here are some experiments that I have conducted. Same project directory as above.
Seems like this works as intended. My overarching goal with this Issue was to write a "rust first" crate with optional Python bindings. What I mean by that is that the root crate is meant to be used by arbitrary Rust crates, and then the bindings can be installed optionally when one wants to use the crate from Python. The convenience that this enables is installing either a wheel or Rust crate from the github link as follows: Rust dependencyIn another crate's Cargo.toml [dependencies]
maturin_manifest = { git = ssh://[email protected]/user/maturin_manifest.git } Python dependencyIn a Python package that wants to use this repository and build the bindings using [options.extras_require]
all =
maturin_manifest@git+ssh://[email protected]/user/maturin_manifest.git With just the |
Well, I mean you can move [options.extras_require]
all =
maturin_manifest@git+ssh://[email protected]/user/maturin_manifest.git#subdirectory=rust |
Oh nice, I didn't actually know that |
Discussed in #1516
Originally posted by bkolligs March 4, 2023
Note that I originally opened this in discussion, but seems more like a bug than just a normal question.
I am trying to deploy a wheel of a Python package, and the stub file I have in the root of my package is not getting copied to the produced wheel when I use the
--manifest
flag withmaturin develop
. Here's an example:I have the following directory structure for the package
maturin_manifest
:With the following
pyproject.toml
:When I perform the command
maturin develop -m rust/Cargo.toml
the stub file is not detected:But when I perform
maturin develop
inside therust
directory it does work.Additionally, when I try and simulate building this package from another, say as a dependency in
setup.cfg
withpip install .
, the same thing occurs, and the stub file does not exist in the library directory.The text was updated successfully, but these errors were encountered: