Skip to content

Commit

Permalink
Merge pull request #244 from Zsailer/packaging
Browse files Browse the repository at this point in the history
use jupyter_packaging to install package
  • Loading branch information
Zsailer authored Jun 19, 2020
2 parents b828ac7 + 53499af commit e3bb5eb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 237 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["jupyter_packaging~=0.5.0", "jupyterlab~=2.0", "setuptools>=40.8.0", "wheel"]
build-backend = "setuptools.build_meta"
94 changes: 23 additions & 71 deletions setup.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,77 +1,39 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Setup script for Jupyter Server"""

#-----------------------------------------------------------------------------
# Copyright (c) 2015-, Jupyter Development Team.
# Copyright (c) 2008-2015, IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.md, distributed with this software.
#-----------------------------------------------------------------------------

from __future__ import print_function

import os
import sys

name = "jupyter_server"

# Minimal Python version sanity check
if sys.version_info < (3,5):
error = "ERROR: %s requires Python version 3.5 or above." % name
print(error, file=sys.stderr)
sys.exit(1)

# At least we're on the python version we need, move on.
import pathlib
from setuptools import setup
from jupyter_packaging import (
get_version
)

# BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
# update it when the contents of directories change.
if os.path.exists('MANIFEST'): os.remove('MANIFEST')

from setuptools import setup
here = pathlib.Path('.')
version_path = here.joinpath('jupyter_server', '_version.py')
VERSION = get_version(str(version_path))

from setupbase import (
version,
find_packages,
find_package_data,
check_package_data_first,
)
readme_path = here.joinpath('README.md')
README = readme_path.read_text()

setup_args = dict(
name = name,
description = "The Jupyter Server",
long_description = """
The Jupyter Server is a web application that allows you to create and
share documents that contain live code, equations, visualizations, and
explanatory text. The Notebook has support for multiple programming
languages, sharing, and interactive widgets.
Read `the documentation <https://jupyter-server.readthedocs.io>`_
for more information.
""",
version = version,
packages = find_packages(),
package_data = find_package_data(),
author = 'Jupyter Development Team',
author_email = '[email protected]',
url = 'http://jupyter.org',
license = 'BSD',
platforms = "Linux, Mac OS X, Windows",
keywords = ['Interactive', 'Interpreter', 'Shell', 'Web'],
classifiers = [
name = 'jupyter_server',
description = 'The backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications.',
long_description = README,
version = VERSION,
author = 'Jupyter Development Team',
author_email = '[email protected]',
url = 'http://jupyter.org',
license = 'BSD',
platforms = "Linux, Mac OS X, Windows",
keywords = ['ipython', 'jupyter'],
classifiers = [
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
zip_safe = False,
install_requires = [
'jinja2',
'tornado>=5.0',
Expand All @@ -94,7 +56,6 @@
'pytest-console-scripts'],
'test:sys_platform == "win32"': ['nose-exclude'],
},
python_requires = '>=3.5',
entry_points = {
'console_scripts': [
'jupyter-server = jupyter_server.serverapp:main',
Expand All @@ -105,14 +66,5 @@
},
)

try:
from wheel.bdist_wheel import bdist_wheel
except ImportError:
pass

# Run setup --------------------
def main():
setup(**setup_args)

if __name__ == '__main__':
main()
setup(**setup_args)
166 changes: 0 additions & 166 deletions setupbase.py

This file was deleted.

0 comments on commit e3bb5eb

Please sign in to comment.