File tree 3 files changed +36
-0
lines changed
3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ import sys
2
+ import os
3
+ import shutil
4
+ import utarfile
5
+
6
+ t = utarfile .TarFile (sys .argv [1 ])
7
+ for i in t :
8
+ print (i )
9
+ if i .type == utarfile .DIRTYPE :
10
+ os .makedirs (i .name )
11
+ else :
12
+ f = t .extractfile (i )
13
+ shutil .copyfileobj (f , open (i .name , "wb" ))
Original file line number Diff line number Diff line change
1
+ srctype = micropython-lib
2
+ type = module
3
+ version = 0.1
4
+ author = Paul Sokolovsky
5
+ long_desc = Lightweight tarfile module subset
Original file line number Diff line number Diff line change
1
+ import sys
2
+ # Remove current dir from sys.path, otherwise setuptools will peek up our
3
+ # module instead of system.
4
+ sys .path .pop (0 )
5
+ from setuptools import setup
6
+
7
+
8
+ setup (name = 'micropython-utarfile' ,
9
+ version = '0.1' ,
10
+ description = 'utarfile module for MicroPython' ,
11
+ long_description = 'Lightweight tarfile module subset' ,
12
+ url = 'https://github.com/micropython/micropython/issues/405' ,
13
+ author = 'Paul Sokolovsky' ,
14
+ author_email = 'micro-python@googlegroups.com' ,
15
+ maintainer = 'MicroPython Developers' ,
16
+ maintainer_email = 'micro-python@googlegroups.com' ,
17
+ license = 'MIT' ,
18
+ py_modules = ['utarfile' ])
You can’t perform that action at this time.
0 commit comments