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

Modernize build (to Hatch) #774

Merged
merged 2 commits into from
Dec 23, 2023
Merged

Conversation

akx
Copy link
Contributor

@akx akx commented Dec 21, 2023

This is a reimplementation of #712 and #719.


The packages generated are practically similar – this actually uncovered that tests/testsupport wasn't being correctly packaged into the sdist before, so tests probably couldn't run with that package.

$ python ~/build/pkgdiff/pkgdiff.py ./dist-orig/paho-mqtt-1.6.1.tar.gz ./dist/paho_mqtt-1.6.1.tar.gz --strip=1
# 9 files only in ./dist-orig/paho-mqtt-1.6.1.tar.gz
MANIFEST.in
setup.cfg
setup.py
src/paho_mqtt.egg-info/PKG-INFO
src/paho_mqtt.egg-info/SOURCES.txt
src/paho_mqtt.egg-info/dependency_links.txt
src/paho_mqtt.egg-info/not-zip-safe
src/paho_mqtt.egg-info/requires.txt
src/paho_mqtt.egg-info/top_level.txt
# 4 files only in ./dist/paho_mqtt-1.6.1.tar.gz
.gitignore
pyproject.toml
tests/testsupport/__init__.py
tests/testsupport/broker.py
# 46 common files
PKG-INFO {'size': (47507, 47514)}
README.rst {'size': (46461, 46454)}
$ python ~/build/pkgdiff/pkgdiff.py ./dist-orig/paho_mqtt-1.6.1-py3-none-any.whl ./dist/paho_mqtt-1.6.1-py3-none-any.whl
# 2 files only in ./dist-orig/paho_mqtt-1.6.1-py3-none-any.whl
paho_mqtt-1.6.1.dist-info/LICENSE.txt
paho_mqtt-1.6.1.dist-info/top_level.txt
# 1 files only in ./dist/paho_mqtt-1.6.1-py3-none-any.whl
paho_mqtt-1.6.1.dist-info/licenses/LICENSE.txt
# 13 common files
paho_mqtt-1.6.1.dist-info/METADATA {'size': (47508, 47514)}
paho_mqtt-1.6.1.dist-info/RECORD {'size': (1186, 1102)}
paho_mqtt-1.6.1.dist-info/WHEEL {'size': (92, 87)}

@akx akx force-pushed the modernize-build branch 4 times, most recently from ba02477 to 523991d Compare December 21, 2023 11:22
@akx
Copy link
Contributor Author

akx commented Dec 21, 2023

Hey @ofek, if you have time to take a peek – I think I'm getting something hopelessly wrong with the src layout stuff if python -m build . is complaining

* Creating venv isolated environment...
* Installing packages in isolated environment... (hatchling)
* Getting build dependencies for sdist...
* Building sdist...
* Building wheel from sdist
* Creating venv isolated environment...
* Installing packages in isolated environment... (hatchling)
* Getting build dependencies for wheel...
* Building wheel...
OSError: Error getting the version from source `regex`: file does not exist: src/paho/mqtt/__init__.py

I kinda understand that since the src/ directory isn't there in the sdist anymore, but I think I'm Doing It Wrong here 😁

pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
@akx
Copy link
Contributor Author

akx commented Dec 21, 2023

Thanks @ofek ❤️

@ofek
Copy link

ofek commented Dec 21, 2023

Happy to help! Thanks for using your free time to update projects 😄

@akx akx marked this pull request as ready for review December 22, 2023 12:07
@akx akx force-pushed the modernize-build branch 2 times, most recently from 5cfb81e to 659d041 Compare December 23, 2023 08:34
@akx
Copy link
Contributor Author

akx commented Dec 23, 2023

@PierreF Rebased, ready for review.

pyproject.toml Outdated Show resolved Hide resolved
@akx akx requested a review from PierreF December 23, 2023 17:08
Co-authored-by: Ofek Lev <[email protected]>
Co-authored-by: Pierre Fersing <[email protected]>

Signed-off-by: Aarni Koskela <[email protected]>
@PierreF PierreF merged commit fc0ab2f into eclipse-paho:master Dec 23, 2023
6 checks passed
@PierreF
Copy link
Contributor

PierreF commented Dec 23, 2023

Thank for this work. Also thank @cclauss and @semuadmin for the other PR on the same subject.

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 this pull request may close these issues.

3 participants