|
9 | 9 | * [x] name, version |
10 | 10 | * [x] author |
11 | 11 | * [x] license |
12 | | - * [ ] url |
13 | | - * [ ] description (first line of module docstring) |
| 12 | + * [x] url |
| 13 | + * [x] description (first line of module docstring) |
14 | 14 |
|
15 | 15 | Public domain work by: |
16 | 16 | anatoly techtonik <techtonik@gmail.com> |
@@ -92,6 +92,27 @@ def lookup(match): |
92 | 92 | sys.exit({{ module }}.main()) |
93 | 93 | """ |
94 | 94 |
|
| 95 | +SETUPTPL = """\ |
| 96 | +from distutils.core import setup |
| 97 | +
|
| 98 | +setup( |
| 99 | + name='{{ module }}', |
| 100 | + version='{{ version }}', |
| 101 | + author='{{ author }}', |
| 102 | + url='{{ url }}', |
| 103 | +
|
| 104 | + description='{{ description }}', |
| 105 | + license='{{ license }}', |
| 106 | +
|
| 107 | + py_modules=['{{ module }}'], |
| 108 | +
|
| 109 | + classifiers=[ |
| 110 | + 'Classifier: Programming Language :: Python :: 2', |
| 111 | + 'Classifier: Programming Language :: Python :: 3', |
| 112 | + ], |
| 113 | +) |
| 114 | +""" |
| 115 | + |
95 | 116 | if __name__ == '__main__': |
96 | 117 | if not sys.argv[1:]: |
97 | 118 | sys.exit("usage: pack.py <module.py>") |
@@ -120,7 +141,7 @@ def lookup(match): |
120 | 141 | text = MiniJinja(BASE).render_string(MAINTPL, **tplvars) |
121 | 142 | zf.writestr('__main__.py', text) |
122 | 143 | print("[*] Making %s installable" % (packname)) |
123 | | - text2 = MiniJinja(BASE).render('pack.setuppy.tpl', **tplvars) |
| 144 | + text2 = MiniJinja(BASE).render_string(SETUPTPL, **tplvars) |
124 | 145 | zf.writestr('setup.py', text2) |
125 | 146 | print("[*] Making %s uploadable to PyPI" % (packname)) |
126 | 147 | zf.writestr('PKG-INFO', '') |
|
0 commit comments