Giter Club home page Giter Club logo

Comments (10)

gaborbernat avatar gaborbernat commented on September 23, 2024 1

https://github.com/platformdirs/platformdirs/blob/main/src/platformdirs/__init__.py#L19-L28 seems the latest release can't have this issue

from platformdirs.

gaborbernat avatar gaborbernat commented on September 23, 2024

Sounds to me like a feature request. How do you detect nix? We should not assume UNIX just because everything else failed 🤷‍♂️

from platformdirs.

l0b0 avatar l0b0 commented on September 23, 2024

I don't know enough about poetry2nix, Python packaging or platformdirs to answer that. How does platformdirs (or pip?) detect the platform?

from platformdirs.

l0b0 avatar l0b0 commented on September 23, 2024

I'm trying to install the latest release:

ERROR: Could not find a version that satisfies the requirement platformdirs>=2.2.0 (from pylint==2.10.2) (from versions: none)
ERROR: No matching distribution found for platformdirs>=2.2.0 (from pylint==2.10.2)

Please reopen.

from platformdirs.

gaborbernat avatar gaborbernat commented on September 23, 2024

We have no platform specifier in our setup.cfg either, so the problem doesn't seem to be with us.

from platformdirs.

l0b0 avatar l0b0 commented on September 23, 2024

I'm having no problem installing hundreds of other packages though :)

I'll have a dig around the pylint dependency spec, maybe the issue's there. Update: Nope, looks legit.

from platformdirs.

gaborbernat avatar gaborbernat commented on September 23, 2024

I'm happy to address it if you can point out what we're doing wrong, but I don't have access to this restrictive environment, so can't tell.

from platformdirs.

l0b0 avatar l0b0 commented on September 23, 2024

In case you have time, here's how to reproduce on any Linux:

Prerequisites: Nix and Poetry

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:

ERROR: Could not find a version that satisfies the requirement platformdirs<3,>=2 (from virtualenv==20.7.2) (from versions: none)
ERROR: No matching distribution found for platformdirs<3,>=2 (from virtualenv==20.7.2)

It is, however, very interesting that my first attempt, where I initialized Poetry with --dependency='platformdirs=*' rather than the virtualenv package it worked perfectly. So maybe the problem is at the virtualenv side.

from platformdirs.

gaborbernat avatar gaborbernat commented on September 23, 2024

Can you provide a pure pip non poetry example, otherwise might be a poetry bug.

from platformdirs.

l0b0 avatar l0b0 commented on September 23, 2024

It doesn't seem to be a Poetry bug, because a simple poetry install in the same directory does work. Which points even stronger towards it being a poetry2nix issue :/

from platformdirs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.