diff --git a/MANIFEST.in b/MANIFEST.in index fac2df1eb..0bec47736 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -14,7 +14,6 @@ exclude codecov.yml # Examples graft examples -graft scripts # docs subdirs we want to skip prune docs/build diff --git a/scripts/jupyter-nbconvert b/scripts/jupyter-nbconvert deleted file mode 100755 index 377a88df1..000000000 --- a/scripts/jupyter-nbconvert +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python - -from nbconvert.nbconvertapp import main - -if __name__ == '__main__': - main() diff --git a/setup.py b/setup.py index 6aa8bd9d6..252116275 100644 --- a/setup.py +++ b/setup.py @@ -28,19 +28,18 @@ #----------------------------------------------------------------------------- import os -import setuptools import io +from setuptools import setup from setuptools.command.bdist_egg import bdist_egg +from setuptools.command.develop import develop -from glob import glob from io import BytesIO try: from urllib.request import urlopen except ImportError: from urllib import urlopen -from distutils.core import setup from distutils.cmd import Command from distutils.command.build import build from distutils.command.sdist import sdist @@ -147,6 +146,7 @@ def run(self): cmdclass['build'] = css_first(build) cmdclass['sdist'] = css_first(sdist) +cmdclass['develop'] = css_first(develop) cmdclass['bdist_egg'] = bdist_egg if 'bdist_egg' in sys.argv else bdist_egg_disabled for d, _, _ in os.walk(pjoin(pkg_root, 'templates')): @@ -160,25 +160,11 @@ def run(self): with io.open(pjoin(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() -long_description=""" - -Nbconvert is a Command Line tool and Python library and API to process and -convert Jupyter notebook into a variety of other formats. - -Using nbconvert enables: - - - presentation of information in familiar formats, such as PDF. - - publishing of research using LaTeX and opens the door for embedding notebooks in papers. - - collaboration with others who may not use the notebook in their work. - - sharing contents with many people via the web using HTML. -""" - setup_args = dict( name = name, description = "Converting Jupyter Notebooks", long_description_content_type = 'text/markdown', version = version_ns['__version__'], - scripts = glob(pjoin('scripts', '*')), packages = packages, long_description= long_description, package_data = package_data, @@ -211,8 +197,7 @@ def run(self): ], ) -setuptools_args = {} -install_requires = setuptools_args['install_requires'] = [ +setup_args['install_requires'] = [ 'mistune>=0.8.1', 'jinja2', 'pygments', @@ -241,32 +226,25 @@ def run(self): } extra_requirements['all'] = sum(extra_requirements.values(), []) -setuptools_args['extras_require'] = extra_requirements - -if 'setuptools' in sys.modules: - from setuptools.command.develop import develop - cmdclass['develop'] = css_first(develop) - # force entrypoints with setuptools (needed for Windows, unconditional because of wheels) - setup_args['entry_points'] = { - 'console_scripts': [ - 'jupyter-nbconvert = nbconvert.nbconvertapp:main', - ], - "nbconvert.exporters" : [ - 'custom=nbconvert.exporters:TemplateExporter', - 'html=nbconvert.exporters:HTMLExporter', - 'slides=nbconvert.exporters:SlidesExporter', - 'latex=nbconvert.exporters:LatexExporter', - 'pdf=nbconvert.exporters:PDFExporter', - 'markdown=nbconvert.exporters:MarkdownExporter', - 'python=nbconvert.exporters:PythonExporter', - 'rst=nbconvert.exporters:RSTExporter', - 'notebook=nbconvert.exporters:NotebookExporter', - 'asciidoc=nbconvert.exporters:ASCIIDocExporter', - 'script=nbconvert.exporters:ScriptExporter'] - } - setup_args.pop('scripts', None) - - setup_args.update(setuptools_args) +setup_args['extras_require'] = extra_requirements + +setup_args['entry_points'] = { + 'console_scripts': [ + 'jupyter-nbconvert = nbconvert.nbconvertapp:main', + ], + "nbconvert.exporters" : [ + 'custom=nbconvert.exporters:TemplateExporter', + 'html=nbconvert.exporters:HTMLExporter', + 'slides=nbconvert.exporters:SlidesExporter', + 'latex=nbconvert.exporters:LatexExporter', + 'pdf=nbconvert.exporters:PDFExporter', + 'markdown=nbconvert.exporters:MarkdownExporter', + 'python=nbconvert.exporters:PythonExporter', + 'rst=nbconvert.exporters:RSTExporter', + 'notebook=nbconvert.exporters:NotebookExporter', + 'asciidoc=nbconvert.exporters:ASCIIDocExporter', + 'script=nbconvert.exporters:ScriptExporter'] +} if __name__ == '__main__': setup(**setup_args)