lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #306196 from fabaff/timecop-refactor

python312Packages.timecop: refactor, python312Packages.onetimepass: refactor

authored by

Fabian Affolter and committed by
GitHub
51dfb8a9 f5056396

+61 -33
+21 -8
pkgs/development/python-modules/onetimepass/default.nix
··· 1 - { lib, buildPythonPackage, fetchFromGitHub, six, timecop }: 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchFromGitHub, 5 + pythonOlder, 6 + setuptools, 7 + six, 8 + timecop, 9 + unittestCheckHook, 10 + }: 2 11 3 12 buildPythonPackage rec { 4 13 pname = "onetimepass"; 5 14 version = "1.0.1"; 6 - format = "setuptools"; 15 + pyproject = true; 16 + 17 + disabled = pythonOlder "3.7"; 7 18 8 19 src = fetchFromGitHub { 9 20 owner = "tadeck"; 10 - repo = pname; 11 - rev = "v${version}"; 12 - sha256 = "0wmv62l3r8r4428gdzyj80lhgadfqvj220khz1wnm9alyzg60wkh"; 21 + repo = "onetimepass"; 22 + rev = "refs/tags/v${version}"; 23 + hash = "sha256-cHJg3vdUpWp5+HACIeTGrqkHKUDS//aQICSjPKgwu3I="; 13 24 }; 14 25 15 - propagatedBuildInputs = [ 16 - six 17 - ]; 26 + build-system = [ setuptools ]; 27 + 28 + dependencies = [ six ]; 18 29 19 30 nativeCheckInputs = [ 20 31 timecop 32 + unittestCheckHook 21 33 ]; 22 34 23 35 pythonImportsCheck = [ "onetimepass" ]; ··· 25 37 meta = with lib; { 26 38 description = "One-time password library for HMAC-based (HOTP) and time-based (TOTP) passwords"; 27 39 homepage = "https://github.com/tadeck/onetimepass"; 40 + changelog = "https://github.com/tadeck/onetimepass/releases/tag/v${version}"; 28 41 license = licenses.mit; 29 42 maintainers = with maintainers; [ zakame ]; 30 43 };
+18 -3
pkgs/development/python-modules/timecop/default.nix
··· 1 - { lib, buildPythonPackage, fetchPypi }: 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchPypi, 5 + pythonOlder, 6 + setuptools, 7 + unittestCheckHook, 8 + }: 2 9 3 10 buildPythonPackage rec { 4 11 pname = "timecop"; 5 12 version = "0.5.0dev"; 6 - format = "setuptools"; 13 + pyproject = true; 14 + 15 + disabled = pythonOlder "3.7"; 7 16 8 17 src = fetchPypi { 9 18 inherit pname version; 10 - sha256 = "0zbi58sw2yp1qchzfhyi7bsrwxajiypphg65fir98kvj03g011wd"; 19 + hash = "sha256-jYcA3gByT5RydMU8eK+PUnWe9TrRQ/chw+F6wTUqcX0="; 11 20 }; 12 21 22 + build-system = [ setuptools ]; 23 + 24 + nativeCheckInputs = [ unittestCheckHook ]; 25 + 13 26 # test_epoch fails, see https://github.com/bluekelp/pytimecop/issues/4 14 27 preCheck = '' 15 28 sed -i 's/test_epoch/_test_epoch/' timecop/tests/test_freeze.py 16 29 ''; 30 + 31 + pythonImportsCheck = [ "timecop" ]; 17 32 18 33 meta = with lib; { 19 34 description = "A port of the most excellent TimeCop Ruby Gem for Python";
+22 -22
pkgs/tools/admin/awslimitchecker/default.nix
··· 1 - { lib, python3Packages, fetchFromGitHub }: 1 + { 2 + lib, 3 + fetchFromGitHub, 4 + python3, 5 + }: 2 6 3 - python3Packages.buildPythonApplication rec { 7 + python3.pkgs.buildPythonApplication rec { 4 8 pname = "awslimitchecker"; 5 9 version = "12.0.0"; 10 + pyproject = true; 6 11 7 12 src = fetchFromGitHub { 8 13 owner = "jantman"; 9 14 repo = "awslimitchecker"; 10 - rev = version; 11 - sha256 = "1p6n4kziyl6sfq7vgga9v88ddwh3sgnfb1m1cx6q25n0wyl7phgv"; 15 + rev = "refs/tags/${version}"; 16 + hash = "sha256-+8F7qOfAFoFNZ6GG5ezTA/LWENpJvbcPdtpQH/8k1tw="; 12 17 }; 13 18 14 - propagatedBuildInputs = with python3Packages; [ 19 + patches = [ 20 + # Fix the version lookup to use only the hardcoded version in the source package 21 + ./version.patch 22 + ]; 23 + 24 + build-system = with python3.pkgs; [ setuptools ]; 25 + 26 + dependencies = with python3.pkgs; [ 15 27 boto3 16 28 botocore 17 29 pytz ··· 19 31 versionfinder 20 32 ]; 21 33 22 - nativeCheckInputs = with python3Packages; [ 34 + nativeCheckInputs = with python3.pkgs; [ 23 35 freezegun 24 36 onetimepass 25 - pytestCheckHook 26 37 pyotp 38 + mock 39 + (pytestCheckHook.override { pytest = pytest_7; }) 27 40 testfixtures 28 41 ]; 29 42 30 - patches = [ 31 - # Fix the version lookup to use only the hardcoded version in the source package 32 - ./version.patch 33 - ]; 34 - 35 - pytestFlagsArray = [ 36 - "awslimitchecker/tests" 37 - 38 - # Upstream did not adapt to pytest 8 yet. 39 - "-W" 40 - "ignore::pytest.PytestRemovedIn8Warning" 41 - ]; 42 - 43 43 disabledTestPaths = [ 44 44 # AWS tests that use the network 45 45 "awslimitchecker/tests/services" ··· 53 53 pythonImportsCheck = [ "awslimitchecker.checker" ]; 54 54 55 55 meta = with lib; { 56 + description = "A script and python package to check your AWS service limits and usage via boto3"; 56 57 homepage = "http://awslimitchecker.readthedocs.org"; 57 58 changelog = "https://github.com/jantman/awslimitchecker/blob/${version}/CHANGES.rst"; 58 - description = "A script and python package to check your AWS service limits and usage via boto3"; 59 - mainProgram = "awslimitchecker"; 60 59 license = licenses.agpl3Plus; 61 60 maintainers = with maintainers; [ zakame ]; 61 + mainProgram = "awslimitchecker"; 62 62 }; 63 63 }