File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 1
1
import sys
2
+ import gc
2
3
import uos as os
3
4
import uerrno as errno
4
5
import ujson as json
5
6
import uzlib
6
7
import upip_utarfile as tarfile
8
+ gc .collect ()
7
9
8
10
9
11
debug = False
@@ -148,6 +150,8 @@ def install_pkg(pkg_spec, install_path):
148
150
149
151
latest_ver = data ["info" ]["version" ]
150
152
packages = data ["releases" ][latest_ver ]
153
+ del data
154
+ gc .collect ()
151
155
assert len (packages ) == 1
152
156
package_url = packages [0 ]["url" ]
153
157
print ("Installing %s %s from %s" % (pkg_spec , latest_ver , package_url ))
@@ -157,6 +161,9 @@ def install_pkg(pkg_spec, install_path):
157
161
f3 = tarfile .TarFile (fileobj = f2 )
158
162
meta = install_tar (f3 , install_path )
159
163
f1 .close ()
164
+ del f3
165
+ del f2
166
+ gc .collect ()
160
167
return meta
161
168
162
169
def install (to_install , install_path = None ):
You can’t perform that action at this time.
0 commit comments