|
17 | 17 | ensure_targets, |
18 | 18 | combine_commands, |
19 | 19 | get_version, |
20 | | - skip_if_exists |
| 20 | + skip_if_exists, |
21 | 21 | ) |
22 | 22 |
|
23 | 23 | HERE = os.path.dirname(os.path.abspath(__file__)) |
24 | 24 |
|
25 | 25 |
|
26 | | - |
27 | | - |
28 | 26 | # The name of the project |
29 | | -name = 'jupyterannotate' |
| 27 | +name = "jupyterannotate" |
30 | 28 |
|
31 | 29 | # Get the version |
32 | | -version = get_version(pjoin(name, '_version.py')) |
| 30 | +version = get_version(pjoin(name, "_version.py")) |
33 | 31 |
|
34 | 32 |
|
35 | 33 | # Representative files that should exist after a successful build |
36 | 34 | jstargets = [ |
37 | | - pjoin(HERE, name, 'nbextension', 'index.js'), |
38 | | - pjoin(HERE, name, 'labextension', 'package.json'), |
| 35 | + pjoin(HERE, name, "nbextension", "index.js"), |
| 36 | + pjoin(HERE, name, "labextension", "package.json"), |
39 | 37 | ] |
40 | 38 |
|
41 | 39 |
|
42 | | -package_data_spec = { |
43 | | - name: [ |
44 | | - 'nbextension/**js*', |
45 | | - 'labextension/**' |
46 | | - ] |
47 | | -} |
| 40 | +package_data_spec = {name: ["nbextension/**js*", "labextension/**"]} |
48 | 41 |
|
49 | 42 |
|
50 | 43 | data_files_spec = [ |
51 | | - ('share/jupyter/nbextensions/jupyterannotate', 'jupyterannotate/nbextension', '**'), |
52 | | - ('share/jupyter/labextensions/jupyterannotate', 'jupyterannotate/labextension', '**'), |
53 | | - ('share/jupyter/labextensions/jupyterannotate', '.', 'install.json'), |
54 | | - ('etc/jupyter/nbconfig/notebook.d', '.', 'jupyterannotate.json'), |
| 44 | + ("share/jupyter/nbextensions/jupyterannotate", "jupyterannotate/nbextension", "**"), |
| 45 | + ( |
| 46 | + "share/jupyter/labextensions/jupyterannotate", |
| 47 | + "jupyterannotate/labextension", |
| 48 | + "**", |
| 49 | + ), |
| 50 | + ("share/jupyter/labextensions/jupyterannotate", ".", "install.json"), |
| 51 | + ("etc/jupyter/nbconfig/notebook.d", ".", "jupyterannotate.json"), |
55 | 52 | ] |
56 | 53 |
|
57 | 54 |
|
58 | | -cmdclass = create_cmdclass('jsdeps', package_data_spec=package_data_spec, |
59 | | - data_files_spec=data_files_spec) |
| 55 | +cmdclass = create_cmdclass( |
| 56 | + "jsdeps", package_data_spec=package_data_spec, data_files_spec=data_files_spec |
| 57 | +) |
60 | 58 | npm_install = combine_commands( |
61 | | - install_npm(HERE, build_cmd='build:prod'), |
| 59 | + install_npm(HERE, build_cmd="build:prod"), |
62 | 60 | ensure_targets(jstargets), |
63 | 61 | ) |
64 | | -cmdclass['jsdeps'] = skip_if_exists(jstargets, npm_install) |
| 62 | +cmdclass["jsdeps"] = skip_if_exists(jstargets, npm_install) |
65 | 63 |
|
66 | 64 |
|
67 | 65 | setup_args = dict( |
68 | | - name = name, |
69 | | - description = 'A Custom Jupyter Widget Library', |
70 | | - version = version, |
71 | | - scripts = glob(pjoin('scripts', '*')), |
72 | | - cmdclass = cmdclass, |
73 | | - packages = find_packages(), |
74 | | - author = 'Stuart Quin', |
75 | | - author_email = 'stuart@dataqa.ai', |
76 | | - url = 'https://github.com/DataQA/jupyterannotate', |
77 | | - license = 'BSD', |
78 | | - platforms = "Linux, Mac OS X, Windows", |
79 | | - keywords = ['Jupyter', 'Widgets', 'IPython'], |
80 | | - classifiers = [ |
81 | | - 'Intended Audience :: Developers', |
82 | | - 'Intended Audience :: Science/Research', |
83 | | - 'License :: OSI Approved :: BSD License', |
84 | | - 'Programming Language :: Python', |
85 | | - 'Programming Language :: Python :: 3', |
86 | | - 'Programming Language :: Python :: 3.4', |
87 | | - 'Programming Language :: Python :: 3.5', |
88 | | - 'Programming Language :: Python :: 3.6', |
89 | | - 'Programming Language :: Python :: 3.7', |
90 | | - 'Framework :: Jupyter', |
| 66 | + name=name, |
| 67 | + description="A Custom Jupyter Widget Library", |
| 68 | + version=version, |
| 69 | + scripts=glob(pjoin("scripts", "*")), |
| 70 | + cmdclass=cmdclass, |
| 71 | + packages=find_packages(), |
| 72 | + author="Stuart Quin", |
| 73 | + author_email="stuart@dataqa.ai", |
| 74 | + url="https://github.com/DataQA/jupyterannotate", |
| 75 | + license="BSD", |
| 76 | + platforms="Linux, Mac OS X, Windows", |
| 77 | + keywords=["Jupyter", "Widgets", "IPython"], |
| 78 | + classifiers=[ |
| 79 | + "Intended Audience :: Developers", |
| 80 | + "Intended Audience :: Science/Research", |
| 81 | + "License :: OSI Approved :: BSD License", |
| 82 | + "Programming Language :: Python", |
| 83 | + "Programming Language :: Python :: 3", |
| 84 | + "Programming Language :: Python :: 3.4", |
| 85 | + "Programming Language :: Python :: 3.5", |
| 86 | + "Programming Language :: Python :: 3.6", |
| 87 | + "Programming Language :: Python :: 3.7", |
| 88 | + "Framework :: Jupyter", |
91 | 89 | ], |
92 | | - include_package_data = True, |
| 90 | + include_package_data=True, |
93 | 91 | python_requires=">=3.6", |
94 | | - install_requires = [ |
95 | | - 'ipywidgets>=7.0.0', |
| 92 | + install_requires=[ |
| 93 | + "ipywidgets>=7.0.0", |
96 | 94 | ], |
97 | | - extras_require = { |
98 | | - 'test': [ |
99 | | - 'pytest>=4.6', |
100 | | - 'pytest-cov', |
101 | | - 'nbval', |
| 95 | + extras_require={ |
| 96 | + "test": [ |
| 97 | + "pytest>=4.6", |
| 98 | + "pytest-cov", |
| 99 | + "nbval", |
102 | 100 | ], |
103 | | - 'examples': [ |
| 101 | + "examples": [ |
104 | 102 | # Any requirements for the examples to run |
105 | 103 | ], |
106 | | - 'docs': [ |
107 | | - 'jupyter_sphinx', |
108 | | - 'nbsphinx', |
109 | | - 'nbsphinx-link', |
110 | | - 'pytest_check_links', |
111 | | - 'pypandoc', |
112 | | - 'recommonmark', |
113 | | - 'sphinx>=1.5', |
114 | | - 'sphinx_rtd_theme', |
| 104 | + "docs": [ |
| 105 | + "jupyter_sphinx", |
| 106 | + "nbsphinx", |
| 107 | + "nbsphinx-link", |
| 108 | + "pytest_check_links", |
| 109 | + "pypandoc", |
| 110 | + "recommonmark", |
| 111 | + "sphinx>=1.5", |
| 112 | + "sphinx_rtd_theme", |
115 | 113 | ], |
116 | 114 | }, |
117 | | - entry_points = { |
118 | | - }, |
| 115 | + entry_points={}, |
119 | 116 | ) |
120 | 117 |
|
121 | | -if __name__ == '__main__': |
| 118 | +if __name__ == "__main__": |
122 | 119 | setup(**setup_args) |
0 commit comments