|
1 | 1 | #!/usr/bin/env python
|
2 | 2 |
|
3 |
| -# Copyright (c) IPython Development Team. |
| 3 | +# Copyright (c) Jupyter Development Team. |
4 | 4 | # Distributed under the terms of the Modified BSD License.
|
5 | 5 |
|
6 |
| -# the name of the package |
7 |
| -name = 'ipywidgets' |
8 |
| - |
9 |
| -LONG_DESCRIPTION = """ |
10 |
| -.. image:: https://img.shields.io/pypi/v/ipywidgets.svg |
11 |
| - :target: https://pypi.python.org/pypi/ipywidgets/ |
12 |
| - :alt: Version Number |
13 |
| -
|
14 |
| -.. image:: https://img.shields.io/pypi/dm/ipywidgets.svg |
15 |
| - :target: https://pypi.python.org/pypi/ipywidgets/ |
16 |
| - :alt: Number of PyPI downloads |
17 |
| -
|
18 |
| -Interactive HTML Widgets |
19 |
| -======================== |
20 |
| -
|
21 |
| -Interactive HTML widgets for Jupyter notebooks and the IPython kernel. |
22 |
| -
|
23 |
| -Usage |
24 |
| -===== |
25 |
| -
|
26 |
| -.. code-block:: python |
27 |
| -
|
28 |
| - from ipywidgets import IntSlider |
29 |
| - IntSlider() |
30 |
| -""" |
31 |
| - |
32 |
| -#----------------------------------------------------------------------------- |
33 |
| -# get on with it |
34 |
| -#----------------------------------------------------------------------------- |
35 |
| - |
36 |
| -import sys |
37 |
| -import os |
38 |
| -from distutils.core import setup |
39 |
| -from distutils.command.build_py import build_py |
40 |
| -from distutils.command.sdist import sdist |
41 |
| -from os.path import join as pjoin |
42 |
| - |
43 |
| -pjoin = os.path.join |
44 |
| -here = os.path.abspath(os.path.dirname(__file__)) |
45 |
| - |
46 |
| -packages = [] |
47 |
| -for d, _, _ in os.walk(pjoin(here, name)): |
48 |
| - if os.path.exists(pjoin(d, '__init__.py')): |
49 |
| - packages.append(d[len(here)+1:].replace(os.path.sep, '.')) |
50 |
| - |
51 |
| -version_ns = {} |
52 |
| -with open(pjoin(here, name, '_version.py')) as f: |
53 |
| - exec(f.read(), {}, version_ns) |
54 |
| - |
55 |
| - |
56 |
| -setup_args = dict( |
57 |
| - name = name, |
58 |
| - version = version_ns['__version__'], |
59 |
| - scripts = [], |
60 |
| - packages = packages, |
61 |
| - package_data = { |
62 |
| - 'ipywidgets': [ 'state.schema.json', 'view.schema.json' ], |
63 |
| - # Test data needs to be packaged until tests are moved out of module |
64 |
| - 'ipywidgets.widgets.tests': ['data/jupyter-logo-transparent.png'] |
65 |
| - }, |
66 |
| - description = "Jupyter interactive widgets", |
67 |
| - long_description = LONG_DESCRIPTION, |
68 |
| - author = 'Jupyter Development Team', |
69 |
| - author_email = '[email protected]', |
70 |
| - url = 'http://jupyter.org', |
71 |
| - license = 'BSD', |
72 |
| - platforms = "Linux, Mac OS X, Windows", |
73 |
| - keywords = ['Interactive', 'Interpreter', 'Shell', 'Web'], |
74 |
| - classifiers = [ |
75 |
| - 'Intended Audience :: Developers', |
76 |
| - 'Intended Audience :: System Administrators', |
77 |
| - 'Intended Audience :: Science/Research', |
78 |
| - 'License :: OSI Approved :: BSD License', |
79 |
| - 'Programming Language :: Python', |
80 |
| - 'Programming Language :: Python :: 3', |
81 |
| - 'Programming Language :: Python :: 3.6', |
82 |
| - 'Programming Language :: Python :: 3.7', |
83 |
| - 'Programming Language :: Python :: 3.8', |
84 |
| - 'Programming Language :: Python :: 3.9', |
85 |
| - 'Programming Language :: Python :: 3 :: Only', |
86 |
| - 'Framework :: Jupyter' |
87 |
| - ], |
88 |
| - cmdclass = { |
89 |
| - 'build_py': build_py, |
90 |
| - 'sdist': sdist, |
91 |
| - }, |
92 |
| - python_requires = '>=3.6', |
93 |
| -) |
94 |
| - |
95 |
| -if 'develop' in sys.argv or any(a.startswith('bdist') for a in sys.argv): |
96 |
| - import setuptools |
97 |
| - |
98 |
| -setuptools_args = {} |
99 |
| -install_requires = setuptools_args['install_requires'] = [ |
100 |
| - 'ipykernel>=4.5.1', |
101 |
| - 'ipython>=6.1.0', # to use _repr_mimebundle |
102 |
| - 'traitlets>=4.3.1', |
103 |
| - # Requiring nbformat to specify bugfix version which is not required by |
104 |
| - # notebook. |
105 |
| - 'nbformat>=4.2.0', |
106 |
| - # TODO: Dynamically add this dependency |
107 |
| - # only if notebook 4.x is installed in this |
108 |
| - # interpreter, to allow ipywidgets to be |
109 |
| - # installed on bare kernels. |
110 |
| - 'widgetsnbextension~=4.0a0', |
111 |
| - 'jupyterlab_widgets~=2.0a0' |
112 |
| -] |
113 |
| - |
114 |
| -extras_require = setuptools_args['extras_require'] = { |
115 |
| - 'test': ['pytest>=3.6.0', 'pytest-cov'], |
116 |
| -} |
117 |
| - |
118 |
| -if 'setuptools' in sys.modules: |
119 |
| - setup_args.update(setuptools_args) |
120 |
| - |
| 6 | +from setuptools import setup |
121 | 7 | if __name__ == '__main__':
|
122 |
| - setup(**setup_args) |
| 8 | + setup() |
0 commit comments