lol

Merge pull request #309885 from Thornycrackers-Forks/python311Packages.filedate

python311Packages.filedate: init at 3.0

authored by

OTABI Tomoya and committed by
GitHub
6a1dfec4 46cf5b10

+61
+59
pkgs/development/python-modules/filedate/default.nix
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchFromGitHub, 5 + pytestCheckHook, 6 + python-dateutil, 7 + setuptools, 8 + }: 9 + buildPythonPackage rec { 10 + pname = "filedate"; 11 + version = "3.0"; 12 + pyproject = true; 13 + 14 + src = fetchFromGitHub { 15 + owner = "kubinka0505"; 16 + repo = "filedate"; 17 + rev = version; 18 + hash = "sha256-HvuGP+QlUlfAUfFmaVVvtPHGdrbWVxghQipnqTTvAQc="; 19 + }; 20 + 21 + sourceRoot = "${src.name}/Files"; 22 + 23 + # The repo stores everything in "src" and uses setup.py to move "src" -> 24 + # "filedate" before calling setup() and then tries to rename "filedate" back 25 + # to "src" after. 26 + postPatch = '' 27 + mv src filedate 28 + substituteInPlace setup.py \ 29 + --replace-fail "__title__ = os.path.basename(os.path.dirname(os.path.dirname(__file__)))" '__title__ = "filedate"' 30 + substituteInPlace setup.py \ 31 + --replace-fail "cleanup = True" "cleanup = False" 32 + 33 + # Disable renaming "filedate" dir back to "src" 34 + substituteInPlace setup.py \ 35 + --replace-fail "if os.path.exists(__title__):" "" 36 + substituteInPlace setup.py \ 37 + --replace-fail " os.rename(__title__, directory)" "" 38 + ''; 39 + 40 + build-system = [ setuptools ]; 41 + 42 + dependencies = [ python-dateutil ]; 43 + 44 + pythonImportsCheck = [ "filedate" ]; 45 + 46 + nativeCheckInputs = [ pytestCheckHook ]; 47 + 48 + pytestFlagsArray = [ "tests/unit.py" ]; 49 + 50 + disabledTests = [ "test_created" ]; 51 + 52 + meta = { 53 + description = "Simple, convenient and cross-platform file date changing library"; 54 + homepage = "https://github.com/kubinka0505/filedate"; 55 + changelog = "https://github.com/kubinka0505/filedate/blob/${src.rev}/Documents/ChangeLog.md"; 56 + license = lib.licenses.gpl3Only; 57 + maintainers = with lib.maintainers; [ thornycrackers ]; 58 + }; 59 + }
+2
pkgs/top-level/python-packages.nix
··· 4189 4189 4190 4190 filecheck = callPackage ../development/python-modules/filecheck { }; 4191 4191 4192 + filedate = callPackage ../development/python-modules/filedate { }; 4193 + 4192 4194 filedepot = callPackage ../development/python-modules/filedepot { }; 4193 4195 4194 4196 filelock = callPackage ../development/python-modules/filelock { };