- retrieve dependency information for nixpkgs packages only from sdist and not from wheel provider
- skip dependency removal if package dependencies are unknown
Otherwise, it is likely that there will be collisions building the python environment,
as the dependencies of packages in packagesExtra won't match with the dependencies
calculated by mach-nix.
As a side-effect, this also causes the dependencies of mach-nix built packages included
by the `nixpkgs` provider to be included in dependency resolution.
This changes the internal format used to pass version information for nix to
python to not require parsing strings. This new format also makes it easier
to pass additional information (such as requirements, when available).
Given that we update the dependencies of all the packages we add to the
override, and remove any dependencies of those packages that we don't override,
there is no need to recursivly update the dependencies, since the dependcies we
are adding have already had their dependencies updated.
This switches to using `packaging.version` for version numbers
and `packaging.specifiers` for handling specifiers, the later
which implements the PEP440 logic for prereleases.
https://www.python.org/dev/peps/pep-0600/
This fixes e.g. using the latest tokenizers package (0.10.3) with
mach-nix.
TODO: Update WheelDependencyProvider to process all filename tags
individually instead of matching them all with a single regexp. If it
had done that already, this change would have been somewhat unneeded, as
all wheel files seem to be doubly tagged (at least for now):
* manylinux_2_5 is also tagged manylinux1
* manylinux_2_12 is also tagged manylinux2010
* manylinux_2_17 is also tagged manylinux2014
(But since the new format is first in the filename, the old regexps
don't match.)