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

src/ structure? #44

Closed
tony opened this issue Sep 4, 2022 · 3 comments · Fixed by #45
Closed

src/ structure? #44

tony opened this issue Sep 4, 2022 · 3 comments · Fixed by #45

Comments

@tony
Copy link
Contributor

tony commented Sep 4, 2022

When a second potential .py file is considered, setuptools plays better with src/

I've found it difficult in #38 to get the entrypoints and multiple modules in a flat structure to work correctly. It seems by design it doesn't work (or else people would be committing junk [1]):

If you are using auto-discovery with flat-layout, setuptools will refuse to create distribution archives with multiple top-level packages or modules.

This is done to prevent common errors such as accidentally publishing code not meant for distribution (e.g. maintenance-related scripts).

Users that purposefully want to create multi-package distributions are advised to use Custom discovery or the src-layout.

@twmr
Copy link
Owner

twmr commented Sep 5, 2022

I also had problems in several other projects that don't have a src/ structure. So I'm 👍🏿 on switching to a src/ structure.

@tony
Copy link
Contributor Author

tony commented Sep 5, 2022

PR'd at #45

I am also starting to adopt src/ on projects - the only reason being the package systems of the day work better with it 🤷

@twmr twmr closed this as completed in #45 Sep 5, 2022
@twmr
Copy link
Owner

twmr commented Sep 5, 2022

Thx. Merged.

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 a pull request may close this issue.

2 participants