#16 Fedora 31: Update to 16.6.2
Merged 4 years ago by churchyard. Opened 4 years ago by churchyard.
rpms/ churchyard/python-virtualenv f31-16.6.2  into  f31

file modified
+4 -7
@@ -1,7 +1,4 @@ 

- /virtualenv-13.1.2.tar.gz

- /virtualenv-14.0.6.tar.gz

- /virtualenv-15.0.3.tar.gz

- noarch

- /virtualenv-15.1.0.tar.gz

- /virtualenv-16.0.0.tar.gz

- /virtualenv-16.6.1.tar.gz

+ /virtualenv-*.tar.gz

+ /virtualenv-*/

+ /results_python-virtualenv/

+ *.rpm

@@ -0,0 +1,33 @@ 

+ From 47ff9b6e128131fda5752232d55924eff7338bf6 Mon Sep 17 00:00:00 2001

+ From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>

+ Date: Mon, 24 Feb 2020 18:54:54 +0100

+ Subject: [PATCH] Remove a leftover error line with empty exception info

+  (#1659)

+ 

+ Since a6d6ed791d94c39b7348192503866aff6a0ba458 there is no exception to report about.

+ 

+ Related to https://github.com/pypa/virtualenv/pull/1651

+ ---

+  docs/changelog/1651.bugfix.rst | 2 +-

+  virtualenv.py                  | 1 -

+  2 files changed, 1 insertion(+), 2 deletions(-)

+ 

+ diff --git a/docs/changelog/1651.bugfix.rst b/docs/changelog/1651.bugfix.rst

+ index 26dd9c6ac..b3cc556a3 100644

+ --- a/docs/changelog/1651.bugfix.rst

+ +++ b/docs/changelog/1651.bugfix.rst

+ @@ -1 +1 @@

+ -fix error printing in bailout for Python < 2.7 - by ``AdamWill`

+ +fix error printing in bailout for Python < 2.7 - by ``AdamWill` and ``hroncok``

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

+ index 5968059b2..ba4bd2c28 100755

+ --- a/virtualenv.py

+ +++ b/virtualenv.py

+ @@ -50,7 +50,6 @@

+  virtualenv_version = __version__  # legacy

+  DEBUG = os.environ.get("_VIRTUALENV_DEBUG", None) == "1"

+  if sys.version_info < (2, 7):

+ -    print("ERROR: {0}".format(sys.exc_info()[1]))

+      print("ERROR: this script requires Python 2.7 or greater.")

+      sys.exit(101)

+  

@@ -0,0 +1,40 @@ 

+ From 4955ebd4e8bfb01be582cdd7c0e9eb4155488ea6 Mon Sep 17 00:00:00 2001

+ From: Adam Williamson <adamw@happyassassin.net>

+ Date: Sat, 22 Feb 2020 04:53:46 -0800

+ Subject: [PATCH] Fix error printing in bailout for Python < 2.7 (#1651)

+ 

+ Ironically, the code that tries to print an error message when

+ we're running on Python < 2.7 can only work on Python 2.7 or

+ higher! Prior to 2.7, the curly-braces style of string formatting

+ required all fields to be explicitly numbered; you have to use

+ {0}, you cannot use {}. So if you actually try to run virtualenv

+ on Python 2.6, you get an error when trying to print the error!

+ This should fix that, and print the right error...

+ 

+ Signed-off-by: Adam Williamson <awilliam@redhat.com>

+ ---

+  docs/changelog/1651.bugfix.rst | 1 +

+  virtualenv.py                  | 2 +-

+  2 files changed, 2 insertions(+), 1 deletion(-)

+  create mode 100644 docs/changelog/1651.bugfix.rst

+ 

+ diff --git a/docs/changelog/1651.bugfix.rst b/docs/changelog/1651.bugfix.rst

+ new file mode 100644

+ index 000000000..26dd9c6ac

+ --- /dev/null

+ +++ b/docs/changelog/1651.bugfix.rst

+ @@ -0,0 +1 @@

+ +fix error printing in bailout for Python < 2.7 - by ``AdamWill`

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

+ index 000d50a99..5968059b2 100755

+ --- a/virtualenv.py

+ +++ b/virtualenv.py

+ @@ -50,7 +50,7 @@

+  virtualenv_version = __version__  # legacy

+  DEBUG = os.environ.get("_VIRTUALENV_DEBUG", None) == "1"

+  if sys.version_info < (2, 7):

+ -    print("ERROR: {}".format(sys.exc_info()[1]))

+ +    print("ERROR: {0}".format(sys.exc_info()[1]))

+      print("ERROR: this script requires Python 2.7 or greater.")

+      sys.exit(101)

+  

file removed
-37
@@ -1,37 +0,0 @@ 

- From 01e27bd7a6ddde4db6654ab2f18def36dab64329 Mon Sep 17 00:00:00 2001

- From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>

- Date: Fri, 12 Jul 2019 11:58:32 +0200

- Subject: [PATCH] Also search the LICENSE file in lib64/pythonX.Y

- 

- Several Linux distributions including Gentoo, Fedora, openSUSE

- put things in lib64/pythonX.Y instead of lib/pythonX.Y on 64bit

- architectures (x86_64, aarch64, etc.).

- 

- This was already respected via the fix_lib64() function, however

- when virtualenv was searching for Python LICENSE, it was not.

- 

- Now is the lib64/pythonX.Y patch searched as well and unlike fix_lib64()

- no checks need to be made, as the patch are tested in sequence.

- 

- See https://github.com/pypa/virtualenv/issues/1352#issuecomment-510500384

- ---

-  virtualenv.py | 3 +++

-  1 file changed, 3 insertions(+)

- 

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

- index 3ccbed6d..d4d5d304 100755

- --- a/virtualenv.py

- +++ b/virtualenv.py

- @@ -1333,9 +1333,12 @@ def copy_required_files(src_dir, lib_dir, symlink):

-  

-  def copy_license(prefix, dst_prefix, lib_dir, symlink):

-      """Copy the license file so `license()` builtin works"""

- +    lib64_dir = lib_dir.replace("lib", "lib64")

-      for license_path in (

-          # posix cpython

-          os.path.join(prefix, os.path.relpath(lib_dir, dst_prefix), "LICENSE.txt"),

- +        # posix cpython installed in /usr/lib64

- +        os.path.join(prefix, os.path.relpath(lib64_dir, dst_prefix), "LICENSE.txt"),

-          # windows cpython

-          os.path.join(prefix, "LICENSE.txt"),

-          # pypy

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

  Name:           python-virtualenv

- Version:        16.6.1

- Release:        2%{?dist}

+ Version:        16.6.2

+ Release:        1%{?dist}

  Summary:        Tool to create isolated Python environments

  

  License:        MIT
@@ -10,9 +10,11 @@ 

  # Add /usr/share/python-wheels to file_search_dirs

  Patch1: rpm-wheels.patch

  

- # Fix search patch for the Python LICENSE file on 64bit systems

- # Proposed upstream: https://github.com/pypa/virtualenv/pull/1382

- Patch2: lib64-license.patch

+ # Backports:

+ # Fix error printing in bailout for Python < 2.7

+ # https://github.com/pypa/virtualenv/pull/1651 + https://github.com/pypa/virtualenv/pull/1659

+ Patch2:         https://github.com/pypa/virtualenv/commit/4955ebd4e8bfb01be582cdd7c0e9eb4155488ea6.patch

+ Patch3:         https://github.com/pypa/virtualenv/commit/47ff9b6e128131fda5752232d55924eff7338bf6.patch

  

  BuildArch:      noarch

  BuildRequires:  git-core
@@ -144,6 +146,10 @@ 

  

  

  %changelog

+ * Mon Feb 24 2020 Miro Hrončok <mhroncok@redhat.com> - 16.6.2-1

+ - Update to 16.6.2

+ - Fix error printing in bailout for Python < 2.7

+ 

  * Mon Jul 29 2019 Miro Hrončok <mhroncok@redhat.com> - 16.6.1-2

  - Drop python2-virtualenv

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (virtualenv-16.6.1.tar.gz) = 6253f44401471b6af09b38cbb3919fc35070e3168d5381c384011028e75e2ded6d13dc86304eb97b13c302ac917396727e4a6f6d0c98aa9eea885391af760620

+ SHA512 (virtualenv-16.6.2.tar.gz) = 21074b969b25d4ca3035159dd48f7f08d897bab991ee7d2d99423cb6988742282f66266e71731b7ae40c0b065d84c918432b863964064aef6f34eda0a993b604

  • Fix error printing in bailout for Python < 2.7

rebased onto bae9067

4 years ago
[tmp]$ rpm -q python3-virtualenv
python3-virtualenv-16.6.1-2.fc31.noarch
[tmp]$ virtualenv -p python2.6 __venv26__
Running virtualenv with interpreter /usr/bin/python2.6
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/virtualenv.py", line 51, in <module>
    print("ERROR: {}".format(sys.exc_info()[1]))
ValueError: zero length field name in format

[tmp]$ dnf update ...
[tmp]$ rpm -q python3-virtualenv
python3-virtualenv-16.6.2-1.fc31.noarch
[tmp]$ virtualenv -p python2.6 __venv26__
Running virtualenv with interpreter /usr/bin/python2.6
ERROR: this script requires Python 2.7 or greater.

Pull-Request has been merged by churchyard

4 years ago