diff --git a/.gitignore b/.gitignore index 83ff4ab4..b8f29c5e 100644 --- a/.gitignore +++ b/.gitignore @@ -106,4 +106,11 @@ env3?/ # MyPy cache .mypy_cache/ +# Output cache for setup.py checker all_known_setup.yaml + +# mkdocs +site/ + +# Virtual environments +venv* diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4e4c9a14..59ddddee 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: rev: 20.8b1 hooks: - id: black - files: ^bin/update_pythons.py$ + files: ^bin/update_pythons.py|setup.py$ - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.800 diff --git a/.readthedocs.yml b/.readthedocs.yml index 21c669a9..b59f4199 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -6,9 +6,9 @@ mkdocs: configuration: mkdocs.yml python: - version: 3.7 + version: 3.8 install: - method: pip path: . extra_requirements: - - dev + - docs diff --git a/docs/options.md b/docs/options.md index fecbe23e..7cba035b 100644 --- a/docs/options.md +++ b/docs/options.md @@ -356,27 +356,26 @@ CIBW_BEFORE_BUILD: "{package}/script/prepare_for_build.sh" ``` !!! note - If you need dependencies installed for the build, we recommend using pyproject.toml. This is an example pyproject.toml file: + If you need dependencies installed for the build, we recommend using + `pyproject.toml`. This is an example `pyproject.toml` file: [build-system] requires = [ "setuptools>=42", "wheel", "Cython", - "numpy==1.11.3; python_version<='3.6'", - "numpy==1.14.5; python_version=='3.7'", - "numpy==1.17.3; python_version=='3.8'", - "numpy==1.19.4; python_version>='3.9'", + "numpy==1.13.3; python_version<'3.5'", + "oldest-supported-numpy; python_version>='3.5'", ] build-backend = "setuptools.build_meta" - This [PEP 517][]/[PEP 518][] style build allows you to completely control the - build environment in cibuildwheel, [PyPA-build][], and pip, doesn't force - downstream users to install anything they don't need, and lets you do more - complex pinning (Cython, for example, requires a wheel to be built with an - equal or earlier version of NumPy; pinning in this way is the only way to - ensure your module works on all available NumPy versions). + This [PEP 517][]/[PEP 518][] style build allows you to completely control + the build environment in cibuildwheel, [PyPA-build][], and pip, doesn't + force downstream users to install anything they don't need, and lets you do + more complex pinning (Cython, for example, requires a wheel to be built + with an equal or earlier version of NumPy; pinning in this way is the only + way to ensure your module works on all available NumPy versions). [PyPA-build]: https://pypa-build.readthedocs.io/en/latest/ [PEP 517]: https://www.python.org/dev/peps/pep-0517/ diff --git a/examples/github-deploy.yml b/examples/github-deploy.yml index 1d025814..b83c4bbd 100644 --- a/examples/github-deploy.yml +++ b/examples/github-deploy.yml @@ -16,7 +16,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-18.04, windows-2019, macos-10.15] + os: [ubuntu-20.04, windows-2019, macos-10.15] steps: - uses: actions/checkout@v2 diff --git a/examples/github-minimal.yml b/examples/github-minimal.yml index 07d52495..03ce1724 100644 --- a/examples/github-minimal.yml +++ b/examples/github-minimal.yml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-18.04, windows-2019, macos-10.15] + os: [ubuntu-20.04, windows-2019, macos-10.15] steps: - uses: actions/checkout@v2 diff --git a/examples/github-with-qemu.yml b/examples/github-with-qemu.yml index f04aac3d..2b3f55af 100644 --- a/examples/github-with-qemu.yml +++ b/examples/github-with-qemu.yml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-18.04, windows-2019, macos-10.15] + os: [ubuntu-20.04, windows-2019, macos-10.15] steps: - uses: actions/checkout@v2 diff --git a/requirements-dev.txt b/requirements-dev.txt index aefbcb6d..18dc383f 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1 +1 @@ --e .[dev] +-e .[dev,docs] diff --git a/setup.cfg b/setup.cfg index 9f8602b1..89d0ec02 100644 --- a/setup.cfg +++ b/setup.cfg @@ -38,23 +38,6 @@ install_requires = [options.package_data] cibuildwheel = resources/* -[options.extras_require] -dev = - click - mkdocs-include-markdown-plugin==2.1.1 - mkdocs==1.0.4 - pip-tools - pygithub - ghapi - pymdown-extensions - pytest>=4 - pytest-timeout - pyyaml - requests - typing-extensions - rich>=9.6 - mypy>=0.800 - [options.packages.find] include = cibuildwheel diff --git a/setup.py b/setup.py index 60684932..bf34fe94 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,31 @@ from setuptools import setup -setup() +extras = { + "docs": [ + "mkdocs-include-markdown-plugin==2.1.1", + "mkdocs==1.0.4", + "pymdown-extensions", + ], + "test": [ + "jinja2", + "pytest>=4", + "pytest-timeout", + ], + "dev": [ + "click", + "ghapi", + "mypy>=0.800", + "packaging>=20.8", + "pip-tools", + "pygithub", + "pyyaml", + "requests", + "rich>=9.6", + "typing-extensions", + ], +} + +extras["all"] = sum(extras.values(), []) +extras["dev"] += extras["test"] + +setup(extras_require=extras)