mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
c19323de9a
* Use Jupyter Releaser * Automated Changelog Entry for 6.4.0a0 on notebook-releaser * Publish 6.4.0a0 SHA256 hashes: dist/notebook-6.4.0a0-py3-none-any.whl: abbbbb02504cedb85c2d5eeac39ea11615360b9b0075126bf180d6011eac14a5 dist/notebook-6.4.0a0.tar.gz: 2984630a020a9396c61b2c3b98f43b1957dd0121b162a926b3d6136fafa7ca16 * Bump to 6.5.0.dev0 * Remove jupyter_packaging as a runtime requirement * Automated Changelog Entry for 6.4.0a1 on notebook-releaser * Publish 6.4.0a1 SHA256 hashes: dist/notebook-6.4.0a1-py3-none-any.whl: 4b0ae5cb972b5b16b18b942810b85859185ef2081017dd495e5f57099ce06ef4 dist/notebook-6.4.0a1.tar.gz: c48e10d34afa35e304e3b7deca1882508195960f35c4661dec044bb8da344ae5 * Bump to 6.5.0.dev0 * Update notebook/_version.py Co-authored-by: Kevin Bates <kbates4@gmail.com> * Update pyproject.toml Co-authored-by: Kevin Bates <kbates4@gmail.com> Co-authored-by: GitHub Action <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Steven Silvester <steven.silvester@ieee.org> Co-authored-by: Kevin Bates <kbates4@gmail.com>
189 lines
6.1 KiB
Python
Executable File
189 lines
6.1 KiB
Python
Executable File
#!/usr/bin/env python
|
|
"""Setup script for Jupyter Notebook"""
|
|
|
|
#-----------------------------------------------------------------------------
|
|
# 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 LICENSE, distributed with this software.
|
|
#-----------------------------------------------------------------------------
|
|
|
|
import os
|
|
import sys
|
|
|
|
name = "notebook"
|
|
|
|
if sys.version_info < (3, 6):
|
|
pip_message = 'This may be due to an out of date pip. Make sure you have pip >= 9.0.1.'
|
|
try:
|
|
import pip
|
|
pip_version = tuple([int(x) for x in pip.__version__.split('.')[:3]])
|
|
if pip_version < (9, 0, 1) :
|
|
pip_message = 'Your pip version is out of date, please install pip >= 9.0.1. '\
|
|
'pip {} detected.'.format(pip.__version__)
|
|
else:
|
|
# pip is new enough - it must be something else
|
|
pip_message = ''
|
|
except Exception:
|
|
pass
|
|
|
|
|
|
error = """
|
|
Notebook 6.3+ supports Python 3.6 and above.
|
|
When using Python 3.5, please install Notebook <= 6.2.
|
|
When using Python 3.4 or earlier (including 2.7), please install Notebook 5.x.
|
|
|
|
Python {py} detected.
|
|
{pip}
|
|
""".format(py=sys.version_info, pip=pip_message )
|
|
|
|
print(error, file=sys.stderr)
|
|
sys.exit(1)
|
|
|
|
# At least we're on the python version we need, move on.
|
|
|
|
# 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
|
|
|
|
# Needed to support building with `setuptools.build_meta`
|
|
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
|
|
|
|
from setupbase import (
|
|
version,
|
|
find_packages,
|
|
find_package_data,
|
|
check_package_data_first,
|
|
CompileCSS,
|
|
CompileJS,
|
|
CompileBackendTranslation,
|
|
Bower,
|
|
JavascriptVersion,
|
|
css_js_prerelease,
|
|
)
|
|
|
|
|
|
data_files = [
|
|
('share/applications', ['jupyter-notebook.desktop']),
|
|
('share/icons/hicolor/scalable/apps', ['notebook.svg']),
|
|
]
|
|
|
|
|
|
setup_args = dict(
|
|
name = name,
|
|
description = "A web-based notebook environment for interactive computing",
|
|
long_description = """
|
|
The Jupyter Notebook 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-notebook.readthedocs.io>`_
|
|
for more information.
|
|
""",
|
|
version = version,
|
|
packages = find_packages(),
|
|
package_data = find_package_data(),
|
|
data_files = data_files,
|
|
author = 'Jupyter Development Team',
|
|
author_email = 'jupyter@googlegroups.com',
|
|
url = 'http://jupyter.org',
|
|
license = 'BSD',
|
|
platforms = "Linux, Mac OS X, Windows",
|
|
keywords = ['Interactive', 'Interpreter', 'Shell', 'Web'],
|
|
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.6',
|
|
'Programming Language :: Python :: 3.7',
|
|
'Programming Language :: Python :: 3.8',
|
|
'Programming Language :: Python :: 3.9'
|
|
],
|
|
zip_safe = False,
|
|
install_requires = [
|
|
'jinja2',
|
|
'tornado>=6.1',
|
|
# pyzmq>=17 is not technically necessary,
|
|
# but hopefully avoids incompatibilities with Tornado 5. April 2018
|
|
'pyzmq>=17',
|
|
'argon2-cffi',
|
|
'ipython_genutils',
|
|
'traitlets>=4.2.1',
|
|
'jupyter_core>=4.6.1',
|
|
'jupyter_client>=5.3.4',
|
|
'nbformat',
|
|
'nbconvert',
|
|
'ipykernel', # bless IPython kernel for now
|
|
'Send2Trash>=1.5.0',
|
|
'terminado>=0.8.3',
|
|
'prometheus_client'
|
|
],
|
|
extras_require = {
|
|
'test': ['pytest', 'coverage', 'requests',
|
|
'nbval', 'selenium', 'pytest', 'pytest-cov'],
|
|
'docs': ['sphinx', 'nbsphinx', 'sphinxcontrib_github_alt',
|
|
'sphinx_rtd_theme', 'myst-parser'],
|
|
'test:sys_platform != "win32"': ['requests-unixsocket'],
|
|
'json-logging': ['json-logging']
|
|
},
|
|
python_requires = '>=3.6',
|
|
entry_points = {
|
|
'console_scripts': [
|
|
'jupyter-notebook = notebook.notebookapp:main',
|
|
'jupyter-nbextension = notebook.nbextensions:main',
|
|
'jupyter-serverextension = notebook.serverextensions:main',
|
|
'jupyter-bundlerextension = notebook.bundler.bundlerextensions:main',
|
|
]
|
|
},
|
|
)
|
|
|
|
# Custom distutils/setuptools commands ----------
|
|
from distutils.command.build_py import build_py
|
|
from distutils.command.sdist import sdist
|
|
from setuptools.command.bdist_egg import bdist_egg
|
|
from setuptools.command.develop import develop
|
|
|
|
class bdist_egg_disabled(bdist_egg):
|
|
"""Disabled version of bdist_egg
|
|
|
|
Prevents setup.py install from performing setuptools' default easy_install,
|
|
which it should never ever do.
|
|
"""
|
|
def run(self):
|
|
sys.exit("Aborting implicit building of eggs. Use `pip install .` to install from source.")
|
|
|
|
setup_args['cmdclass'] = {
|
|
'build_py': css_js_prerelease(
|
|
check_package_data_first(build_py)),
|
|
'sdist' : css_js_prerelease(sdist, strict=True),
|
|
'develop': css_js_prerelease(develop),
|
|
'css' : CompileCSS,
|
|
'backendtranslations': CompileBackendTranslation,
|
|
'js' : CompileJS,
|
|
'jsdeps' : Bower,
|
|
'jsversion' : JavascriptVersion,
|
|
'bdist_egg': bdist_egg if 'bdist_egg' in sys.argv else bdist_egg_disabled,
|
|
}
|
|
|
|
try:
|
|
from wheel.bdist_wheel import bdist_wheel
|
|
except ImportError:
|
|
pass
|
|
else:
|
|
setup_args['cmdclass']['bdist_wheel'] = css_js_prerelease(bdist_wheel)
|
|
|
|
# Run setup --------------------
|
|
def main():
|
|
setup(**setup_args)
|
|
|
|
if __name__ == '__main__':
|
|
main()
|