Skip to content

Commit a86eacb

Browse files
authored
Merge pull request #249 from martinRenou/fix_setup_py
Improve setup.py for fixing the Github "Used By" section
2 parents 64ee6af + 1f1e1ae commit a86eacb

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

setup.py

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
import sys
1111
from os.path import join as pjoin
1212

13+
# Name of the project
14+
name = 'ipympl'
15+
1316
here = os.path.dirname(os.path.abspath(__file__))
1417
node_root = pjoin(here, 'js')
1518
is_repo = os.path.exists(pjoin(here, '.git'))
@@ -138,37 +141,37 @@ def run(self):
138141
with open(pjoin(here, 'ipympl', '_version.py')) as f:
139142
exec(f.read(), {}, version_ns)
140143

141-
setup_args = {
142-
'name': 'ipympl',
143-
'version': version_ns['__version__'],
144-
'description': 'Matplotlib Jupyter Extension',
145-
'long_description': LONG_DESCRIPTION,
146-
'license': 'BSD License',
147-
'include_package_data': True,
148-
'data_files': get_data_files(),
149-
'install_requires': [
144+
setup_args = dict(
145+
name=name,
146+
version=version_ns['__version__'],
147+
description='Matplotlib Jupyter Extension',
148+
long_description=LONG_DESCRIPTION,
149+
license='BSD License',
150+
include_package_data=True,
151+
data_files=get_data_files(),
152+
install_requires=[
150153
'ipykernel>=4.7',
151154
'ipywidgets>=7.5.0',
152155
'matplotlib>=2.0.0'
153156
],
154-
'packages': find_packages(),
155-
'zip_safe': False,
156-
'cmdclass': {
157+
packages=find_packages(),
158+
zip_safe=False,
159+
cmdclass={
157160
'build_py': js_prerelease(build_py),
158161
'egg_info': js_prerelease(egg_info),
159162
'sdist': js_prerelease(sdist, strict=True),
160163
'jsdeps': NPM,
161164
},
162-
'author': 'Matplotlib Development Team',
163-
'author_email': '[email protected]',
164-
'url': 'http://matplotlib.org',
165-
'keywords': [
165+
author='Matplotlib Development Team',
166+
author_email='[email protected]',
167+
url='http://matplotlib.org',
168+
keywords=[
166169
'ipython',
167170
'jupyter',
168171
'widgets',
169172
'graphics',
170173
],
171-
'classifiers': [
174+
classifiers=[
172175
'Development Status :: 4 - Beta',
173176
'Framework :: IPython',
174177
'Intended Audience :: Developers',
@@ -181,6 +184,6 @@ def run(self):
181184
'Programming Language :: Python :: 3.4',
182185
'Programming Language :: Python :: 3.5',
183186
],
184-
}
187+
)
185188

186189
setup(**setup_args)

0 commit comments

Comments
 (0)