elastic / elasticsearch-serverless-python

Official Python client for Elasticsearch Serverless
Apache License 2.0
9 stars 4 forks source link

Migrate to pyproject.toml and hatchling #6

Closed JoshMock closed 1 year ago

JoshMock commented 1 year ago

I used Hatch to convert setup.py into pyproject.toml, and then did some cleanup to drop dev-requirements.txt, ensure nox scripts keep running, etc.

JoshMock commented 1 year ago

@pquentin Good points! And all things I was hoping to uncover by opening a draft PR.

I'm more than happy to keep things in Nox. I really like how Hatch manages envs and their dependencies, but it's more of a convenience than a necessity.

Part of the inspiration here was that elasticsearch-py has an open issue where Seth seconded the use of Hatch to help migrate away from setup.py. But your point about just using Hatchling for packaging strikes a nice balance. I'll see about shifting back that direction.

JoshMock commented 1 year ago

@pquentin cleaned things up a bit. what do you think?

JoshMock commented 1 year ago

I kept Hatch as a dependency for version bumping and build targets, but I assume I could drop tool.hatch.version and tool.hatch.build.targets.sdist from the config if you only wanted to use hatchling.

JoshMock commented 1 year ago

Actually I just talked myself out of tool.hatch.version. We won't really need to automate versioning of this package since it will not need to stay in sync with the ES stack version.

JoshMock commented 1 year ago

Of course! Thanks for all the useful feedback @pquentin. First time migrating from a setup.py. :smile: