diff --git a/.circleci/prepare.sh b/.circleci/prepare.sh index 991f0202a..ffedbcd12 100644 --- a/.circleci/prepare.sh +++ b/.circleci/prepare.sh @@ -4,7 +4,7 @@ set -o xtrace $PYTHON --version $PYTHON -m pip --version -$PYTHON -m virtualenv -p "$PYTHON" venv +$PYTHON -m virtualenv --download -p "$PYTHON" venv venv/bin/python -m pip install -e ".[dev]" venv/bin/python -m pip freeze venv/bin/python --version diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 90b965c2a..9fbeb6b6a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,12 +20,6 @@ repos: args: ["--fix", "--show-fixes"] - id: ruff-format -- repo: https://github.com/asottile/setup-cfg-fmt - rev: v2.5.0 - hooks: - - id: setup-cfg-fmt - args: [--include-version-classifiers, --min-py-version=3.8, --max-py-version=3.12] - - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.9.0 hooks: diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 6fc0b3942..000000000 --- a/MANIFEST.in +++ /dev/null @@ -1,6 +0,0 @@ -recursive-include cibuildwheel *.cfg -recursive-include cibuildwheel *.in -recursive-include cibuildwheel *.py -recursive-include cibuildwheel *.toml -recursive-include cibuildwheel *.txt -recursive-include cibuildwheel *.typed diff --git a/pyproject.toml b/pyproject.toml index ca0f39d9d..4113e2c30 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,115 @@ [build-system] -requires = [ - "setuptools>=42", +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "cibuildwheel" +dynamic = ["version"] +description = "Build Python wheels on CI with minimal configuration." +readme = "README.md" +license = "BSD-2-Clause" +requires-python = ">=3.8" +authors = [ + { name = "Joe Rickerby", email = "joerick@mac.com" }, +] +keywords = [ + "appveyor", + "ci", + "linux", + "macos", + "packaging", + "pypi", + "travis", + "wheel", + "windows", +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Natural Language :: English", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: Implementation :: CPython", + "Topic :: Software Development :: Build Tools", +] +dependencies = [ + "bashlex!=0.13", + "bracex", + "certifi", + "filelock", + "packaging>=20.9", + "platformdirs", + "tomli;python_version < '3.11'", + "typing-extensions>=4.1.0;python_version < '3.11'", +] + +[project.optional-dependencies] +bin = [ + "click", + "packaging>=21.0", + "pip-tools", + "pygithub", + "pyyaml", + "requests", + "rich>=9.6", +] +dev = [ + "build", + "click", + "jinja2", + "packaging>=21.0", + "pip-tools", + "pygithub", + "pytest-timeout", + "pytest-xdist", + "pytest>=6", + "pyyaml", + "requests", + "rich>=9.6", + "tomli_w", + "validate-pyproject", ] -build-backend = "setuptools.build_meta" +docs = [ + "jinja2>=3.1.2", + "mkdocs-include-markdown-plugin==2.8.0", + "mkdocs-macros-plugin", + "mkdocs==1.3.1", + "pymdown-extensions", +] +test = [ + "build", + "jinja2", + "pytest-timeout", + "pytest-xdist", + "pytest>=6", + "tomli_w", + "validate-pyproject", +] + +[project.scripts] +cibuildwheel = "cibuildwheel.__main__:main" + +[project.entry-points."validate_pyproject.tool_schema"] +cibuildwheel = "cibuildwheel.schema:get_schema" +[project.urls] +Changelog = "https://github.com/pypa/cibuildwheel#changelog" +Documentation = "https://cibuildwheel.pypa.io" +Homepage = "https://github.com/pypa/cibuildwheel" + +[tool.hatch.version] +path = "cibuildwheel/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/cibuildwheel", +] [tool.pytest.ini_options] minversion = "6.0" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 5a8196198..000000000 --- a/setup.cfg +++ /dev/null @@ -1,57 +0,0 @@ -[metadata] -name = cibuildwheel -version = 2.17.0 -description = Build Python wheels on CI with minimal configuration. -long_description = file: README.md -long_description_content_type = text/markdown -url = https://github.com/pypa/cibuildwheel -author = Joe Rickerby -author_email = joerick@mac.com -license = BSD-2-Clause -license_files = LICENSE -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - License :: OSI Approved :: BSD License - Natural Language :: English - Programming Language :: Python :: 3 - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3.12 - Programming Language :: Python :: Implementation :: CPython - Topic :: Software Development :: Build Tools -keywords = ci,wheel,packaging,pypi,travis,appveyor,macos,linux,windows -project_urls = - Changelog=https://github.com/pypa/cibuildwheel#changelog - Documentation=https://cibuildwheel.pypa.io/ - -[options] -packages = find: -install_requires = - bashlex!=0.13 - bracex - certifi - filelock - packaging>=20.9 - platformdirs - tomli;python_version < '3.11' - typing-extensions>=4.1.0;python_version < '3.11' -python_requires = >=3.8 -include_package_data = True -zip_safe = False - -[options.packages.find] -include = - cibuildwheel - -[options.entry_points] -console_scripts = - cibuildwheel = cibuildwheel.__main__:main -validate_pyproject.tool_schema = - cibuildwheel = cibuildwheel.schema:get_schema - -[options.package_data] -cibuildwheel = resources/* diff --git a/setup.py b/setup.py deleted file mode 100644 index 90f83feda..000000000 --- a/setup.py +++ /dev/null @@ -1,38 +0,0 @@ -from __future__ import annotations - -from setuptools import setup - -extras = { - "docs": [ - "mkdocs-include-markdown-plugin==2.8.0", - "mkdocs==1.3.1", - "jinja2>=3.1.2", - "pymdown-extensions", - "mkdocs-macros-plugin", - ], - "test": [ - "jinja2", - "pytest>=6", - "pytest-timeout", - "pytest-xdist", - "build", - "tomli_w", - "validate-pyproject", - ], - "bin": [ - "click", - "pip-tools", - "pygithub", - "pyyaml", - "requests", - "rich>=9.6", - "packaging>=21.0", - ], -} - -extras["dev"] = [ - *extras["test"], - *extras["bin"], -] - -setup(extras_require=extras)