Skip to content

Commit d855b0c

Browse files
committed
other/pack: Read license info from module
1 parent 823350b commit d855b0c

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

other/pack.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
99
* [x] name, version
1010
* [x] author
11+
* [x] license
1112
* [ ] url
1213
* [ ] description (first line of module docstring)
1314
@@ -85,7 +86,8 @@ def lookup(match):
8586
tplvars = dict(
8687
module = os.path.basename(modpath)[:-3], # also strip extension
8788
version = get_field(modpath, '__version__'),
88-
author = get_field(modpath, '__author__')
89+
author = get_field(modpath, '__author__'),
90+
license = get_field(modpath, '__license__')
8991
)
9092

9193
if tplvars['version'] == None:

other/pack.setuppy.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ setup(
77
url='https://github.com/techtonik/python-patch/',
88

99
description='Patch utility to apply unified diffs',
10-
license='MIT',
10+
license='{{ license }}',
1111

1212
py_modules=['{{ module }}'],
1313

patch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
__author__ = "anatoly techtonik <techtonik@gmail.com>"
1616
__version__ = "1.16"
17+
__license__ = "MIT"
1718

1819
import copy
1920
import logging

0 commit comments

Comments
 (0)