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

Move Python stubs to subpackage roots #657

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ if(BUILD_PYTHON)
_jormungandr_autodiff_stub
INSTALL_TIME
MODULE _jormungandr.autodiff
OUTPUT jormungandr/autodiff.pyi
OUTPUT jormungandr/autodiff/__init__.pyi
PYTHON_PATH $<TARGET_FILE_DIR:_jormungandr>
DEPENDS _jormungandr
COMPONENT python_modules
Expand All @@ -344,7 +344,7 @@ if(BUILD_PYTHON)
_jormungandr_optimization_stub
INSTALL_TIME
MODULE _jormungandr.optimization
OUTPUT jormungandr/optimization.pyi
OUTPUT jormungandr/optimization/__init__.pyi
PYTHON_PATH $<TARGET_FILE_DIR:_jormungandr>
DEPENDS _jormungandr
COMPONENT python_modules
Expand Down
4 changes: 3 additions & 1 deletion tools/generate_website.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ def prep_python_api_docs():
for package in ["autodiff", "optimization"]:
# Read .pyi
with open(
os.path.join("build-stubs", "install", "jormungandr", package + ".pyi")
os.path.join(
"build-stubs", "install", "jormungandr", package, "__init__.pyi"
)
) as f:
package_content = f.read()

Expand Down