diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..b571016 --- /dev/null +++ b/.flake8 @@ -0,0 +1,17 @@ +[flake8] +ignore = E501, W503, E402 +builtins = c, get_config +exclude = + .cache, + .github, + docs, + setup.py +enable-extensions = G +extend-ignore = + G001, G002, G004, G200, G201, G202, + # black adds spaces around ':' + E203, +per-file-ignores = + # B011: Do not call assert False since python -O removes these calls + # F841 local variable 'foo' is assigned to but never used + jupyter_core/tests/*: B011, F841 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 534047f..3dea24c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -72,12 +72,6 @@ repos: scripts/jupyter )$ - - repo: https://github.com/mgedmin/check-manifest - rev: "0.48" - hooks: - - id: check-manifest - stages: [manual] - - repo: https://github.com/sirosen/check-jsonschema rev: 0.14.3 hooks: diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 9a3f619..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,27 +0,0 @@ -include COPYING.md -include CONTRIBUTING.md -include README.md -include jupyter_core/py.typed - -exclude .pre-commit-config.yaml -exclude .git-blame-ignore-revs -exclude readthedocs.yml - -# Documentation -graft docs -graft examples - -# Test files -graft jupyter_core/tests/dotipython -graft jupyter_core/tests/dotipython_empty - -# dirs we want to skip -prune scripts -prune docs/_build - -# Patterns to exclude from any directory -global-exclude *~ -global-exclude *.pyc -global-exclude *.pyo -global-exclude .git -global-exclude .ipynb_checkpoints diff --git a/pyproject.toml b/pyproject.toml index 2d139bb..8dd6d7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,55 @@ [build-system] -requires = ["setuptools>=60.0"] -build-backend = "setuptools.build_meta" +requires = ["flit_core >=3.2,<4"] +build-backend = "flit_core.buildapi" + +[project] +name = "jupyter_core" +description = "Jupyter core package. A base package on which Jupyter projects rely." +license = { file = "COPYING.md" } +classifiers = [ + "Framework :: Jupyter", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: BSD License", + "Programming Language :: Python", + "Programming Language :: Python :: 3" +] +requires-python = ">=3.7" +dependencies = [ + "traitlets", + "pywin32>=1.0 ; sys_platform == 'win32' and platform_python_implementation != 'PyPy'" +] +dynamic = ["version"] + +[[project.authors]] +name = "Jupyter Development Team" +email = "jupyter@googlegroups.org" + +[project.readme] +text = "There is no reason to install this package on its own." +content-type = "text/plain" + +[project.urls] +Homepage = "https://jupyter.org" +Documentation = "https://jupyter-core.readthedocs.io/" +Funding = "https://numfocus.org/" +Source = "https://github.com/jupyter/jupyter_core" +Tracker = "https://github.com/jupyter/jupyter_core/issues" + +[project.optional-dependencies] +test = [ + "ipykernel", + "pre-commit", + "pytest", + "pytest-cov", + "pytest-timeout" +] + +[project.scripts] +jupyter = "jupyter_core.command:main" +jupyter-migrate = "jupyter_core.migrate:main" +jupyter-troubleshoot = "jupyter_core.troubleshoot:main" [tool.mypy] check_untyped_defs = true diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index f53fa6c..0000000 --- a/setup.cfg +++ /dev/null @@ -1,65 +0,0 @@ -[metadata] -name = jupyter_core -version = attr: jupyter_core.version.__version__ -description = Jupyter core package. A base package on which Jupyter projects rely. -long_description = There is no reason to install this package on its own. -long_description_content_type = text/plain -author = Jupyter Development Team -author_email = jupyter@googlegroups.org -url = https://jupyter.org -project_urls = - Documentation = https://jupyter-core.readthedocs.io/ - Funding = https://numfocus.org/ - Source = https://github.com/jupyter/jupyter_core - Tracker = https://github.com/jupyter/jupyter_core/issues -license = BSD-3-Clause -license_file = COPYING.md -classifiers = - Framework :: Jupyter - Intended Audience :: Developers - Intended Audience :: System Administrators - Intended Audience :: Science/Research - License :: OSI Approved :: BSD License - Programming Language :: Python - Programming Language :: Python :: 3 - -[options] -py_modules = jupyter -packages = find: -include_package_data = True -python_requires = >=3.7 -install_requires = - traitlets - pywin32>=1.0 ; sys_platform == 'win32' and platform_python_implementation != 'PyPy' - -[options.entry_points] -console_scripts = - jupyter = jupyter_core.command:main - jupyter-migrate = jupyter_core.migrate:main - jupyter-troubleshoot = jupyter_core.troubleshoot:main - -[options.extras_require] -test = - ipykernel - pre-commit - pytest - pytest-cov - pytest-timeout - -[flake8] -ignore = E501, W503, E402 -builtins = c, get_config -exclude = - .cache, - .github, - docs, - setup.py -enable-extensions = G -extend-ignore = - G001, G002, G004, G200, G201, G202, - # black adds spaces around ':' - E203, -per-file-ignores = - # B011: Do not call assert False since python -O removes these calls - # F841 local variable 'foo' is assigned to but never used - jupyter_core/tests/*: B011, F841 diff --git a/setup.py b/setup.py deleted file mode 100644 index 0c20c65..0000000 --- a/setup.py +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) Jupyter Development Team. -# Distributed under the terms of the Modified BSD License. -import sys - -from setuptools import setup # type:ignore[import] -from setuptools.command.bdist_egg import bdist_egg # type:ignore[import] - - -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.") - - -# Loads metadata and options from setup.cfg: -setup( - cmdclass={ - "bdist_egg": bdist_egg if "bdist_egg" in sys.argv else bdist_egg_disabled, - }, -)