Skip to content

Commit e58a3a5

Browse files
author
Lars Falk-Petersen
committed
issue216362 Add filename parameter.
1 parent c8c93bb commit e58a3a5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Diff for: README.md

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ Create a executable script in the the top directory, e.g. `dist.py`
3535
'version.min_required': '1.2.3',
3636
})
3737

38+
Optionally these can also be set:
39+
40+
dist(info, blacklist=[], filename='mypackage.mkp')
41+
3842
Create a directory structure as follows:
3943

4044
├── agents/

Diff for: mkp/__init__.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@
2222
_DIST_DIR = 'dist'
2323

2424

25-
def dist(info, path=None, blacklist=[]):
25+
def dist(info, path=None, blacklist=[], filename=None):
2626
if not path:
2727
import __main__ as main
2828
path = os.path.dirname(os.path.realpath(main.__file__))
2929

3030
info['files'] = find_files(path, blacklist)
3131
info['num_files'] = sum(len(file_list) for file_list in info['files'].values())
3232
dist_dir = os.path.join(path, _DIST_DIR)
33-
filename = '{}-{}.mkp'.format(info['name'], info['version'])
33+
if not filename:
34+
filename = '{}-{}.mkp'.format(info['name'], info['version'])
3435

3536
if not os.path.exists(dist_dir):
3637
os.makedirs(dist_dir)

0 commit comments

Comments
 (0)