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

Remove setup.cfg in favor of pyproject.toml #8183

Merged
merged 3 commits into from
Sep 14, 2023

Conversation

max-sixty
Copy link
Collaborator

This is tested, but much of it was me tweaking from an LLM's attempt at the translation, so there may be small issues that aren't picked up in tests (but should be very easy to fix if these come up)

Copy link
Collaborator

@headtr1ck headtr1ck left a comment

Choose a reason for hiding this comment

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

Wanted to do this since ages, haha! Thx :)

pyproject.toml Outdated
@@ -6,7 +55,7 @@ requires = [
]

[tool.setuptools_scm]
fallback_version = "999"
fallback_version = "9999"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is leftover from your other PR :)

@keewis
Copy link
Collaborator

keewis commented Sep 14, 2023

you can also remove setup.py, now that pip (and the wider ecosystem) supports pyproject.toml-based editable installs

@@ -52,7 +52,7 @@
except Exception:
# Local copy or not installed with setuptools.
# Disable minimum version checks on downstream libraries.
__version__ = "999"
__version__ = "9999"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

FYI found another of these and added it to this PR

@max-sixty
Copy link
Collaborator Author

you can also remove setup.py, now that pip (and the wider ecosystem) supports pyproject.toml-based editable installs

Yes, I'm not sure how long we need to wait for this. I'll merge this and we can remove setup.py in a separate PR?

@max-sixty max-sixty merged commit 64660b6 into pydata:main Sep 14, 2023
22 of 23 checks passed
@max-sixty max-sixty deleted the setup-pyproject branch September 14, 2023 20:52
@keewis
Copy link
Collaborator

keewis commented Sep 14, 2023

I'd consider editable installs to be development-only, so I don't think we need to wait.

If we did, we would have to wait until we can drop python 3.9, which according to SPEC0 would be pretty soon? If we do count pip=21.3 being released about a week after python 3.9, we'd have to wait another year.

@max-sixty
Copy link
Collaborator Author

If we did, we would have to wait until we can drop python 3.9

Would this mean we can't develop on 3.9?

@keewis
Copy link
Collaborator

keewis commented Sep 14, 2023

as far as I remember, we had the rule to support the newest packaging tool version available at the release of the oldest supported python version.

Would this mean we can't develop on 3.9?

once we drop support for a python version, developing on said version wouldn't make too much sense, anyways. I'm not saying that we should immediately drop that version once policy allows it (and I didn't check whether our policy aligns with the SPEC), but this would be one point in favor of doing so earlier

@max-sixty
Copy link
Collaborator Author

Sorry — I had meant — would removing setup.py mean we couldn't develop on python 3.9? (My message was confusing re whether I was referring to us removing setup.py vs. dropping 3.9 support...)

@keewis
Copy link
Collaborator

keewis commented Sep 14, 2023

would removing setup.py mean we couldn't develop on python 3.9

as long as you have a version of pip (or any other frontend) new enough to support PEP 660, you should be fine. What I was talking about was backwards compatibility (some people use really old versions of pip), which I don't think is that important for development.

@max-sixty
Copy link
Collaborator Author

as long as you have a version of pip (or any other frontend) new enough to support PEP 660

Super, thanks. Agree!

@keewis keewis mentioned this pull request Sep 15, 2023
1 task
max-sixty added a commit to max-sixty/xarray that referenced this pull request Sep 15, 2023
My mistake from pydata#8183. I added `--strict-markers` so we can't make this sort of mistake again.
@max-sixty max-sixty mentioned this pull request Sep 15, 2023
max-sixty added a commit that referenced this pull request Sep 15, 2023
My mistake from #8183. I added `--strict-markers` so we can't make this sort of mistake again.
@mathause
Copy link
Collaborator

Nice - thanks! Can we also remove requirements.txt? I think https://github.com/pydata/xarray/network/dependencies also parses toml files.

max-sixty added a commit to max-sixty/xarray that referenced this pull request Sep 16, 2023
max-sixty added a commit that referenced this pull request Sep 17, 2023
max-sixty added a commit to max-sixty/xarray that referenced this pull request Sep 17, 2023
My mistake from pydata#8183. I added `--strict-markers` so we can't make this sort of mistake again.
max-sixty added a commit to max-sixty/xarray that referenced this pull request Sep 17, 2023
max-sixty added a commit to max-sixty/xarray that referenced this pull request Sep 17, 2023
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.

4 participants