• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

コミットメタ情報

リビジョン1e4d8b31be35e54b6429fea54f5ecaa0083f91e7 (tree)
日時2022-01-22 06:01:09
作者John Snow <jsnow@redh...>
コミッターJohn Snow

ログメッセージ

python: pin setuptools below v60.0.0

setuptools is a package that replaces the python stdlib 'distutils'. It
is generally installed by all venv-creating tools "by default". It isn't
actually needed at runtime for the qemu package, so our own setup.cfg
does not mention it as a dependency.

However, tox will create virtual environments that include it, and will
upgrade it to the very latest version. the 'venv' tool will also include
whichever version your host system happens to have.

Unfortunately, setuptools version 60.0.0 and above include a hack to
forcibly overwrite python's built-in distutils. The pylint tool that we
use to run code analysis checks on this package relies on distutils and
suffers regressions when setuptools >= 60.0.0 is present at all, see
https://github.com/PyCQA/pylint/issues/5704

Instruct tox and the 'check-dev' targets to avoid setuptools packages
that are too new, for now. Pipenv is unaffected, because setuptools 60
does not offer Python 3.6 support, and our pipenv config is pinned
against Python 3.6.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
Message-id: 20220121005221.142236-1-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>

変更サマリ

差分

--- a/python/Makefile
+++ b/python/Makefile
@@ -68,6 +68,8 @@ $(QEMU_VENV_DIR) $(QEMU_VENV_DIR)/bin/activate: setup.cfg
6868 echo "ACTIVATE $(QEMU_VENV_DIR)"; \
6969 . $(QEMU_VENV_DIR)/bin/activate; \
7070 echo "INSTALL qemu[devel] $(QEMU_VENV_DIR)"; \
71+ pip install --disable-pip-version-check \
72+ "setuptools<60.0.0" 1>/dev/null; \
7173 make develop 1>/dev/null; \
7274 )
7375 @touch $(QEMU_VENV_DIR)
--- a/python/setup.cfg
+++ b/python/setup.cfg
@@ -163,6 +163,7 @@ deps =
163163 .[devel]
164164 .[fuse] # Workaround to trigger tox venv rebuild
165165 .[tui] # Workaround to trigger tox venv rebuild
166+ setuptools < 60 # Workaround, please see commit msg.
166167 commands =
167168 make check
168169