Distlib not comparing version '3.10' correctly
See original GitHub issueConsider the following derivation:
{ pkgs ? import <nixpkgs> {} }: /* import all standard nix packages */
let
mach-nix = import (
builtins.fetchGit {
url = "https://github.com/DavHau/mach-nix/";
ref = "3.2.0";
}) {
pypiDataRev = "e723ab9fa1527957ee6d9f498ddb6fbf52f739a7";
pypiDataSha256 = "1wxqbj8h3cgdhq69xxl7c2z7lxn8snvb5lqq5qk40bgsxp5168hp";
python = "python38"; /* define python version */
};
pythonPackages = mach-nix.mkPython { /* import all necessary python packages */
requirements = ''
cobra
biopython
'';
providers = {
"ruamel.yaml" = "nixpkgs"; /* need to build this specific package from source due to cobra */
};
};
RPackages = with pkgs; [ /* import all necessary R packages */
];
linuxPackages = with pkgs; [ /* import all necessary standard linux packages */
];
in
pkgs.mkShell {
buildInputs = [ pythonPackages ] ++ RPackages ++ linuxPackages;
}
It works fine, except for the fact that I have to specify ruamel.yaml
manually. If however I switch to 3.3.0
, it breaks with
ERROR: Could not find a version that satisfies the requirement ruamel.yaml.clib>=0.1.2; platform_python_implementation == "CPython" and python_version < "3.10" (from ruamel-yaml)
ERROR: No matching distribution found for ruamel.yaml.clib>=0.1.2; platform_python_implementation == "CPython" and python_version < "3.10"
and the provider trick does not work.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Release 0.3.7.dev0 Vinay Sajip
Fixed #149: Handle version comparisons correctly in environment markers. • scripts. – Add ARM-64 launchers and support code to use them.
Read more >Announcement: distlib 0.3.4 released on PyPI - Packaging
Fixed #154: Determine Python versions correctly for Python >= 3.10. Updated launcher executables with changes to handle duplication logic.
Read more >building wheel for backports.zoneinfo (pyproject.toml) did not run ...
ERROR: Could not build wheels for backports.zoneinfo, which is required to ... uses python version 3.10.x and backports.zoneinfo is not working properly ......
Read more >Packages for 64-bit Linux on x86_64 CPUs with Python 3.10
Name Version Summary / License
_libgcc_mutex 0.1 Mutex for libgcc and libgcc‑ng / None
_openmp_mutex 5.1 OpenMP Implementation Mutex / BSD‑3‑Clause
aiofiles 0.7.0 File support for...
Read more >How do I compare version numbers in Python?
1 . Since I'm comparing strings, 2 sorts above 10, but that's not correct for versions. >>> "2.3 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We hit the same issue today as well 😉
Appreciate it, this fixes it beautifully.