Skip to content

Commit e3bb5eb

Browse files
authored
Merge pull request #244 from Zsailer/packaging
use jupyter_packaging to install package
2 parents b828ac7 + 53499af commit e3bb5eb

File tree

3 files changed

+26
-237
lines changed

3 files changed

+26
-237
lines changed

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["jupyter_packaging~=0.5.0", "jupyterlab~=2.0", "setuptools>=40.8.0", "wheel"]
3+
build-backend = "setuptools.build_meta"

setup.py

100755100644
Lines changed: 23 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,39 @@
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+
)
286

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')
327

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))
3411

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()
4114

4215
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 = [
6427
'Intended Audience :: Developers',
6528
'Intended Audience :: System Administrators',
6629
'Intended Audience :: Science/Research',
6730
'License :: OSI Approved :: BSD License',
6831
'Programming Language :: Python',
69-
'Programming Language :: Python :: 3',
7032
'Programming Language :: Python :: 3.5',
7133
'Programming Language :: Python :: 3.6',
7234
'Programming Language :: Python :: 3.7',
35+
'Programming Language :: Python :: 3.8',
7336
],
74-
zip_safe = False,
7537
install_requires = [
7638
'jinja2',
7739
'tornado>=5.0',
@@ -94,7 +56,6 @@
9456
'pytest-console-scripts'],
9557
'test:sys_platform == "win32"': ['nose-exclude'],
9658
},
97-
python_requires = '>=3.5',
9859
entry_points = {
9960
'console_scripts': [
10061
'jupyter-server = jupyter_server.serverapp:main',
@@ -105,14 +66,5 @@
10566
},
10667
)
10768

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-
11769
if __name__ == '__main__':
118-
main()
70+
setup(**setup_args)

setupbase.py

Lines changed: 0 additions & 166 deletions
This file was deleted.

0 commit comments

Comments
 (0)