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

Do not use sage-pip-uninstall for PEP-517 packages, do not give up if sage-pip-uninstall fails #31423

Closed
mkoeppe opened this issue Feb 21, 2021 · 16 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Feb 21, 2021

sage-pip-uninstall is invoked before installing a Python package to "force-uninstall" an existing installation. This (1) predates the use of the staging install (DESTDIR), which we use for all Python packages; (2) depends on packages supporting setup.py --name.

As a step toward retiring this mechanism, we

  • do not call sage-pip-uninstall for PEP-517 packages without setup.py
  • make it only a warning if the sage-pip-uninstall script fails.

This is necessary for some upgrades attempted in #31280 and also works around a failure observed on cygwin-standard (likely because setup.py --name printed extra output that the script cannot parse) -https://github.com/mkoeppe/sage/runs/1943937811

  [scipy-1.5.4]   Package 'scipy' is currently not installed
  [scipy-1.5.4]   No legacy uninstaller found for 'scipy'; nothing to do
  [scipy-1.5.4]   Note: CFLAGS, CXXFLAGS and SHAREDFLAGS are taken from distutils,
  [scipy-1.5.4]         so their current settings are ignored.
  [scipy-1.5.4]   Installing scipy-1.5.4
  [scipy-1.5.4]   Error: could not determine package name
  [scipy-1.5.4]   ********************************************************************************
  [scipy-1.5.4]   Error uninstalling a previous version of scipy-1.5.4
  [scipy-1.5.4]   ********************************************************************************
  [scipy-1.5.4]   
  [scipy-1.5.4]   real	0m2.368s
  [scipy-1.5.4]   user	0m0.590s
  [scipy-1.5.4]   sys	0m0.928s
  [scipy-1.5.4]   ************************************************************************
  [scipy-1.5.4]   Error installing package scipy-1.5.4

CC: @embray @jhpalmieri @dimpase @kliem

Component: build

Author: Matthias Koeppe

Branch/Commit: efe7523

Reviewer: Dima Pasechnik

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

@mkoeppe mkoeppe added this to the sage-9.3 milestone Feb 21, 2021
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 27, 2021

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 27, 2021

Author: Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 27, 2021

Commit: 202f99a

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 27, 2021

New commits:

202f99abuild/bin/sage-dist-helpers (sdh_pip_install): Do not give up if sage-pip-uninstall fails

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 27, 2021

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title Do not give up if sage-pip-uninstall fails Do not use sage-pip-uninstall for PEP-517 packages, do not give up if sage-pip-uninstall fails Mar 10, 2021
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 10, 2021

Changed commit from 202f99a to efe7523

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 10, 2021

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

a046780build/bin/sage-dist-helpers (sdh_pip_install): Do not give up if sage-pip-uninstall fails
efe7523build/bin/sage-pip-install: For PEP 517 packages, do not try to uninstall first

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 10, 2021

comment:6

(Commit efe7523 was previously on the branch of #31280.)

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 16, 2021

comment:8

Again seen in https://github.com/sagemath/sage/runs/2115956504

Let's get this in, please.

@dimpase
Copy link
Member

dimpase commented Mar 16, 2021

Changed reviewer from https://github.com/mkoeppe/sage/actions/runs/606112478 to Dima Pasechnik

@dimpase
Copy link
Member

dimpase commented Mar 16, 2021

comment:9

OK, https://github.com/mkoeppe/sage/actions/runs/606112478 looks OK

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 16, 2021

comment:10

Thank you!

@vbraun
Copy link
Member

vbraun commented Mar 18, 2021

Changed branch from u/mkoeppe/do_not_give_up_if_sage_pip_uninstall_fails to efe7523

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants