diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..874d5b2 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,57 @@ +[build-system] +requires = ["setuptools", "wheel"] +build-backend = "setuptools.build_meta" + +[tool.setuptools] +include-package-data = true + +[tool.setuptools.packages.find] +where = ["src"] +include = ["extrainterpreters"] + +[[tool.setuptools."ext-modules"]] +name = "extrainterpreters._memoryboard" +sources = ["src/extrainterpreters/memoryboard.c"] +extra-compile-args = ["-O3",] +language = "c" + +[tool.setuptools.dynamic] +version = {attr = "extrainterpreters.__version__"} + +[project] +name = "python-extracontext" +dynamic = ["version"] +description = "PEP 554 Subinterpreters usable from Python code" +readme = {file = "README.md", content-type = "text/markdown"} +requires-python = ">= 3.12" +authors = [{ name = "Joao S. O. Bueno" }] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: Implementation :: CPython", + "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", + "Operating System :: OS Independent", +] + +[project.urls] +repository = "https://github.com/jsbueno/extrainterpreters" + + +[project.optional-dependencies] +dev = [ + "pytest", + "black", + "pyflakes", + "pytest-coverage", +] + +[tool.pytest.ini_options] +testpaths = "tests" +python_files = "test_*.py" +python_functions = "test_*" +addopts = "-v" + +[tool.mypy] +implicit_reexport = true diff --git a/setup.py b/setup.py deleted file mode 100644 index 86d6afa..0000000 --- a/setup.py +++ /dev/null @@ -1,37 +0,0 @@ -import setuptools -from pathlib import Path - -memoryboard_module = [ - setuptools.Extension( - 'extrainterpreters._memoryboard', sources=['src/extrainterpreters/memoryboard.c'], - include_dirs=[], - extra_compile_args=['-O3',], - language='c' - ) -] - -setuptools.setup( - name="extrainterpreters", - version="0.2-beta1", - author="João S. O. Bueno", - author_email="gwidion@gmail.com", - description="Utilities for concurrent code using subinterpreters", - long_description=Path("README.md").read_text(), - long_description_content_type="text/markdown", - url="https://github.com/jsbueno/extrainterpreters", - packages=setuptools.find_packages(where="src"), - ext_modules=memoryboard_module, - package_dir={'': 'src'}, - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", - "Operating System :: OS Independent", - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - - ], - python_requires='>=3.12-alpha', - tests_require=['pytest'], - setup_requires=['pytest-runner'], - install_requires=[ 'wheel'], -) diff --git a/src/extrainterpreters/__init__.py b/src/extrainterpreters/__init__.py index d0115f6..d8558a4 100644 --- a/src/extrainterpreters/__init__.py +++ b/src/extrainterpreters/__init__.py @@ -29,6 +29,9 @@ ) +__version__ = "0.2-beta2" + + BFSZ = 10_000_000 running_interpreters = weakref.WeakValueDictionary()