Skip to content
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

fix: Missing subdirectories top-level submodules #136

Merged
merged 1 commit into from
Sep 2, 2023

Conversation

sizmailov
Copy link
Owner

The handling of submodules as the CLI argument was never perfect, but it got utterly broken in 1.0.

Compare tree structure in different versions
VERSION: 👉 0.16

+ pybind11-stubgen module1.module2.module3
stubs
└── module1
    └── module2
        └── module3-stubs
            ├── __init__.pyi
            └── setup.py

3 directories, 2 files
+ pybind11-stubgen module1.module2.module3 --root-module-suffix=
stubs
└── module1
    └── module2
        └── module3
            ├── __init__.pyi
            └── setup.py

3 directories, 2 files
+ pybind11-stubgen module1.module2.module3 --root-module-suffix=-stubs
stubs
└── module1
    └── module2
        └── module3-stubs
            ├── __init__.pyi
            └── setup.py

3 directories, 2 files
VERSION: 👉 pybind11-stubgen~=1.0

+ pybind11-stubgen module1.module2.module3
stubs
└── module3.pyi

0 directories, 1 file
+ pybind11-stubgen module1.module2.module3 --root-suffix=
stubs
└── module1.module2.module3
    └── __init__.pyi

1 directory, 1 file
+ pybind11-stubgen module1.module2.module3 --root-suffix=-stubs
stubs
└── module1.module2.module3-stubs
    └── __init__.pyi

1 directory, 1 file
VERSION: 👉 <this branch>

+ pybind11-stubgen module1.module2.module3
stubs
└── module1
    └── module2
        └── module3.pyi

2 directories, 1 file
+ pybind11-stubgen module1.module2.module3 --root-suffix=
stubs
└── module1
    └── module2
        └── module3.pyi

2 directories, 1 file
+ pybind11-stubgen module1.module2.module3 --root-suffix=-stubs
stubs
└── module1-stubs
    └── module2
        └── module3.pyi

Fixes #135

@sizmailov sizmailov merged commit 6fa91ad into master Sep 2, 2023
11 checks passed
@sizmailov sizmailov deleted the fix-top-level-submodule-out-path branch September 2, 2023 01:36
@sasq64
Copy link

sasq64 commented Jan 9, 2024

I still get submodules as submodule.pyi instead of submodule/__init__.pyi with the latest version ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Submodules no longer build the correct file structure
2 participants