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

PYTHON-4451 Use Hatch as Build Backend #1644

Merged
merged 24 commits into from
Jun 7, 2024
Merged

Conversation

blink1073
Copy link
Member

No description provided.

@blink1073 blink1073 changed the title PYTHON-4451 Replace Setuptools with Hatch and CMake PYTHON-4451 Use Hatch as Build Backend May 22, 2024
@blink1073
Copy link
Member Author

I filed PYTHON-4452 for the libmongocrypt failure.

@blink1073
Copy link
Member Author

evergreen retry

@blink1073 blink1073 marked this pull request as ready for review May 23, 2024 13:43
caseyclements
caseyclements previously approved these changes May 23, 2024
Copy link
Contributor

@caseyclements caseyclements left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. It would be good to have a little demo sometime.

@@ -136,32 +136,8 @@ def build_extension(self, ext):
)
ext_modules = []


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You were able to get rid of all this because of the way that requirements.txt is handled? That's awesome!

@@ -31,12 +31,10 @@ jobs:
- name: Run linters
run: |
tox -m lint-manual
- name: Check Manifest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No manifest file!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read the Why Hatch? page. I'm starting to get it. Very nice.

if isinstance(version_tuple[-1], str):
return ".".join(map(str, version_tuple[:-1])) + version_tuple[-1]
return ".".join(map(str, version_tuple))
pattern = r"(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this a function and add a few unit tests to make sure it works with a variety of versions? Eg "4.8.0.dev1", "4.8.0", "5.0", etc...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. We don't support "5.0", it has to have the patch version.

Copy link
Member

@ShaneHarvey ShaneHarvey Jun 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think not supporting "5.0" is a mistake. Our 4.0 release used "4.0" for example, same for "3.0". If we don't support "5.0" then I worry we'll accidentally set the version to a 2 part at some point and lead to a bug where version_tuple is silently set to an empty tuple.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

ShaneHarvey
ShaneHarvey previously approved these changes Jun 6, 2024
@blink1073 blink1073 merged commit 2b03001 into mongodb:master Jun 7, 2024
32 of 34 checks passed
@blink1073 blink1073 deleted the use-hatch branch June 7, 2024 11:24
blink1073 added a commit to blink1073/mongo-python-driver that referenced this pull request Jun 7, 2024
blink1073 added a commit that referenced this pull request Jun 10, 2024
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