From 7eeb48f09150189c03973dc7855f7ee9bfb30282 2024-02-11 03:13:36 From: Matthias Koeppe Date: 2024-02-11 03:13:36 Subject: [PATCH] pyproject.toml: Move metadata, setuptools config here from setup.cfg --- diff --git a/pyproject.toml b/pyproject.toml index 15ea5c1..3c3d051 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,108 @@ [build-system] -requires = ["setuptools >= 51.0.0"] +requires = ["setuptools>=61.2"] # We need access to the 'setupbase' module at build time. # Hence we declare a custom build backend. build-backend = "_build_meta" # just re-exports setuptools.build_meta definitions backend-path = ["."] +[project] +name = "ipython" +description = "IPython: Productive Interactive Computing" +keywords = ["Interactive", "Interpreter", "Shell", "Embedding"] +classifiers = [ + "Framework :: IPython", + "Framework :: Jupyter", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: BSD License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Topic :: System :: Shells", +] +requires-python = ">=3.10" +dependencies = [ + 'colorama; sys_platform == "win32"', + "decorator", + "exceptiongroup; python_version<'3.11'", + "jedi>=0.16", + "matplotlib-inline", + 'pexpect>4.3; sys_platform != "win32" and sys_platform != "emscripten"', + "prompt_toolkit>=3.0.41,<3.1.0", + "pygments>=2.4.0", + "stack_data", + "traitlets>=5", + "typing_extensions; python_version<'3.10'", +] +dynamic = ["authors", "entry-points", "license", "scripts", "version"] + +[project.readme] +file = "long_description.rst" +content-type = "text/x-rst" + +[project.urls] +Homepage = "https://ipython.org" +Documentation = "https://ipython.readthedocs.io/" +Funding = "https://numfocus.org/" +Source = "https://github.com/ipython/ipython" +Tracker = "https://github.com/ipython/ipython/issues" + +[project.optional-dependencies] +black = [ + "black", +] +doc = [ + "ipykernel", + "setuptools>=18.5", + "sphinx>=1.3", + "sphinx-rtd-theme", + "docrepr", + "matplotlib", + "stack_data", + "typing_extensions", + "exceptiongroup", + "ipython[test]", +] +kernel = [ + "ipykernel", +] +nbconvert = [ + "nbconvert", +] +nbformat = [ + "nbformat", +] +notebook = [ + "ipywidgets", + "notebook", +] +parallel = [ + "ipyparallel", +] +qtconsole = [ + "qtconsole", +] +terminal = [] +test = [ + "pytest<8", + "pytest-asyncio<0.22", + "testpath", + "pickleshare", +] +test_extra = [ + "ipython[test]", + "curio", + "matplotlib!=3.2.0", + "nbformat", + "numpy>=1.23", + "pandas", + "trio", +] +all = [ + "ipython[black,doc,kernel,nbconvert,nbformat,notebook,parallel,qtconsole,terminal]", + "ipython[test,test_extra]", +] + [tool.mypy] python_version = "3.10" ignore_missing_imports = true @@ -85,3 +183,23 @@ asyncio_mode = "strict" [tool.pyright] pythonPlatform="All" + +[tool.setuptools] +zip-safe = false +platforms = ["Linux", "Mac OSX", "Windows"] +license-files = ["LICENSE"] +include-package-data = false + +[tool.setuptools.packages.find] +exclude = ["setupext"] +namespaces = false + +[tool.setuptools.package-data] +ipython = ["py.typed"] +"ipython.core" = ["profile/README*"] +"ipython.core.tests" = ["*.png", "*.jpg", "daft_extension/*.py"] +"ipython.lib.tests" = ["*.wav"] +"ipython.testing.plugin" = ["*.txt"] + +[tool.setuptools.dynamic] +version = {attr = "IPython.core.release.__version__"} diff --git a/setup.cfg b/setup.cfg index de77754..35e570d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,111 +1,3 @@ -[metadata] -name = ipython -version = attr: IPython.core.release.__version__ -url = https://ipython.org -description = IPython: Productive Interactive Computing -long_description_content_type = text/x-rst -long_description = file: long_description.rst -license_file = LICENSE -project_urls = - Documentation = https://ipython.readthedocs.io/ - Funding = https://numfocus.org/ - Source = https://github.com/ipython/ipython - Tracker = https://github.com/ipython/ipython/issues -keywords = Interactive, Interpreter, Shell, Embedding -platforms = Linux, Mac OSX, Windows -classifiers = - Framework :: IPython - Framework :: Jupyter - Intended Audience :: Developers - Intended Audience :: Science/Research - License :: OSI Approved :: BSD License - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3 :: Only - Topic :: System :: Shells - -[options] -packages = find: -python_requires = >=3.10 -zip_safe = False -install_requires = - colorama; sys_platform == "win32" - decorator - exceptiongroup; python_version<'3.11' - jedi>=0.16 - matplotlib-inline - pexpect>4.3; sys_platform != "win32" and sys_platform != "emscripten" - prompt_toolkit>=3.0.41,<3.1.0 - pygments>=2.4.0 - stack_data - traitlets>=5 - typing_extensions ; python_version<'3.10' - -[options.extras_require] -black = - black -doc = - ipykernel - setuptools>=18.5 - sphinx>=1.3 - sphinx-rtd-theme - docrepr - matplotlib - stack_data - typing_extensions - exceptiongroup - %(test)s -kernel = - ipykernel -nbconvert = - nbconvert -nbformat = - nbformat -notebook = - ipywidgets - notebook -parallel = - ipyparallel -qtconsole = - qtconsole -terminal = -test = - pytest<8 - pytest-asyncio<0.22 - testpath - pickleshare -test_extra = - %(test)s - curio - matplotlib!=3.2.0 - nbformat - numpy>=1.23 - pandas - trio -all = - %(black)s - %(doc)s - %(kernel)s - %(nbconvert)s - %(nbformat)s - %(notebook)s - %(parallel)s - %(qtconsole)s - %(terminal)s - %(test_extra)s - %(test)s - -[options.packages.find] -exclude = - setupext - -[options.package_data] -IPython = py.typed -IPython.core = profile/README* -IPython.core.tests = *.png, *.jpg, daft_extension/*.py -IPython.lib.tests = *.wav -IPython.testing.plugin = *.txt - [velin] ignore_patterns = IPython/core/tests