utarfile: Metadata and example.

pull/20/merge
Paul Sokolovsky 2015-02-02 20:20:23 +02:00
rodzic b85a24693b
commit 94b2afdf8b
3 zmienionych plików z 36 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,13 @@
import sys
import os
import shutil
import utarfile
t = utarfile.TarFile(sys.argv[1])
for i in t:
print(i)
if i.type == utarfile.DIRTYPE:
os.makedirs(i.name)
else:
f = t.extractfile(i)
shutil.copyfileobj(f, open(i.name, "wb"))

Wyświetl plik

@ -0,0 +1,5 @@
srctype = micropython-lib
type = module
version = 0.1
author = Paul Sokolovsky
long_desc = Lightweight tarfile module subset

18
utarfile/setup.py 100644
Wyświetl plik

@ -0,0 +1,18 @@
import sys
# Remove current dir from sys.path, otherwise setuptools will peek up our
# module instead of system.
sys.path.pop(0)
from setuptools import setup
setup(name='micropython-utarfile',
version='0.1',
description='utarfile module for MicroPython',
long_description='Lightweight tarfile module subset',
url='https://github.com/micropython/micropython/issues/405',
author='Paul Sokolovsky',
author_email='micro-python@googlegroups.com',
maintainer='MicroPython Developers',
maintainer_email='micro-python@googlegroups.com',
license='MIT',
py_modules=['utarfile'])