mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-02 17:09:09 +03:00
Merge pull request #267436 from natsukium/xdg
This commit is contained in:
commit
e33d15e18b
@ -1,20 +1,23 @@
|
|||||||
{ lib, buildPythonPackage, fetchFromGitHub, isPy27
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, pythonOlder
|
||||||
, clikit
|
, clikit
|
||||||
, poetry-core
|
, poetry-core
|
||||||
, pytestCheckHook
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
version = "6.0.0";
|
version = "6.0.0";
|
||||||
pname = "xdg";
|
pname = "xdg";
|
||||||
disabled = isPy27;
|
disabled = pythonOlder "3.7";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
# the github source uses `xdg_base_dirs`, but pypi's sdist maintains `xdg` for compatibility.
|
||||||
owner = "srstevenson";
|
# there are actually breaking changes in xdg_base_dirs,
|
||||||
repo = pname;
|
# and libraries that want to support python 3.9 and below need to use xdg.
|
||||||
rev = "refs/tags/${version}";
|
src = fetchPypi {
|
||||||
hash = "sha256-yVuruSKv99IZGNCpY9cKwAe6gJNAWjL+Lol2D1/0hiI=";
|
inherit pname version;
|
||||||
|
hash = "sha256-JCeAlPLUXoRtHrKKLruS17Z/wMq1JJ7jzojJX2SaHJI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ poetry-core ];
|
nativeBuildInputs = [ poetry-core ];
|
||||||
@ -23,7 +26,12 @@ buildPythonPackage rec {
|
|||||||
clikit
|
clikit
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [ pytestCheckHook ];
|
# sdist has no tests
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"xdg"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "XDG Base Directory Specification for Python";
|
description = "XDG Base Directory Specification for Python";
|
||||||
|
Loading…
Reference in New Issue
Block a user