Skip to content

Building wheels takes a long time with .tox directories present #13

@nedbat

Description

@nedbat

Building the manylinux wheels for coverage.py took 1hour 45minutes. Once I removed all my .tox directories, it took 3 minutes.

The problem is that "pip wheel" copies the entire tree somewhere else first. If we use "python setup.py bdist_wheel", it skips that step. If I do that, then even with .tox directories, building wheels takes only 2 minutes.

Here's an IRC exchange about it:

[13:18:39] nedbat	I have two different ways to build wheels:  "pip wheel . -w wheelhouse" and "python setup.py bdist_wheel".  They both produce the same name wheel, with the same size.  But the first command takes 3min42sec, the second command takes 11sec.
[13:19:11] nedbat	The time for the first one seems to depends on how many files are in the entire tree, including .tox directories... What's the difference between these commands, and is there a reason to prefer the first one?
[13:25:42] dstufft	nedbat: the first command copies the files to a temporary directory, does some gross stuff to ensure you're using setuptools in your setup.py, and then invokes setup.py bdist_wheel
[13:26:13] nedbat	dstufft: any idea why it seems take forever when there are many irrelevant files in the tree?
[13:26:18] Wooble	(doesn't pip wheel also recursively build wheels for all of your deps, and bdist_wheel... not?)
[13:26:31] nedbat	Wooble: the results are the same size (though not the same sha1)
[13:26:33] dstufft	nedbat: presumably because we're copying the entire tree to a temporary directory
[13:26:42] nedbat	dstufft: oh, yikes.
[13:27:50] xafer	(cf https://github.com/pypa/pip/issues/2195)
[13:27:59] dstufft	and yea we also build wheels for all dependencies
[13:28:06] nedbat	dstufft: is there a reason i should use "pip wheel" if the other is working for me?
[13:28:07] xafer	(install/wheel, potato/potato)
[13:28:14] dstufft	but those will be seperate .wl files
[13:28:50] dstufft	nedbat: Not particularly, ``pip wheel`` is typically less used by the maintainer of Foo, and more for consumers of Foo-That-Doesnt-Have-A-Wheel-Already
[13:29:14] nedbat	dstufft: ok, good to know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions