Skip to content

Commit d91e495

Browse files
committed
other/pack: Move pack.setuppy.tpl into pack.py
1 parent 3181d3a commit d91e495

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed

other/pack.py

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
* [x] name, version
1010
* [x] author
1111
* [x] license
12-
* [ ] url
13-
* [ ] description (first line of module docstring)
12+
* [x] url
13+
* [x] description (first line of module docstring)
1414
1515
Public domain work by:
1616
anatoly techtonik <techtonik@gmail.com>
@@ -92,6 +92,27 @@ def lookup(match):
9292
sys.exit({{ module }}.main())
9393
"""
9494

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+
95116
if __name__ == '__main__':
96117
if not sys.argv[1:]:
97118
sys.exit("usage: pack.py <module.py>")
@@ -120,7 +141,7 @@ def lookup(match):
120141
text = MiniJinja(BASE).render_string(MAINTPL, **tplvars)
121142
zf.writestr('__main__.py', text)
122143
print("[*] Making %s installable" % (packname))
123-
text2 = MiniJinja(BASE).render('pack.setuppy.tpl', **tplvars)
144+
text2 = MiniJinja(BASE).render_string(SETUPTPL, **tplvars)
124145
zf.writestr('setup.py', text2)
125146
print("[*] Making %s uploadable to PyPI" % (packname))
126147
zf.writestr('PKG-INFO', '')

other/pack.setuppy.tpl

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)