We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
tomlgen_rust
1 parent cd0dbc3 commit 574b3bfCopy full SHA for 574b3bf
setuptools_rust/tomlgen.py
@@ -128,6 +128,11 @@ def build_cargo_toml(self, ext):
128
# The directory where the extension's manifest is located
129
tomldir = os.path.dirname(ext.path)
130
131
+ # If the RustExtension was not created by `find_rust_extensions`
132
+ # the `lib.rs` file is expected to be located near `Cargo.toml`
133
+ if not hasattr(ext, 'libfile'):
134
+ ext.libfile = ext.path.replace('Cargo.toml', 'lib.rs')
135
+
136
# Create a small package section
137
toml.add_section("package")
138
toml.set("package", "name", quote(ext.name))
0 commit comments