1
- #!/usr/bin/env python
2
- # -*- coding: utf-8 -*-
3
- """Setup script for Jupyter Server"""
4
-
5
- #-----------------------------------------------------------------------------
6
- # Copyright (c) 2015-, Jupyter Development Team.
7
- # Copyright (c) 2008-2015, IPython Development Team.
8
- #
9
- # Distributed under the terms of the Modified BSD License.
10
- #
11
- # The full license is in the file COPYING.md, distributed with this software.
12
- #-----------------------------------------------------------------------------
13
-
14
- from __future__ import print_function
15
-
16
- import os
17
- import sys
18
-
19
- name = "jupyter_server"
20
-
21
- # Minimal Python version sanity check
22
- if sys .version_info < (3 ,5 ):
23
- error = "ERROR: %s requires Python version 3.5 or above." % name
24
- print (error , file = sys .stderr )
25
- sys .exit (1 )
26
-
27
- # At least we're on the python version we need, move on.
1
+ import pathlib
2
+ from setuptools import setup
3
+ from jupyter_packaging import (
4
+ get_version
5
+ )
28
6
29
- # BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
30
- # update it when the contents of directories change.
31
- if os .path .exists ('MANIFEST' ): os .remove ('MANIFEST' )
32
7
33
- from setuptools import setup
8
+ here = pathlib .Path ('.' )
9
+ version_path = here .joinpath ('jupyter_server' , '_version.py' )
10
+ VERSION = get_version (str (version_path ))
34
11
35
- from setupbase import (
36
- version ,
37
- find_packages ,
38
- find_package_data ,
39
- check_package_data_first ,
40
- )
12
+ readme_path = here .joinpath ('README.md' )
13
+ README = readme_path .read_text ()
41
14
42
15
setup_args = dict (
43
- name = name ,
44
- description = "The Jupyter Server" ,
45
- long_description = """
46
- The Jupyter Server is a web application that allows you to create and
47
- share documents that contain live code, equations, visualizations, and
48
- explanatory text. The Notebook has support for multiple programming
49
- languages, sharing, and interactive widgets.
50
-
51
- Read `the documentation <https://jupyter-server.readthedocs.io>`_
52
- for more information.
53
- """ ,
54
- version = version ,
55
- packages = find_packages (),
56
- package_data = find_package_data (),
57
- author = 'Jupyter Development Team' ,
58
- author_email = '[email protected] ' ,
59
- url = 'http://jupyter.org' ,
60
- license = 'BSD' ,
61
- platforms = "Linux, Mac OS X, Windows" ,
62
- keywords = ['Interactive' , 'Interpreter' , 'Shell' , 'Web' ],
63
- classifiers = [
16
+ name = 'jupyter_server' ,
17
+ description = 'The backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications.' ,
18
+ long_description = README ,
19
+ version = VERSION ,
20
+ author = 'Jupyter Development Team' ,
21
+ author_email = '[email protected] ' ,
22
+ url = 'http://jupyter.org' ,
23
+ license = 'BSD' ,
24
+ platforms = "Linux, Mac OS X, Windows" ,
25
+ keywords = ['ipython' , 'jupyter' ],
26
+ classifiers = [
64
27
'Intended Audience :: Developers' ,
65
28
'Intended Audience :: System Administrators' ,
66
29
'Intended Audience :: Science/Research' ,
67
30
'License :: OSI Approved :: BSD License' ,
68
31
'Programming Language :: Python' ,
69
- 'Programming Language :: Python :: 3' ,
70
32
'Programming Language :: Python :: 3.5' ,
71
33
'Programming Language :: Python :: 3.6' ,
72
34
'Programming Language :: Python :: 3.7' ,
35
+ 'Programming Language :: Python :: 3.8' ,
73
36
],
74
- zip_safe = False ,
75
37
install_requires = [
76
38
'jinja2' ,
77
39
'tornado>=5.0' ,
94
56
'pytest-console-scripts' ],
95
57
'test:sys_platform == "win32"' : ['nose-exclude' ],
96
58
},
97
- python_requires = '>=3.5' ,
98
59
entry_points = {
99
60
'console_scripts' : [
100
61
'jupyter-server = jupyter_server.serverapp:main' ,
105
66
},
106
67
)
107
68
108
- try :
109
- from wheel .bdist_wheel import bdist_wheel
110
- except ImportError :
111
- pass
112
-
113
- # Run setup --------------------
114
- def main ():
115
- setup (** setup_args )
116
-
117
69
if __name__ == '__main__' :
118
- main ( )
70
+ setup ( ** setup_args )
0 commit comments