Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Commit 339802c

Browse files
committed
refactor upypip
now you should import it like this: import upypip as pip
1 parent bdfa609 commit 339802c

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

Content/Scripts/upymodule_importer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import upycmd
1414
import imp
1515
import site
16-
pip = upypip.pip
16+
pip = upypip
1717

1818
#parse upymodule.json from path and install dependencies if missing
1919
def parseJson(packagePath):

Content/Scripts/upypip.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,13 @@ def uninstallAll(self):
7474
t = Thread(target=action, args=('freeze','> unins && pip uninstall -y -r unins && del unins',))
7575
t.start()
7676

77-
pip = PipInstall()
77+
#instance forward declarations
78+
_inst = PipInstall()
79+
80+
list = _inst.list
81+
isInstalled = _inst.isInstalled
82+
install = _inst.install
83+
uninstall = _inst.uninstall
84+
uninstallAll = _inst.uninstallAll
85+
pipModuleAction = _inst.pipModuleAction
86+
listDict = _inst.listDict

Content/Scripts/upystartup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import imp
99
import site
1010

11-
from upypip import pip
11+
import upypip as pip
1212

1313
def checkPipDirectory():
1414
#get our python scripts path

0 commit comments

Comments
 (0)