8000 Remove setuptools_scm_git_archive dependency and add sdist test by oscargus · Pull Request #23387 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Remove setuptools_scm_git_archive dependency and add sdist test #23387

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

Merged
merged 2 commits into from
Aug 14, 2022

Conversation

oscargus
Copy link
Member
@oscargus oscargus commented Jul 4, 2022

PR Summary

Closes #23325
Closes #23386

Removes setuptools_scm_git_archive as dependency, but increases the setuptools_scm version requirement from 4 to 7.

PR Checklist

Tests and Styling

  • [N/A] Has pytest style unit tests (and pytest passes).
  • [N/A] Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • [N/A] New features are documented, with examples if plot related.
  • [N/A] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • [N/A] Documentation is sphinx and numpydoc compliant (the docs should build without error).

@oscargus oscargus force-pushed the removesetuptoolsscmgitarchive branch from 6f71ddf to 3abbf61 Compare July 4, 2022 10:41
@oscargus oscargus added Build CI: Run cibuildwheel Run wheel building tests on a PR labels Jul 4, 2022
@QuLogic
Copy link
Member
QuLogic commented Jul 4, 2022

In Cartopy, we removed .git_archival.txt entirely: SciTools/cartopy#2057; I wonder if either approach is broken somehow. @dopplershift @greglucas

I think wheels were always okay; the problem is in #23325 where installs are made from an sdist (because 3.11 has no wheels). So this needs testing from sdist, not just cibuildwheel.

@dopplershift
Copy link
Contributor

I think we broke installs from direct GitHub tarballs.

@tacaswell tacaswell added this to the v3.5.3 milestone Jul 5, 2022
@oscargus
Copy link
Member Author
oscargus commented Jul 6, 2022

OK! I'll try to install 3.11 on some computer and see what happens. (It wasn't clear to me that this was actually related to #23325, just acted on the info in #23386.)

@tacaswell tacaswell modified the milestones: v3.5.3, v3.6.0 Jul 6, 2022
@oscargus oscargus marked this pull request as draft July 7, 2022 07:18
@oscargus oscargus force-pushed the removesetuptoolsscmgitarchive branch 3 times, most recently from 61cd246 to e1de7b3 Compare July 19, 2022 09:27
@oscargus
Copy link
Member Author

I tested this locally and it seems to solve #23325 as well.

Tried to add a CI-file building an sdist and printing the resulting version number. Not sure how worthwhile it is. (Clearly, this should be connected to a label and more OS and Python versions, but to illustrate it.)

@oscargus oscargus closed this Jul 19, 2022
@oscargus oscargus reopened this Jul 19, 2022
@oscargus oscargus marked this pull request as ready for review July 19, 2022 11:24
@oscargus oscargus force-pushed the removesetuptoolsscmgitarchive branch from e1de7b3 to 9c6b5f9 Compare August 5, 2022 14:39
@oscargus
Copy link
Member Author
oscargus commented Aug 5, 2022

It seems like cibuildwheel cannot first build an sdist. Current version uses build and then installs both sdist and wheel and checks the version number.

@oscargus oscargus force-pushed the removesetuptoolsscmgitarchive branch 3 times, most recently from 378c816 to 7175989 Compare August 5, 2022 15:15
@oscargus oscargus changed the title Remove setuptools_scm_git_archive dependency Remove setuptools_scm_git_archive dependency and add sdist test Aug 5, 2022
@tacaswell
Copy link
Member

Is this a blocking issues for 3.6?

@oscargus
Copy link
Member Author
oscargus commented Aug 8, 2022

Is this a blocking issues for 3.6?

Hard to say. I'd say that it is rather non-controversial.

  • Removing setuptools_scm_git_archive and modifying .git_archival.txt are cookbook recipes. This is primarily maintenance, although it happens to solve the sdist version 0.0 problem as well.
  • Requiring setuptools_scm >= 7, I cannot really judge, probably the main problem is if that in turn require some "problematic" versions of something.
  • Testing is probably the main question. I am not sure that we actually do require a test for the version not being "0.0" again. It would be nice, but maybe it is better to drop the new tests, rather than delaying the fix?

@QuLogic
Copy link
Member
QuLogic commented Aug 9, 2022

This definitely needs to go in 3.6, but it depends on #23557.

@QuLogic QuLogic added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Aug 9, 2022
@oscargus oscargus force-pushed the removesetuptoolsscmgitarchive branch from 7175989 to 57f756c Compare August 14, 2022 19:50
@oscargus oscargus force-pushed the removesetuptoolsscmgitarchive branch from 57f756c to ad74ba4 Compare August 14, 2022 19:51
@@ -1 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true)$
ref-names: $Format:%D$
Copy link
Member

Choose a reason for hiding this comment

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

Do we need this line? the refs name includes both branches and tags and is the source of a lot of trouble with non-reproducible downloads from github...

Copy link
Member Author

Choose a reason for hiding this comment

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

No idea. I just copied from https://github.com/Changaco/setuptools_scm_git_archive where they have that line in the migration guide.

Copy link
Member

Choose a reason for hiding this comment

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

Lets defer this question to a later time. It is a can of worms I do not want to block this moving forward.

Copy link
Member
@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

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

I will update the version of setuptools_scm we need in #23620

@tacaswell tacaswell merged commit a68f21f into matplotlib:main Aug 14, 2022
@oscargus oscargus deleted the removesetuptoolsscmgitarchive branch August 14, 2022 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build CI: Run cibuildwheel Run wheel building tests on a PR Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

setuptools_scm-git-archive is obsolete [Bug]: Inconsistent version when install 3.5.0 to 3.5.2 on GitHub CI
5 participants
0