Merge pull request #256787 from pbsds/bump-maya-1695425772
python3Packages.maya: 0.3.3 -> 0.6.1
This commit is contained in:
commit
14149be3e5
@ -1,32 +1,58 @@
|
||||
{ lib, fetchPypi, fetchpatch, buildPythonPackage
|
||||
, dateparser, humanize, pendulum, ruamel-yaml, tzlocal }:
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, buildPythonPackage
|
||||
, dateparser
|
||||
, humanize
|
||||
, pendulum
|
||||
, pytz
|
||||
, snaptime
|
||||
, tzlocal
|
||||
, pytestCheckHook
|
||||
, freezegun
|
||||
, pytest-mock
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "maya";
|
||||
version = "0.3.3";
|
||||
version = "0.6.1";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1x88k4irpckvd7jf2yvqjw1s52hjqbxym1r1d928yb3fkj7rvlxs";
|
||||
src = fetchFromGitHub {
|
||||
owner = "kennethreitz";
|
||||
repo = "maya";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-4fUyUqVQk/AcQL3xMnU1cQlF5yiD/N9NPAsUPuDTTNY=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# https://github.com/kennethreitz/maya/issues/112
|
||||
# Merged, so should be in next release.
|
||||
url = "https://github.com/kennethreitz/maya/commit/f69a93b1103130139cdec30511777823957fb659.patch";
|
||||
sha256 = "152ba7amv9dhhx1wcklfalsdzsxggik9f7rsrikms921lq9xqc8h";
|
||||
})
|
||||
# fix humanize incompatibility
|
||||
# https://github.com/timofurrer/maya/commit/d9cd563d1b1ba16bcff4dacb4ef49edd4e32fd1d.patch
|
||||
# ^ does not apply on 0.6.1
|
||||
postPatch = ''
|
||||
substituteInPlace maya/core.py \
|
||||
--replace \
|
||||
"humanize.time.abs_timedelta" \
|
||||
"humanize.time._abs_timedelta"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dateparser
|
||||
humanize
|
||||
pendulum
|
||||
pytz
|
||||
snaptime
|
||||
tzlocal
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ dateparser humanize pendulum ruamel-yaml tzlocal ];
|
||||
|
||||
# No tests
|
||||
doCheck = false;
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
freezegun
|
||||
pytest-mock
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Datetimes for Humans";
|
||||
homepage = "https://github.com/kennethreitz/maya";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ pbsds ];
|
||||
};
|
||||
}
|
||||
|
34
pkgs/development/python-modules/snaptime/default.nix
Normal file
34
pkgs/development/python-modules/snaptime/default.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, python-dateutil
|
||||
, pytz
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "snaptime";
|
||||
version = "0.2.4";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-4/HriQQ9WNMHIauYy2UCPxpMJ0DjsZdwQpixY8ktUIs=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
python-dateutil
|
||||
pytz
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "snaptime" ];
|
||||
|
||||
# no tests on Pypi, no tags on github
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Transform timestamps with a simple DSL";
|
||||
homepage = "https://github.com/zartstrom/snaptime";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ pbsds ];
|
||||
};
|
||||
}
|
@ -12161,6 +12161,8 @@ self: super: with self; {
|
||||
|
||||
snapshottest = callPackage ../development/python-modules/snapshottest { };
|
||||
|
||||
snaptime = callPackage ../development/python-modules/snaptime { };
|
||||
|
||||
sniffio = callPackage ../development/python-modules/sniffio { };
|
||||
|
||||
snitun = callPackage ../development/python-modules/snitun { };
|
||||
|
Loading…
Reference in New Issue
Block a user