-
-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No matching distribution found for platformdirs<3,>=2 #340
Comments
Having the same problem in another project with platformdirs==2.2.0:
|
Another project pull request where this shows up - you can see the reproducible result in the pipeline:
|
Since platformdirs is platform dependent it's possible that pip doesn't detect the platform as anything known and therefore can't install any of the available packages. Is it possible to force the platform to Linux in an override? |
It looks like the following override (from here) might be part of a fix, but I have to link the pylint package to this custom build. platformdirs = pkgs.callPackage (
{buildPythonPackage, fetchPypi}:
buildPythonPackage rec {
pname = "platformdirs";
version = "2.2.0";
src = fetchPypi {
sha256 = "07hq5qrp7pqj63iczg01wbf5ii6f0ncd0dq5mzkdhsslmg9slbb3";
inherit pname version;
};
doCheck = false;
}) { inherit (super) buildPythonPackage fetchPypi; }; I've tried various syntaxes, but I don't really know how to replace a dependency with one I just built. Or how to figure out which type of dependency it is ( |
cd "$(mktemp --directory)"
poetry init --name=test --author="Me <${USER}@${HOSTNAME}>" --python=^3.9 --dependency='virtualenv=*' --license=AGPLv3+ --no-interaction
poetry lock
cat > shell.nix <<'EOF'
let
pkgs = import <nixpkgs> { };
poetryEnv = pkgs.poetry2nix.mkPoetryEnv {
python = pkgs.python39;
projectDir = ./.;
overrides = pkgs.poetry2nix.overrides.withDefaults (self: super: {
backports-entry-points-selectable = super.backports-entry-points-selectable.overridePythonAttrs (old: {
postPatch = ''
substituteInPlace setup.py --replace \
'setuptools.setup()' \
'setuptools.setup(version="${old.version}")'
'';
});
});
};
in
pkgs.mkShell {
buildInputs = [
poetryEnv
];
}
EOF
nix-shell The output includes:
It is, however, very interesting that my first attempt, where I initialized Poetry with This is almost definitely a poetry2nix issue, because $ poetry install
Installing dependencies from lock file
Package operations: 6 installs, 0 updates, 0 removals
• Installing backports.entry-points-selectable (1.1.0)
• Installing distlib (0.3.2)
• Installing filelock (3.0.12)
• Installing platformdirs (2.2.0)
• Installing six (1.16.0)
• Installing virtualenv (20.7.2) |
I do not fully understand why the version specification breaks the installation, because `poetry install` works just fine. Closes nix-community#340.
I do not fully understand why the version specification breaks the installation, because `poetry install` and `pip install --requirement=<(poetry export)` both work just fine. Closes nix-community#340.
To reproduce:
git checkout
this commitnix-shell
What happens:
What should happen: The package should install successfully.
Additional info:
poetry install
succeeds in installing all the packages.The text was updated successfully, but these errors were encountered: