Comments (10)
https://github.com/platformdirs/platformdirs/blob/main/src/platformdirs/__init__.py#L19-L28 seems the latest release can't have this issue
from platformdirs.
Sounds to me like a feature request. How do you detect nix? We should not assume UNIX just because everything else failed 🤷♂️
from platformdirs.
I don't know enough about poetry2nix, Python packaging or platformdirs to answer that. How does platformdirs (or pip?) detect the platform?
from platformdirs.
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.
We have no platform specifier in our setup.cfg either, so the problem doesn't seem to be with us.
from platformdirs.
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.
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.
In case you have time, here's how to reproduce on any Linux:
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.
Can you provide a pure pip non poetry example, otherwise might be a poetry bug.
from platformdirs.
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)
- Testing could fail with pytest-randomly HOT 1
- Windows support link broken HOT 2
- `user_runtime_dir` for root on Unix
- user_runtime_dir for *BSD HOT 3
- Feature: add user_downloads_dir HOT 1
- Feature: user_desktop_dir HOT 2
- Cannot import name '__version__' from 'platformdirs.version' HOT 6
- Unix user_log_dir doesn't create log dir HOT 1
- Optionally redirect `user_*_dir()` calls to `site_*_dir()` for root on Unix HOT 2
- Add `site_state_dir()` counterpart for `user_state_dir()` HOT 1
- Add `site_log_dir()` counterpart for `user_log_dir()`
- pre-commit updates of pyproject.toml:[build-system]:requires HOT 3
- Support Homebrew prefixes
- HOME and StartMenu? HOT 1
- Missing changelog for 4.0 HOT 3
- Feature Request: Be able to create directories HOT 1
- multipath cannot work for path HOT 5
- Adding to stdlib/pathlib? HOT 13
- Paths can be overridden using environment variables on Linux, but not MacOS? HOT 8
- `MacOS.site_data_path` returns `:` separated path under Homebrew with multipath HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from platformdirs.