This repository was archived by the owner on Aug 7, 2023. It is now read-only.
forked from smihica/pyminizip
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
89 lines (71 loc) · 2.71 KB
/
Copy pathsetup.py
File metadata and controls
89 lines (71 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# -*- coding: utf-8 -*-
import sys
from setuptools import setup, Extension
SOURCES = ['src/py_minizip.c', 'src/zip.c', 'src/ioapi.c',
'zlib123/adler32.c', 'zlib123/compress.c', 'zlib123/crc32.c', 'zlib123/deflate.c',
'zlib123/gzio.c', 'zlib123/infback.c', 'zlib123/inffast.c', 'zlib123/inflate.c',
'zlib123/inftrees.c', 'zlib123/trees.c', 'zlib123/uncompr.c', 'zlib123/zutil.c']
if 'win32' in sys.platform:
SOURCES.append('src/iowin32.c')
setup(
name = 'pyminizip',
version = '0.2.1',
description = 'A minizip wrapper - To create a password encrypted zip file in python.',
author='Shin Aoyama',
author_email = "smihica@gmail.com",
url = "https://github.com/smihica/pyminizip",
download_url = "",
keywords = ["zip", "file", "compress", "password", "encryption"],
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Development Status :: 3 - Alpha",
"Environment :: Other Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: zlib/libpng License",
"Operating System :: OS Independent",
"Topic :: System :: Archiving :: Compression",
"Topic :: Software Development :: Libraries :: Python Modules",
],
ext_modules=[
Extension(name="pyminizip",
sources=SOURCES,
include_dirs=['src','zlib123'],
)
],
long_description = """\
To create a password encrypted zip file in python.
And the zip file is able to extract in WINDOWS.
This is a simple Minizip wrapper of python.
(http://www.winimage.com/zLibDll/minizip.html)
This software uses zlib.
License: zlib/libpng License.
install zlib
linux:
$ sudo apt-get install zlib
mac:
$ sudo port install zlib
install pyminizip
$ pip install pyminizip
----------------------------------------------------------------------------
Provides two functions.
==============================
pyminizip.compress("/srcfile/path.txt", "/distfile/path.zip", "password", int(compress_level))
Args:
1. src file path (string)
2. dst file path (string)
3. password (string) or None (to create no-password zip)
4. compress_level(int) between 1 to 9, 1 (more fast) <---> 9 (more compress) or 0 (default)
Return value:
- always returns None
pyminizip.compress_multiple([u'pyminizip.so', 'file2.txt'], "file.zip", "1233", 4)
Args:
1. src file LIST path (list)
2. dst file path (string)
3. password (string) or None (to create no-password zip)
4. compress_level(int) between 1 to 9, 1 (more fast) <---> 9 (more compress)
Return value:
- always returns None
==============================
""",
)