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

Add DESTDIR support to additional Python packages; upgrade pip to latest patch release #25051

Closed
embray opened this issue Mar 28, 2018 · 25 comments

Comments

@embray
Copy link
Contributor

embray commented Mar 28, 2018

These are packages for which the spkg-install requires more than just sdh_pip_install. See commit message for more details.

  • numpy
  • pillow
  • pip
  • setuptools

Also upgrades pip to the latest patch release (9.0.3) while we're at it.

Upstream tarball: https://pypi.python.org/packages/c4/44/e6b8056b6c8f2bfd1445cc9990f478930d8e3459e9dbf5b8e2d2922d64d3/pip-9.0.3.tar.gz

Component: build

Keywords: destdir cysignals pip setuptools pillow numpy

Author: Erik Bray

Branch/Commit: 5bdfd4e

Reviewer: Jeroen Demeyer

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

@embray embray added this to the sage-8.2 milestone Mar 28, 2018
@saraedum
Copy link
Member

Work Issues: merge conflicts

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 29, 2018

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

daaab8fUpdate additional Python packages with DESTDIR support.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 29, 2018

Changed commit from 293720c to daaab8f

@embray
Copy link
Contributor Author

embray commented Mar 29, 2018

comment:5

Rebased.


New commits:

daaab8fUpdate additional Python packages with DESTDIR support.

@jdemeyer
Copy link

Changed work issues from merge conflicts to none

@jdemeyer
Copy link

comment:7

For numpy, the "touching all includes" should be obsolete because of the changes to tarball extraction.

@jdemeyer
Copy link

comment:8

--root implies --single-version-externally-managed:

    def finalize_options(self):
        orig.install.finalize_options(self)
        if self.root:
            self.single_version_externally_managed = True
        elif self.single_version_externally_managed:
            if not self.root and not self.record:
                raise DistutilsArgError(
                    "You must specify --record or --root when building system"
                    " packages"
                )

Maybe you want to keep --single-version-externally-managed for clarity, but there is no need to.

@jdemeyer
Copy link

Reviewer: Jeroen Demeyer

@jdemeyer
Copy link

comment:10

If you're changing pip anyway, would it make sense to upgrade to 9.0.3 while you're at it?

https://pypi.python.org/pypi/pip

@embray
Copy link
Contributor Author

embray commented Mar 29, 2018

comment:11

Replying to @jdemeyer:

For numpy, the "touching all includes" should be obsolete because of the changes to tarball extraction.

+1

Replying to @jdemeyer:

--root implies --single-version-externally-managed

What I'm not sure about here (I haven't tried it) is if --root="" (e.g. if $SAGE_DESTDIR) were empty. What I do know in that case is that if defaults /, but I don't know if it still automatically implies --single-version-blah. I'd say it should but I don't know. I think it's fine just to keep it.

Replying to @jdemeyer:

If you're changing pip anyway, would it make sense to upgrade to 9.0.3 while you're at it?

Yeah, the thought did cross my mind. Might as well.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 29, 2018

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

8530130this stuff should not be necessary any longer since #24567 fixed all files extracted from spkg tarballs to have the timestamp of their extraction time
683a51eupgrade pip to 9.0.3

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 29, 2018

Changed commit from daaab8f to 683a51e

@embray
Copy link
Contributor Author

embray commented Mar 29, 2018

New commits:

8530130this stuff should not be necessary any longer since #24567 fixed all files extracted from spkg tarballs to have the timestamp of their extraction time
683a51eupgrade pip to 9.0.3

@embray

This comment has been minimized.

@embray embray changed the title Add DESTDIR support to additional Python packages Add DESTDIR support to additional Python packages; upgrade pip to latest patch release Mar 29, 2018
@jdemeyer
Copy link

comment:14

Testing...

@jdemeyer
Copy link

jdemeyer commented Apr 6, 2018

comment:16

I'm instead dealing with cysignals in #25092.

@jdemeyer
Copy link

jdemeyer commented Apr 6, 2018

@jdemeyer
Copy link

jdemeyer commented Apr 6, 2018

Changed commit from 683a51e to 5bdfd4e

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link

jdemeyer commented Apr 6, 2018

New commits:

6bed447Update additional Python packages with DESTDIR support.
c5ab0bbthis stuff should not be necessary any longer since #24567 fixed all files extracted from spkg tarballs to have the timestamp of their extraction time
5bdfd4eupgrade pip to 9.0.3

@slel
Copy link
Member

slel commented Apr 13, 2018

comment:19

Making this ticket a blocker: after PyPI disabled TLSv1 in early April 2018,
one can no longer pip-install anything with pip < 9.0.3 under macOS < 10.13.
For more detail on this, see

@vbraun
Copy link
Member

vbraun commented Apr 13, 2018

comment:20

Have you actually verified this? We don't use system python...

@embray
Copy link
Contributor Author

embray commented Apr 16, 2018

comment:21

This doesn't have anything to do with the system Python. It has to do with the server settings on PyPI itself, and hence how pip connects to it. I was aware of this issue myself but I didn't really think about it in terms of Sage.

Anyways, one can also manually download a tarball from PyPI and install it with pip.

@slel
Copy link
Member

slel commented Apr 16, 2018

comment:22

Replying to @vbraun:

Have you actually verified this? We don't use system python...

Without this ticket, on macOS 10.10.5, since ~10 April 2018,
trying sage --pip install jupyterlab resulted in an error.

After applying this ticket, it became possible again.

@vbraun
Copy link
Member

vbraun commented Apr 16, 2018

Changed branch from u/jdemeyer/build/destdir-python-misc to 5bdfd4e

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

5 participants