You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ue4cli still depends on package outside of vanilla python and cannot be run directly from source without it:
$ python ~/ue4cli
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/korn/ue4cli/__main__.py", line 1, in <module>
from ue4cli.cli import main
File "/home/korn/ue4cli/ue4cli/cli.py", line 2, in <module>
from .PluginManager import PluginManager
File "/home/korn/ue4cli/ue4cli/PluginManager.py", line 2, in <module>
import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'
For now, I only spotted pkg_resources (provided by setuptools) which is used in two places:
First one is tricky, we have to use it for loading ue4cli-plugins which is invoked in ue4cli/cli.py.
Second one should be fairly easy to replace (I hope).
TODO:
I gotta make sure there is no more dependencies like this one and find good workaround for this.
Perhaps we can try; import pkg_resources: and load ue4cli-plugins only if said dependency is resolved.
Either way, I'll probably take this one :)
The text was updated successfully, but these errors were encountered:
Potential fix for 1.
This already makes it work on Windows and Linux
diff --git a/ue4cli/PluginManager.py b/ue4cli/PluginManager.py
index e157394..8df7b13 100644
--- a/ue4cli/PluginManager.py+++ b/ue4cli/PluginManager.py@@ -1,5 +1,14 @@
from inspect import signature
-import pkg_resources+from .Utility import Utility++# HACK: dummy iter_entry_points in case package 'setuptools' hasn't been provided+try:+ from pkg_resources import iter_entry_points+except ModuleNotFoundError as e:+ Utility.printStderr(f'Warning: ue4cli plugins are unavailable due to: {str(e)}')+ def iter_entry_points(unused):+ return {}+
class PluginManager:
"""
@@ -16,7 +25,7 @@ class PluginManager:
plugins = {
entry_point.name: entry_point.load()
for entry_point
- in pkg_resources.iter_entry_points('ue4cli.plugins')+ in iter_entry_points('ue4cli.plugins')
}
# Filter out any invalid plugins
Looks like I missed this one during #59
ue4cli still depends on package outside of vanilla python and cannot be run directly from source without it:
For now, I only spotted
pkg_resources
(provided bysetuptools
) which is used in two places:pkg_resources.iter_entry_points
ue4cli/ue4cli/PluginManager.py
Lines 15 to 20 in fed71c1
pkg_resources.parse_version
ue4cli/ue4cli/UnrealManagerDarwin.py
Lines 35 to 47 in fed71c1
First one is tricky, we have to use it for loading ue4cli-plugins which is invoked in
ue4cli/cli.py
.Second one should be fairly easy to replace (I hope).
TODO:
I gotta make sure there is no more dependencies like this one and find good workaround for this.
Perhaps we can
try; import pkg_resources:
and load ue4cli-plugins only if said dependency is resolved.Either way, I'll probably take this one :)
The text was updated successfully, but these errors were encountered: