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 to src layout and fix build process #32

Merged
merged 2 commits into from Oct 25, 2022
Merged

Conversation

michaelherold
Copy link
Owner

@michaelherold michaelherold commented Oct 23, 2022

The 2.0.0 release was botched due to a packaging error where the package directory was misnamed as pyIsEmail instead of the expected pyisemail. This was due to Python automatically adding the current directory to the PYTHONPATH when invoked and my time of being away from Python and forgetting that.

This change reorganizes the repository around the src layout which prevents the issue since an import pyisemail will no longer load from the current path. It also changes the test setup to install the package in the environment instead of using an editable install. This way we're actually using the built wheel as the source of the packages, which verifies that the wheel works as expected.

Fixes #30

The original test didn't show it because Python was smartly loading the
files from the current directory. This change makes the virtualenv in
a temporary directory, installs the wheel, and runs the smoke test from
that context. This means it cannot pick up on the local files anymore.

This should lead to a failed test. If so, I will adjust the project file
to fix the issue.
The 2.0.0 release was botched due to a packaging error where the package
directory was misnamed as `pyIsEmail` instead of the expected
`pyisemail`. This was due to Python automatically adding the current
directory to the `PYTHONPATH` when invoked and my time of being away
from Python and forgetting that.

This change reorganizes the repository around the [src layout][1] which
prevents the issue since an `import pyisemail` will no longer load from
the current path. It also changes the test setup to install the package
in the environment instead of using an editable install. This way we're
actually using the built wheel as the source of the packages, which
verifies that the wheel works as expected.

[1]: https://blog.ionelmc.ro/2014/05/25/python-packaging/
@michaelherold michaelherold changed the title Fix smoke test to show the packaging error Move to src layout and fix build process Oct 25, 2022
@michaelherold michaelherold marked this pull request as ready for review October 25, 2022 02:59
@michaelherold michaelherold merged commit 5f6608c into main Oct 25, 2022
@michaelherold michaelherold deleted the fix-packaging-issue branch October 25, 2022 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2.0.0 renamed module
1 participant