chore: move to hatchling (#1297)
This commit is contained in:
@@ -4,7 +4,9 @@ set -o xtrace
|
||||
|
||||
$PYTHON --version
|
||||
$PYTHON -m pip --version
|
||||
$PYTHON -m virtualenv -p "$PYTHON" venv
|
||||
$PYTHON -m virtualenv --version
|
||||
$PYTHON -m virtualenv --no-setuptools --no-wheel -p "$PYTHON" venv
|
||||
venv/bin/python -m pip install -U pip
|
||||
venv/bin/python -m pip install -e ".[dev]"
|
||||
venv/bin/python -m pip freeze
|
||||
venv/bin/python --version
|
||||
|
||||
@@ -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.10.0
|
||||
hooks:
|
||||
|
||||
@@ -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
|
||||
+9
-7
@@ -1,13 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# /// script
|
||||
# dependencies = ["click", "packaging"]
|
||||
# dependencies = ["click", "packaging", "tomli; python_version<'3.11'"]
|
||||
# ///
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import configparser
|
||||
import glob
|
||||
import os
|
||||
import subprocess
|
||||
@@ -18,8 +17,14 @@ from pathlib import Path
|
||||
import click
|
||||
from packaging.version import InvalidVersion, Version
|
||||
|
||||
if sys.version_info < (3, 11):
|
||||
import tomli as tomllib
|
||||
else:
|
||||
import tomllib
|
||||
|
||||
config = [
|
||||
# file path, version find/replace format
|
||||
("pyproject.toml", 'version = "{}"'),
|
||||
("README.md", "cibuildwheel=={}"),
|
||||
("cibuildwheel/__init__.py", '__version__ = "{}"'),
|
||||
("docs/faq.md", "cibuildwheel=={}"),
|
||||
@@ -27,7 +32,6 @@ config = [
|
||||
("docs/setup.md", "cibuildwheel=={}"),
|
||||
("examples/*", "cibuildwheel=={}"),
|
||||
("examples/*", "cibuildwheel@v{}"),
|
||||
("setup.cfg", "version = {}"),
|
||||
]
|
||||
|
||||
RED = "\u001b[31m"
|
||||
@@ -37,10 +41,8 @@ OFF = "\u001b[0m"
|
||||
|
||||
@click.command()
|
||||
def bump_version() -> None:
|
||||
# Update if moving setup.cfg to pyproject.toml
|
||||
cfg = configparser.ConfigParser()
|
||||
cfg.read("setup.cfg")
|
||||
current_version = cfg["metadata"]["version"]
|
||||
with open("pyproject.toml", "rb") as f:
|
||||
current_version = tomllib.load(f)["project"]["version"]
|
||||
|
||||
try:
|
||||
commit_date_str = subprocess.run(
|
||||
|
||||
+90
-19
@@ -1,9 +1,94 @@
|
||||
[build-system]
|
||||
requires = [
|
||||
"setuptools>=42",
|
||||
]
|
||||
build-backend = "setuptools.build_meta"
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "cibuildwheel"
|
||||
version = "2.18.0"
|
||||
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 = [
|
||||
"cibuildwheel[test,bin]",
|
||||
]
|
||||
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.pytest.ini_options]
|
||||
minversion = "6.0"
|
||||
@@ -57,21 +142,6 @@ module = [
|
||||
ignore_missing_imports = true
|
||||
|
||||
|
||||
[tool.check-manifest]
|
||||
ignore = [
|
||||
".*",
|
||||
".circleci/**",
|
||||
"test/**",
|
||||
"unit_test/**",
|
||||
"docs/**",
|
||||
"examples/**",
|
||||
"bin/**",
|
||||
"*.yml",
|
||||
"CI.md", # TODO: can change test/test_ssl and remove this
|
||||
"requirements-dev.txt",
|
||||
"noxfile.py",
|
||||
]
|
||||
|
||||
[tool.pylint]
|
||||
py-version = "3.8"
|
||||
jobs = "0"
|
||||
@@ -162,6 +232,7 @@ flake8-unused-arguments.ignore-variadic-names = true
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"unit_test/*" = ["PLC1901"]
|
||||
"cibuildwheel/_compat/**.py" = ["TID251"]
|
||||
"bin/*" = ["TID251"]
|
||||
|
||||
[tool.repo-review]
|
||||
ignore = ["PC170", "PP303"]
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
[metadata]
|
||||
name = cibuildwheel
|
||||
version = 2.18.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/*
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user