This gives us a global toggle that we can use to control whether
temporary directories get deleted from one place (ideally, in the
commands taking --no-clean).
By default, make_archive uses str paths on Python 2, which causes it to
skip files with unencodable names. By passing in a unicode base_dir
explicitly, it is smart enough to use unicode all the way down instead.
This untested function was only used in one place. Inlining it makes it
easier to see the symmetry between the writing of the delete marker file
in `ensure_build_location` and checking for it in
`remove_temporary_source`.
req.source_dir is only set by:
1. `InstallRequirement.__init__`
2. `InstallRequirement.ensure_has_source_dir`
`InstallRequirement.__init__` is only called with source_dir for
editable requirements, for which we would not call
`RequirementPreparer.prepare_linked_requirement` (only
`prepare_editable_requirement`).
We will use this assertion for justifying later refactoring.
pytest (rather py.path.local) does not handle non-ASCII paths properly
on Windows with Python 2, but Python's builtin shutil.rmtree() does.
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
Previously, these were used when the user did not provide an explicit
ABI. Now this is handled internally in `packaging.tags` (by
`_cpython_abi` and `_generic_abi`).
Since we only call this function when platform is not None, we can drop
one of the branches. This is the only place using our manylinux
auto-deduction functions, so those can be removed next.
Now that we're fully using packaging.tags, everything in the supported
list is already Tag.
Further, since each function is responsible for its own set of
non-overlapping tags, we can also remove the de-duplication.
As with cpython_tags and compatible_tags, we assume this function covers
our use cases in the no-argument case and will customize our arguments
for it in a few steps.