Skip to content

Conversation

@ThiefMaster
Copy link
Member

Setuptools is rather annoying when doing a PEP-660-style editable install by requiring code execution to map the package name to a path. This is not supported by static code analyzers such as the VSCode Python extension, so in case of such an installation any indico imports in plugins cannot be resolved.

Hatchling uses a simple static _indico.pth file that points to the source directory, which does not have this problem.

It's also overall nicer, e.g. by automatically excluding gitignored files instead of the (obscure) MANIFEST.in

@ThiefMaster ThiefMaster added the build-wheel Build a Python wheel for this PR label Aug 10, 2024
@ThiefMaster ThiefMaster added this to the v3.3 milestone Aug 10, 2024
@github-actions github-actions bot added dependencies Pull requests that update a dependency file python Pull requests that update Python deps labels Aug 10, 2024
@tomasr8
Copy link
Member

tomasr8 commented Aug 11, 2024

Finally moving to pyproject.toml 🎉 🎉

We skip *_test.py files when building wheels (or doing non-editable
installs in general), but one such file was referenced by an
"importable" fixture
We do not use nor publish sdists, but by using the standard build flow
we get better build isolation, which is particularly useful in case of
plugins that use setuptools, since we do not need to manually remove the
`build` directory created during the wheel build process.
@ThiefMaster ThiefMaster marked this pull request as ready for review August 16, 2024 15:11
@ThiefMaster ThiefMaster enabled auto-merge (squash) August 16, 2024 15:18
@ThiefMaster ThiefMaster merged commit 0da3bbb into indico:master Aug 16, 2024
@ThiefMaster ThiefMaster deleted the hatchling branch August 16, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-wheel Build a Python wheel for this PR dependencies Pull requests that update a dependency file python Pull requests that update Python deps

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants