sagemath/sage

setuptools: Upgrade to 58.2.0, remove old easy_install patch

Closed this issue · 17 comments

https://setuptools.pypa.io/en/latest/history.html

We remove a custom patch in the setuptools SPKG, build/pkgs/setuptools/patches/easy_install_lock.patch. This is unused, as easy_install has been replaced by pip in all uses by the Sage build system.

CC: @mkoeppe @jhpalmieri

Component: packages: standard

Author: Michael Orlitzky

Branch/Commit: cc028a3

Reviewer: John Palmieri

Issue created by migration from https://trac.sagemath.org/ticket/32691

comment:1

+1 for removing it. I think this code path might still be used when installing an old package that declares "setup_requires", but none of our SPKGs need it.

Commit: 4376f03

comment:2

Ok, easy enough.


New commits:

09aabf4Trac #32691: remove obsolete easy_install lockfile patch.
4376f03Trac #32691: remove description of a nonexistent patch in SPKG.rst.

Author: Michael Orlitzky

comment:3

Need to change the patchlevel in package-version.txt

comment:4

I'm not sure what you mean, there's no patchlevel in there currently? If you mean I should add one to indicate that the sources have changed... should I just bump the version to 58.0.4 instead?

comment:5

Whenever we add/change/remove patches that affect what is installed, need to distinguish it from what was there before by adding a .p0 to the version - https://doc.sagemath.org/html/en/developer/packaging.html#package-versioning

But yes, doing an upgrade of the package also does the trick. Going to 58.0.4 should be fine, or to latest 58.2.0 (https://setuptools.pypa.io/en/latest/history.html)

Branch pushed to git repo; I updated commit sha1. New commits:

cc028a3Trac #32691: upgrade setuptools to v58.2.0.

Changed commit from 4376f03 to cc028a3

comment:7

Alright, that's what I figured. Upgraded instead.

Description changed:

--- 
+++ 
@@ -1,4 +1,4 @@
-We've got one custom patch in the setuptools SPKG, `build/pkgs/setuptools/patches/easy_install_lock.patch`. Ideally this would be unused, as easy_install has been replaced by pip.
+https://setuptools.pypa.io/en/latest/history.html
 
-Can it be removed?
+We remove a custom patch in the setuptools SPKG, `build/pkgs/setuptools/patches/easy_install_lock.patch`. This is unused, as easy_install has been replaced by pip in all uses by the Sage build system.
 
comment:10

This works for me and looks like a pretty straightforward upgrade. I haven't tried it with any optional or experimental packages; could they lead to breakage because of removal of the patch?

comment:11

src/sage/misc/dev_tools.py still makes a reference to easy_install.

Other than that, there is no direct use of easy_install; that includes the optional/experimental packages.

As I said in comment:1, the code path with easy_install could still be triggered by setup_requires of a package. However, for normal packages (= packages with checksums.ini), this cannot actually install a package from the net because we poison the http* proxy. No install, so no locking needed.

So only "script" or "pip" packages would need to be checked whether any of these use setup_requires

comment:12

Okay, let's move on. mkoeppe, feel free to add yourself as a reviewer and/or author depending on your role here.

Reviewer: John Palmieri

Changed branch from u/mjo/ticket/32691 to cc028a3