From 95fcb34fb918050ebde55c47c1e41ea8b8dfbbf0 Mon Sep 17 00:00:00 2001 From: Bernat Gabor Date: Tue, 25 Feb 2020 11:20:46 +0000 Subject: [PATCH] add note about issue Signed-off-by: Bernat Gabor --- src/virtualenv/seed/via_app_data/pip_install/base.py | 5 +++-- tox.ini | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/virtualenv/seed/via_app_data/pip_install/base.py b/src/virtualenv/seed/via_app_data/pip_install/base.py index 558e629ff..b27ffd8ba 100644 --- a/src/virtualenv/seed/via_app_data/pip_install/base.py +++ b/src/virtualenv/seed/via_app_data/pip_install/base.py @@ -9,6 +9,8 @@ from tempfile import mkdtemp from threading import Lock +# noinspection PyProtectedMember +from distlib.scripts import ScriptMaker, _enquote_executable from six import PY3, add_metaclass from virtualenv.util import ConfigParser @@ -129,12 +131,11 @@ def _console_scripts(self): def _create_console_entry_point(self, name, value, to_folder, version_info): result = [] - from distlib.scripts import _enquote_executable, ScriptMaker - maker = ScriptMaker(None, str(to_folder)) maker.clobber = True # overwrite maker.variants = {""} maker.set_mode = True # ensure they are executable + # calling private until https://bitbucket.org/pypa/distlib/issues/135/expose-_enquote_executable-as-public maker.executable = _enquote_executable(str(self._creator.exe)) specification = "{} = {}".format(name, value) with self.patch_distlib_correct_variants(version_info, maker): diff --git a/tox.ini b/tox.ini index b7945bdcf..c60574fdf 100644 --- a/tox.ini +++ b/tox.ini @@ -117,7 +117,7 @@ force_grid_wrap = 0 line_length = 120 known_standard_library = ConfigParser known_first_party = virtualenv -known_third_party = _subprocess,appdirs,coverage,docutils,filelock,git,packaging,pytest,setuptools,six,sphinx,sphinx_rtd_theme,sphinxarg +known_third_party = _subprocess,appdirs,coverage,distlib,docutils,filelock,git,packaging,pytest,setuptools,six,sphinx,sphinx_rtd_theme,sphinxarg [flake8] max-complexity = 22