dephell / dephell_venvs

Manage virtual environments
MIT License
1 stars 1 forks source link

pytest && python setup.py build fails on PyPI tarball #3

Open eli-schwartz opened 4 years ago

eli-schwartz commented 4 years ago
error: package directory 'dephell_venvs/ensurepip' does not exist

The conftest for the unittests modifies the source code and removes a module which is in the packages keyword in the PyPI download tarball.

Broken in #2 commit 38927896f9da818d97f96f3bdcd6ed3266fb045e -- I don't quite understand what the goal is here, though. ensurepip is bundled in the source tree to inject into the PYTHONPATH for installations that don't have it, which seems... well, okay, I don't know whether the average python installation is likely to remove this, though I don't understand why anyone would unilaterally remove part of the stdlib.

However, why does it then have code to import requests (a new dependency) and then download and revendor the module itself, at runtime? The unittests then seem to want to exercise that right to have the project broken at the source level and then repair it.

If on the other hand I clone the github repository and run dephell deps convert, then dephell_venvs.ensurepip is not in packages and doesn't get installed at all (because I have ensurepip already). But this would add a bootstrap cycle when trying to build dephell from scratch on new versions of python. Plus I'm not entirely sure when and where a vendored version of ensurepip is needed.

eli-schwartz commented 3 years ago

ping? Can this either be removed, or vendored in properly without dynamically revendoring itself?