1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools-scm,
6 six,
7}:
8
9buildPythonPackage rec {
10 pname = "python-dateutil";
11 version = "2.9.0.post0";
12 pyproject = true;
13
14 src = fetchPypi {
15 inherit pname version;
16 hash = "sha256-N91UII2n4c2HU4ghfV4A69QXkkn5D7ckN+kaNUWaCtM=";
17 };
18
19 postPatch = ''
20 substituteInPlace pyproject.toml \
21 --replace-fail "setuptools_scm<8.0" "setuptools_scm"
22 '';
23
24 nativeBuildInputs = [ setuptools-scm ];
25
26 propagatedBuildInputs = [ six ];
27
28 # cyclic dependency: tests need freezegun, which depends on python-dateutil
29 doCheck = false;
30
31 pythonImportsCheck = [
32 "dateutil.easter"
33 "dateutil.parser"
34 "dateutil.relativedelta"
35 "dateutil.rrule"
36 "dateutil.tz"
37 "dateutil.utils"
38 "dateutil.zoneinfo"
39 ];
40
41 meta = with lib; {
42 changelog = "https://github.com/dateutil/dateutil/blob/${version}/NEWS";
43 description = "Powerful extensions to the standard datetime module";
44 homepage = "https://github.com/dateutil/dateutil/";
45 license = with licenses; [
46 asl20
47 bsd3
48 ];
49 maintainers = with maintainers; [ dotlambda ];
50 };
51}