Skip to content

Commit ad85e5f

Browse files
committed
Various improvements to setup.py
- Add missing comma to license classifier - Add maintainer and maintainer_email metadata - Make packages metadata a simple list of strings - Use os.makedirs(exist_ok=True) to make completion directory - Avoid redundant keys data_files tuples Signed-off-by: Peter Grayson <[email protected]>
1 parent 8cbf040 commit ad85e5f

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

setup.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ def __check_git_version():
8888
with open('stgit/commands/cmdlist.py', 'w') as f:
8989
commands.py_commands(commands.get_commands(allow_cached=False), f)
9090

91-
if not os.path.exists('completion'):
92-
os.mkdir('completion')
91+
os.makedirs('completion', exist_ok=True)
9392

9493
# generate the bash completion script
9594
with open(os.path.join('completion', 'stgit.bash'), 'w') as f:
@@ -105,31 +104,32 @@ def __check_git_version():
105104
license='GPLv2',
106105
author='Catalin Marinas',
107106
author_email='[email protected]',
107+
maintainer='Peter Grayson',
108+
maintainer_email='[email protected]',
108109
url='http://stacked-git.github.io',
109110
download_url='https://github.com/stacked-git/stgit.git',
110111
description='Stacked Git',
111112
long_description='Application for managing Git commits as a stack of patches.',
112113
scripts=['stg'],
113-
packages=list(
114-
map(
115-
str,
116-
[
117-
'stgit',
118-
'stgit.commands',
119-
'stgit.completion',
120-
'stgit.lib',
121-
'stgit.lib.git',
122-
],
123-
)
124-
),
114+
packages=[
115+
'stgit',
116+
'stgit.commands',
117+
'stgit.completion',
118+
'stgit.lib',
119+
'stgit.lib.git',
120+
],
125121
data_files=[
126122
('share/stgit/templates', glob('stgit/templates/*.tmpl')),
127-
('share/stgit/examples', glob('examples/*.tmpl')),
128-
('share/stgit/examples', ['examples/gitconfig']),
123+
('share/stgit/examples', glob('examples/*.tmpl') + ['examples/gitconfig']),
129124
('share/stgit/contrib', ['contrib/stgbashprompt.sh']),
130-
('share/stgit/completion', ['completion/stg.fish']),
131-
('share/stgit/completion', ['completion/stgit.bash']),
132-
('share/stgit/completion', ['completion/stgit.zsh']),
125+
(
126+
'share/stgit/completion',
127+
[
128+
'completion/stg.fish',
129+
'completion/stgit.bash',
130+
'completion/stgit.zsh',
131+
],
132+
),
133133
],
134134
package_data={
135135
'stgit': [
@@ -144,7 +144,7 @@ def __check_git_version():
144144
'Development Status :: 5 - Production/Stable',
145145
'Environment :: Console',
146146
'Intended Audience :: Developers',
147-
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)'
147+
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
148148
'Natural Language :: English',
149149
'Operating System :: OS Independent',
150150
'Programming Language :: Python',

0 commit comments

Comments
 (0)