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

Use src-layout instead of flat-layout #2091

Open
chrysle opened this issue May 11, 2024 · 4 comments
Open

Use src-layout instead of flat-layout #2091

chrysle opened this issue May 11, 2024 · 4 comments

Comments

@chrysle
Copy link
Contributor

chrysle commented May 11, 2024

Any reason why this project doesn't adhere to src-layout? One should still be able to invoke pip-tools through runpy afterwards.

@webknjaz
Copy link
Member

Probably historic state of things. It doesn't matter, really. And I don't see any reason to change it.

@chrysle
Copy link
Contributor Author

chrysle commented May 12, 2024

Hmm, it would help to prevent any accidental importing of the code when it should be installed (also when developing, for that we have tox devenv). Besides, I found this line, it seems to have been intended:

# needed only because we did not adopt src layout yet

@macro1
Copy link
Contributor

macro1 commented May 12, 2024

I wonder if that comment is wrong.. Explicitly setting includes is needed due to the distribution package name not matching the import package name isn't it?

edit: I see. src-layout is supported directly by "Automatic discovery" in setuptools. Interesting.
https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#auto-discovery

@chrysle
Copy link
Contributor Author

chrysle commented May 12, 2024

I wonder if that comment is wrong..

I don't think custom discovery is needed, anyway, as setuptools will also try its best at detecting packages with flat-layout, and we don't have any that we would want to exclude.

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

No branches or pull requests

3 participants