Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
6
Merge Requests
6
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
slapos.buildout
Commits
d08c74fb
Commit
d08c74fb
authored
Apr 06, 2022
by
Godefroid Chapelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: `TypeError: dist must be a Distribution instance`
Solution: workaround pip _distutils_hack
parent
eb3f073f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
3 deletions
+20
-3
.github/workflows/scripts-setuptools-head.yml
.github/workflows/scripts-setuptools-head.yml
+0
-1
.github/workflows/scripts.yml
.github/workflows/scripts.yml
+0
-1
news/600.bugfix
news/600.bugfix
+2
-0
src/zc/buildout/__init__.py
src/zc/buildout/__init__.py
+18
-1
No files found.
.github/workflows/scripts-setuptools-head.yml
View file @
d08c74fb
...
...
@@ -27,7 +27,6 @@ jobs:
env
:
PACKAGE
:
${{matrix.package}}
PYTHON_VERSION
:
${{matrix.python-version}}
SETUPTOOLS_USE_DISTUTILS
:
stdlib
run
:
|
sandbox/bin/buildout -v -c .github/workflows/scripts-${PYTHON_VERSION}.cfg annotate buildout
sandbox/bin/buildout -c .github/workflows/scripts-${PYTHON_VERSION}.cfg
...
...
.github/workflows/scripts.yml
View file @
d08c74fb
...
...
@@ -25,7 +25,6 @@ jobs:
env
:
PACKAGE
:
${{matrix.package}}
PYTHON_VERSION
:
${{matrix.python-version}}
SETUPTOOLS_USE_DISTUTILS
:
stdlib
run
:
|
sandbox/bin/buildout -v -c .github/workflows/scripts-${PYTHON_VERSION}.cfg annotate buildout
sandbox/bin/buildout -c .github/workflows/scripts-${PYTHON_VERSION}.cfg
...
...
news/600.bugfix
0 → 100644
View file @
d08c74fb
Fix `TypeError: dist must be a Distribution instance` due to issue between
`setuptools` and `pip`.
src/zc/buildout/__init__.py
View file @
d08c74fb
...
...
@@ -13,8 +13,25 @@
##############################################################################
"""Buildout package
"""
# do not change the import order
# deleting the spec_for_pip hack needs to be done before importing pip
# see https://github.com/pypa/pip/issues/8761 to understand
# the reason for the hack.
# I think it is reasonable to assume we will not run into the race.
import
setuptools
try
:
from
_distutils_hack
import
DistutilsMetaFinder
if
hasattr
(
DistutilsMetaFinder
,
'spec_for_pip'
):
del
DistutilsMetaFinder
.
spec_for_pip
except
ImportError
:
pass
import
pip
# NOQA
import
sys
import
zc.buildout.patches
# NOQA
import
zc.buildout.patches
# NOQA
WINDOWS
=
sys
.
platform
.
startswith
(
'win'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment