Skip to content

Commit

Permalink
Merge pull request #914 from messense/pure-stubs
Browse files Browse the repository at this point in the history
Allow stubs-only mixed project layout
  • Loading branch information
messense committed May 13, 2022
2 parents 282182f + 214e288 commit f5710d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Allow use python interpreters from bundled sysconfig when not cross compiling in [#907](https://github.com/PyO3/maturin/pull/907)
* Use setuptools-rust for bootstrapping in [#909](https://github.com/PyO3/maturin/pull/909)
* Allow setting the publish repository URL via `MATURIN_REPOSITORY_URL` in [#913](https://github.com/PyO3/maturin/pull/913)
* Allow stubs-only mixed project layout in [#914](https://github.com/PyO3/maturin/pull/914)
* Allow setting the publish user name via `MATURIN_USERNAME` in [#915](https://github.com/PyO3/maturin/pull/915)

## [0.12.15] - 2022-05-07
Expand Down
4 changes: 3 additions & 1 deletion src/build_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ impl ProjectLayout {
};

if python_module.is_dir() {
if !python_module.join("__init__.py").is_file() {
if !python_module.join("__init__.py").is_file()
&& !python_module.join("__init__.pyi").is_file()
{
bail!("Found a directory with the module name ({}) next to Cargo.toml, which indicates a mixed python/rust project, but the directory didn't contain an __init__.py file.", module_name)
}

Expand Down

0 comments on commit f5710d4

Please sign in to comment.