There was an error while loading. Please reload this page.
1 parent e55170c commit 2077584Copy full SHA for 2077584
README.md
@@ -4,6 +4,7 @@ Quickly pack .py module into source distribution.
4
5
* no `setup.py` is needed
6
* resulting `.zip` file is **executable**
7
+ (make sure there is main() function)
8
9
##### Usage
10
pypack.py
@@ -15,6 +15,9 @@
15
Public domain work by:
16
anatoly techtonik <techtonik@gmail.com>
17
"""
18
+
19
+__version__ = '0.1'
20
21
import os
22
import sys
23
@@ -113,7 +116,7 @@ def lookup(match):
113
116
)
114
117
115
118
-if __name__ == '__main__':
119
+def main():
120
if not sys.argv[1:]:
121
sys.exit("usage: pack.py <module.py>")
122
@@ -147,3 +150,5 @@ def lookup(match):
147
150
zf.writestr('PKG-INFO', '')
148
151
zf.close()
149
152
153
+if __name__ == '__main__':
154
+ main()
0 commit comments