Closed kurtmckee closed 5 days ago
[!NOTE]
CI is failing, but it is unrelated to this change. The test suite fails locally prior to this change, too.
Rebased on main
Friendly reminder to take a peek at this. :grinning:
When running tox locally, this reduces the total test time by ~40% (from ~44 seconds to ~26 seconds):
BEFORE
py39: OK (3.41=setup[2.66]+cmd[0.75] seconds)
py310: OK (2.83=setup[2.04]+cmd[0.79] seconds)
py311: OK (2.79=setup[2.04]+cmd[0.75] seconds)
py312: OK (3.68=setup[2.17]+cmd[1.51] seconds)
pypy39: OK (7.71=setup[3.62]+cmd[4.09] seconds)
pypy310: OK (7.72=setup[3.65]+cmd[4.07] seconds)
pep8: OK (0.13=setup[0.00]+cmd[0.12] seconds)
packaging: OK (9.58=setup[2.34]+cmd[3.59,3.40,0.25] seconds)
noextra: OK (3.60=setup[2.20]+cmd[1.40] seconds)
mypy: OK (2.29=setup[2.18]+cmd[0.11] seconds)
congratulations :) (43.87 seconds)
AFTER
py39: OK (1.77=setup[1.03]+cmd[0.74] seconds)
py310: OK (1.21=setup[0.40]+cmd[0.80] seconds)
py311: OK (1.16=setup[0.40]+cmd[0.76] seconds)
py312: OK (1.91=setup[0.43]+cmd[1.48] seconds)
pypy39: OK (4.71=setup[0.72]+cmd[3.99] seconds)
pypy310: OK (4.59=setup[0.73]+cmd[3.86] seconds)
pep8: OK (0.12=setup[0.00]+cmd[0.12] seconds)
packaging: OK (7.58=setup[0.44]+cmd[3.56,3.33,0.25] seconds)
noextra: OK (1.78=setup[0.43]+cmd[1.35] seconds)
mypy: OK (0.54=setup[0.43]+cmd[0.11] seconds)
congratulations :) (25.49 seconds)
The test suite currently builds a
.tar.gz
file, but when it's installed in each tox environment, pip converts the.tar.gz
file to a wheel and then installs it.This PR eliminates the intermediary
.tar.gz
file and just builds the wheel once for all environments.For verification, you can run
tox -vvvvve py312
before and after.Package installation step (before)
:point_up: 2.39 seconds to convert the
.tar.gz
file to a.whl
and install itPackage installation step (after)
:point_up: 0.45 seconds to install the
.whl
file