#27300 closed defect (invalid)

Pip package: installation order of pip2 vs. pip3 should depend on SAGE_PYTHON3

Reported by: jhpalmieri Owned by:
Priority: minor Milestone: sage-duplicate/invalid/wontfix
Component: python3 Keywords: python3
Cc: chapoton Merged in:
Authors: John Palmieri Reviewers:
Report Upstream: N/A Work issues:
Branch: u/jhpalmieri/pip (Commits) Commit: 18cfb2ea8f3e5aad0bac8561361a50f8a4f4412d
Dependencies: Stopgaps:

Description

The file spkg-install for the pip package says

# Install pip3 first so pip2 overwrites local/bin/pip
for vers in 3 2; do
    python${vers} -m pip install --verbose --no-index --ignore-installed \
            --no-build-isolation --isolated --root="$SAGE_DESTDIR" . || \
        sdh_die "Error building / installing pip${vers}"
done

But really the order should depend on whether SAGE_PYTHON3 is "YES", because then the Python 3 version should overwrite the Python 2 version. The current situation causes a doctest failure in misc/package.py, in particular in the function pip_installed_packages.

Change History (9)

comment:1 Changed 12 months ago by jhpalmieri

  • Branch set to u/jhpalmieri/pip

comment:2 Changed 12 months ago by jhpalmieri

  • Cc chapoton added
  • Commit set to 18cfb2ea8f3e5aad0bac8561361a50f8a4f4412d
  • Status changed from new to needs_review

New commits:

18cfb2etrac 27300: when SAGE_PYTHON3=yes, install pip3 after pip2.

comment:3 Changed 12 months ago by jhpalmieri

  • Keywords python3 added

comment:4 Changed 12 months ago by chapoton

related to #27001 ?

comment:5 Changed 12 months ago by jhpalmieri

It's related, but it's solving a different problem. Each could be merged independently, although they both fix the same doctests.

comment:6 Changed 12 months ago by jhpalmieri

Oh, and thanks for pointing out #27001.

comment:7 Changed 12 months ago by jdemeyer

Because of PEP 394, I disagree with the premise of this ticket.

comment:8 Changed 12 months ago by jhpalmieri

  • Milestone changed from sage-8.7 to sage-duplicate/invalid/wontfix
  • Status changed from needs_review to positive_review

That doesn't refer to pip, but you may have a point. We can close this and focus on #27001 instead.

comment:9 Changed 12 months ago by embray

  • Resolution set to invalid
  • Status changed from positive_review to closed

Presuming these are all correctly reviewed as either duplicate, invalid, or wontfix.

Note: See TracTickets for help on using tickets.