Skip to content

Don't scaffold an empty package when nbdev-export exports nothing - #1640

Merged
jph00 merged 1 commit into
mainfrom
pr/don-t-scaffold-an-empty-package-when-nbdev-export
Aug 29, 2026
Merged

Don't scaffold an empty package when nbdev-export exports nothing#1640
jph00 merged 1 commit into
mainfrom
pr/don-t-scaffold-an-empty-package-when-nbdev-export

Conversation

@jph00

@jph00 jph00 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

nbdev-export ran add_init, update_llms_txt, and _build_modidx unconditionally. In a project whose notebooks export nothing and whose lib_path does not exist (for example a maturin repo with hand-written modules and docs-only notebooks), that created an empty package at the default lib path: __init__.py and a _modidx.py with no symbols.

The tail now runs only when lib_path exists. Any notebook that exports creates the directory, so exporting projects are unchanged.

@jph00 jph00 added the bug Something isn't working label Aug 29, 2026
@jph00
jph00 merged commit f1dbe50 into main Aug 29, 2026
@jph00
jph00 deleted the pr/don-t-scaffold-an-empty-package-when-nbdev-export branch August 29, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant