Skip to content

Commit

Permalink
plover.plugins-manager: add patch back in
Browse files Browse the repository at this point in the history
without it:
Error while finding module specification for 'plover_plugins_manager.pip_wrapper'
  (ModuleNotFoundError: No module named 'plover_plugins_manager')
  • Loading branch information
evils committed Apr 22, 2021
1 parent 98e65e3 commit 125ef20
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/applications/misc/plover/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ rec {
sha256 = "sha256-7OyGmSwOvoqwbBgXdfUUmwvjszUNRPlD4XyBeJ29vBg=";
};

patches = [ ./plugins_manager.patch ];

buildInputs = [
# plover.dev
dev
Expand Down
22 changes: 22 additions & 0 deletions pkgs/applications/misc/plover/plugins_manager.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/plover_plugins_manager/__main__.py b/plover_plugins_manager/__main__.py
index 9e03097..6204472 100644
--- a/plover_plugins_manager/__main__.py
+++ b/plover_plugins_manager/__main__.py
@@ -42,16 +42,7 @@ def pip(args, stdin=None, stdout=None, stderr=None, **kwargs):
'plover_plugins_manager.pip_wrapper',
'--disable-pip-version-check']
env = dict(os.environ)
- # Make sure user plugins are handled
- # even if user site is not enabled.
- if not running_under_virtualenv() and not site.ENABLE_USER_SITE:
- pypath = env.get('PYTHONPATH')
- if pypath is None:
- pypath = []
- else:
- pypath = pypath.split(os.pathsep)
- pypath.insert(0, site.USER_SITE)
- env['PYTHONPATH'] = os.pathsep.join(pypath)
+ env['PYTHONPATH'] = os.pathsep.join(sys.path + [site.USER_SITE])
command = args.pop(0)
if command == 'check':
cmd.append('check')

0 comments on commit 125ef20

Please sign in to comment.