Skip to content

Possible fix to allow pip install -e . to work seamlessly with newer pip/setuptools versions #4884

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions easybuild/tools/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
import glob
import os
import re
import sys
import importlib

from string import ascii_letters, digits

from easybuild.base import fancylogger
Expand Down Expand Up @@ -132,9 +133,15 @@ def import_available_modules(namespace):
:param namespace: The namespace to import modules from.
"""
modules = []
for path in sys.path:

cand_modpath_glob = os.path.sep.join([path] + namespace.split('.') + ['*.py'])
try:
mod = importlib.import_module(namespace)
except ImportError as err:
raise EasyBuildError("import_available_modules: Failed to import %s: %s", namespace, err)

for path in mod.__path__:

cand_modpath_glob = os.path.sep.join([path] + ['*.py'])

# if sys.path entry being considered is the empty string
# (which corresponds to Python packages/modules in current working directory being considered),
Expand Down