Skip to content

Latest commit

 

History

History
159 lines (102 loc) · 4.13 KB

README.rst

File metadata and controls

159 lines (102 loc) · 4.13 KB

Overview

tests
package

A tox plugin that builds and installs wheels instead of sdist.

  • Free software: BSD 2-Clause License

Installation

pip install tox-wheel

You can also install the in-development version with:

pip install https://github.com/ionelmc/tox-wheel/archive/master.zip

Documentation

Enabling

To enable either use tox --wheel or change your tox.ini if you always want the plugin to be enabled:

[testenv]
wheel = true

You can also use factors in tox.ini:

[tox]
envlist = {py27,py35,py36,py37,py38,pypy,pypy3}-{cover,nocov}

[testenv]
wheel =
    cover: false
    nocov: true

Build configuration

This plugin will build wheels for all the active environments. Note that building will be done in a batch before any testing starts (in order to support tox --parallel mode).

If you can produce universal wheels you might want to configure the build env so that the wheel is only built once for all the envs:

[testenv]
wheel_build_env = build

[testenv:build]

Note that you can also use wheel_build_env for situation where you have many environments for the same interpreter:

[testenv:py38]
; regular testing

[testenv:py38-extras]
; tests with optional dependencies
wheel_build_env = py38

[testenv:docs]
; docs building
wheel_build_env = py38

The plugin cleans the build dir by default, in case you want to speed things further (at the risk of build caching problems) you could use tox --wheel-dirty.

You can also place this configuration in tox.ini but there will be a unpleasant surprise factor if you ever hit the aforementioned build problems:

[testenv]
wheel_dirty = true

PEP517 support

If you have a custom [build-system] build-backend in your pyproject.toml you need to enable the PEP517 builder by having this in your tox.ini:

[testenv]
wheel_pep517 = true

Enabling this will delegate building to pip wheel --use-pep517.

Development

To run the all tests run:

tox