#13 Use wheels from ensurepip/_bundled dir if it is there
Merged 4 years ago by churchyard. Opened 4 years ago by churchyard.
rpms/ churchyard/python-virtualenv py34-patch  into  master

file modified
+5 -1
@@ -1,6 +1,6 @@ 

  Name:           python-virtualenv

  Version:        16.7.3

- Release:        1%{?dist}

+ Release:        2%{?dist}

  Summary:        Tool to create isolated Python environments

  

  License:        MIT
@@ -140,6 +140,10 @@ 

  

  

  %changelog

+ * Tue Sep 03 2019 Miro Hrončok <mhroncok@redhat.com> - 16.7.3-2

+ - Prefer wheels bundled in Python's ensurepip module over the RPM built ones

+ - This allows continuing support for Python 3.4 in Fedora 32+

+ 

  * Wed Aug 21 2019 Charalampos Stratakis <cstratak@redhat.com> - 16.7.3-1

  - Update to 16.7.3 (#1742034)

  

file modified
+12 -4
@@ -1,16 +1,24 @@ 

  diff --git a/virtualenv.py b/virtualenv.py

- index 3ccbed6..504efc8 100755

+ index 8f05739..cd10e9f 100755

  --- a/virtualenv.py

  +++ b/virtualenv.py

- @@ -473,7 +473,10 @@ def virtualenv_support_dirs():

+ @@ -476,7 +476,18 @@ def virtualenv_support_dirs():

   

       # normal filesystem installation

       if os.path.isdir(join(HERE, "virtualenv_support")):

  -        yield [join(HERE, "virtualenv_support")]

+ +        dirs = [join(HERE, "virtualenv_support")]

  +        if os.path.isdir("/usr/share/python-wheels"):

- +            yield ["/usr/share/python-wheels", join(HERE, "virtualenv_support")]

+ +            dirs.insert(0, "/usr/share/python-wheels")

+ +        try:

+ +            import ensurepip

+ +            ensurepip_path = os.path.join(ensurepip.__path__[0], "_bundled")

+ +        except (ImportError, AttributeError, IndexError):

+ +            pass

  +        else:

- +            yield [join(HERE, "virtualenv_support")]

+ +            if os.path.isdir(ensurepip_path):

+ +                dirs.insert(0, ensurepip_path)

+ +        yield dirs

       elif IS_ZIPAPP:

           tmpdir = tempfile.mkdtemp()

           try:

file modified
+6 -1
@@ -14,6 +14,9 @@ 

      - smoke34:

          dir: python/smoke

          run: VERSION=3.4 METHOD=virtualenv ./venv.sh

+     - smoke34nd:

+         dir: python/smoke

+         run: VERSION=3.4 METHOD=virtualenv-no-download ./venv.sh

      - smoke35:

          dir: python/smoke

          run: VERSION=3.5 METHOD=virtualenv ./venv.sh
@@ -26,6 +29,9 @@ 

      - smoke38:

          dir: python/smoke

          run: VERSION=3.8 METHOD=virtualenv ./venv.sh

+     - smoke38nd:

+         dir: python/smoke

+         run: VERSION=3.8 METHOD=virtualenv-no-download ./venv.sh

      required_packages:

      - gcc

      - virtualenv
@@ -35,6 +41,5 @@ 

      - python36

      - python37

      - python38

-     - python2-devel

      - python3-devel

      - python3-tox

This allows virtualenv to install pip < 19.2 on Python 3.4 once we update pip.

Please review and test carefully. Note that pip was not updated yet, so this seem to behave as it used to.

What I've tested so far:
https://etherpad.gnome.org/p/testing-virtualenv-python34

I didn't find any differences between the new updates and the old state.

Before the updates:

$ rpm -qa | sort | grep 'python3-3.\|python34\|python36\|pip\|python3-virtualenv'
python-pip-wheel-19.1.1-7.fc32.noarch
python3-3.8.0~b3-4.fc32.x86_64
python3-virtualenv-16.6.1-3.fc32.noarch
python34-3.4.10-4.fc31.x86_64
python36-3.6.9-2.fc31.x86_64

With the updates:

$ rpm -qa | sort | grep 'python3-3.\|python34\|python36\|pip\|python3-virtualenv'
python-pip-wheel-19.2.3-1.fc32.noarch
python3-3.8.0~b3-4.fc32.x86_64
python3-virtualenv-16.7.3-2.fc32.noarch
python34-3.4.10-5.fc32.x86_64
python36-3.6.9-2.fc31.x86_64

I've amended the patch to make ti more readable.

<mock-chroot> bash-5.0$ rpm -qa | sort | grep 'python3-3.\|python34\|python35\|pip\|python3-virtualenv'
python-pip-wheel-19.2.3-1.fc32.noarch
python3-3.8.0~b4-1.fc32.x86_64
python3-virtualenv-16.7.3-2.fc32.noarch
python34-3.4.10-5.fc32.x86_64
python35-3.5.7-4.fc31.x86_64

<mock-chroot> bash-5.0$ virtualenv -p python3.4 v-py34
Running virtualenv with interpreter /usr/bin/python3.4
Already using interpreter /usr/bin/python3.4
Using base prefix '/usr'
New python executable in /builddir/v-py34/bin/python3.4
Also creating executable in /builddir/v-py34/bin/python
Command /builddir/v-py34/bin/python3.4 -m pip config list had error code 1
Installing setuptools, pip<19.2, wheel...
done.

<mock-chroot> bash-5.0$ v-py34/bin/pip --version
pip 19.1.1 from /builddir/v-py34/lib/python3.4/site-packages/pip (python 3.4)

<mock-chroot> bash-5.0$ virtualenv -p python3.4 v-py34b --no-download
Running virtualenv with interpreter /usr/bin/python3.4
Already using interpreter /usr/bin/python3.4
Using base prefix '/usr'
New python executable in /builddir/v-py34b/bin/python3.4
Also creating executable in /builddir/v-py34b/bin/python
Command /builddir/v-py34b/bin/python3.4 -m pip config list had error code 1
Installing setuptools, pip<19.2, wheel...
done.

<mock-chroot> bash-5.0$ v-py34b/bin/pip --version
pip 9.0.1 from /builddir/v-py34b/lib/python3.4/site-packages (python 3.4)

<mock-chroot> bash-5.0$ virtualenv -p python3.5 v-py35
Running virtualenv with interpreter /usr/bin/python3.5
Already using interpreter /usr/bin/python3.5
Using base prefix '/usr'
New python executable in /builddir/v-py35/bin/python3.5
Also creating executable in /builddir/v-py35/bin/python
Installing setuptools, pip, wheel...
done.

<mock-chroot> bash-5.0$ virtualenv -p python3.5 v-py35b --no-download
Running virtualenv with interpreter /usr/bin/python3.5
Already using interpreter /usr/bin/python3.5
Using base prefix '/usr'
New python executable in /builddir/v-py35b/bin/python3.5
Also creating executable in /builddir/v-py35b/bin/python
Installing setuptools, pip, wheel...
done.

<mock-chroot> bash-5.0$ v-py35/bin/pip --version
pip 19.2.3 from /builddir/v-py35/lib/python3.5/site-packages/pip (python 3.5)

<mock-chroot> bash-5.0$ v-py35b/bin/pip --version
pip 19.2.3 from /builddir/v-py35b/lib/python3.5/site-packages/pip (python 3.5)

rebased onto e70801e

4 years ago

The new patch looks much better, LGTM.

1 new commit added

  • Update the Fedora CI matrix
4 years ago

2 new commits added

  • Update the Fedora CI matrix
  • Use wheels from ensurepip/_bundled dir if it is there
4 years ago

I've noticed several CI jobs shared a name and hence redefined themselves. I've updated the names and I intent to merge this if the CI passes and has all the jobs.

Pull-Request has been merged by churchyard

4 years ago