Skip to content

Commit 761fe88

Browse files
committed
Set PYTHONUSERBASE to a private directory
This allows us to easily install any modules we want without conflicting with the host which may contain broken native modules.
1 parent cf0d011 commit 761fe88

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

io.atom.Atom.json

+15-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@
4343

4444
"desktop-file-edit --set-key=Exec --set-value='atom %F' /app/share/applications/atom.desktop",
4545

46-
"install -Dm644 io.atom.Atom.appdata.xml /app/share/appdata/io.atom.Atom.appdata.xml"
46+
"install -Dm644 io.atom.Atom.appdata.xml /app/share/appdata/io.atom.Atom.appdata.xml",
47+
48+
"install pip3 /app/bin"
4749
],
4850
"cleanup": [
4951
"/share/lintian",
@@ -70,7 +72,18 @@
7072
"type": "script",
7173
"dest-filename": "apm",
7274
"commands": [
73-
"exec env ATOM_HOME=\"$XDG_DATA_HOME\" /app/bin/apm-real \"$@\""
75+
"export ATOM_HOME=\"$XDG_DATA_HOME\"",
76+
"export PYTHONUSERBASE=\"$XDG_DATA_HOME/python\"",
77+
"export PATH=\"$XDG_DATA_HOME/python/bin\":$PATH",
78+
"exec /app/bin/apm-real \"$@\""
79+
]
80+
},
81+
{
82+
"type": "script",
83+
"dest-filename": "pip3",
84+
"commands": [
85+
"export PYTHONUSERBASE=\"$XDG_DATA_HOME/python\"",
86+
"exec /usr/bin/pip3 \"$@\""
7487
]
7588
}
7689
],

0 commit comments

Comments
 (0)