diff options
Diffstat (limited to 'pkgs/development/python-modules')
5 files changed, 159 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/authheaders/default.nix b/pkgs/development/python-modules/authheaders/default.nix index 5ad2e29976a5..7d4a4075439e 100644 --- a/pkgs/development/python-modules/authheaders/default.nix +++ b/pkgs/development/python-modules/authheaders/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "authheaders"; - version = "0.15.2"; + version = "0.15.3"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "ValiMail"; repo = "authentication-headers"; rev = "refs/tags/${version}"; - hash = "sha256-vtLt7JUdLF0gBWgMzP65UAR6A9BnTech5n0alFErcSQ="; + hash = "sha256-96fCx5uN7yegTrCN+LSjtu4u3RL+dcxV/Puyo0eziI8="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/cachier/default.nix b/pkgs/development/python-modules/cachier/default.nix new file mode 100644 index 000000000000..2a1fe461d51c --- /dev/null +++ b/pkgs/development/python-modules/cachier/default.nix @@ -0,0 +1,87 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchPypi +, pythonRelaxDepsHook +, setuptools +, watchdog +, portalocker +, pathtools +, pytestCheckHook +, pymongo +, dnspython +, pymongo-inmemory +, pandas +}: + +buildPythonPackage rec { + pname = "cachier"; + version = "2.2.1"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-nm98LT87Z7yErKvIqMp93OEX9TDojqqtItgryHgSQJQ="; + }; + + pythonRemoveDeps = [ "setuptools" ]; + + nativeBuildInputs = [ + pythonRelaxDepsHook + setuptools + ]; + + propagatedBuildInputs = [ + watchdog + portalocker + pathtools + ]; + + preCheck = '' + substituteInPlace pytest.ini \ + --replace \ + "--cov" \ + "#--cov" + ''; + + nativeCheckInputs = [ + pytestCheckHook + pymongo + dnspython + pymongo-inmemory + pandas + ]; + + disabledTests = [ + # touches network + "test_mongetter_default_param" + "test_stale_after_applies_dynamically" + "test_next_time_applies_dynamically" + "test_wait_for_calc_" + "test_precache_value" + "test_ignore_self_in_methods" + "test_mongo_index_creation" + "test_mongo_core" + + # don't test formatting + "test_flake8" + ]; + + preBuild = '' + export HOME="$(mktemp -d)" + ''; + + pythonImportsCheck = [ + "cachier" + "cachier.scripts" + ]; + + meta = { + homepage = "https://github.com/python-cachier/cachier"; + description = "Persistent, stale-free, local and cross-machine caching for functions"; + maintainers = with lib.maintainers; [ pbsds ]; + license = lib.licenses.mit; + }; +} diff --git a/pkgs/development/python-modules/checkdmarc/default.nix b/pkgs/development/python-modules/checkdmarc/default.nix index e7cedec9791b..6c261cff35fd 100644 --- a/pkgs/development/python-modules/checkdmarc/default.nix +++ b/pkgs/development/python-modules/checkdmarc/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "checkdmarc"; - version = "4.8.0"; + version = "4.8.4"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -24,9 +24,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "domainaware"; repo = "checkdmarc"; - # https://github.com/domainaware/checkdmarc/issues/102 - rev = "d0364ceef3cfd41052273913369e3831cb6fe4fd"; - hash = "sha256-OSljewDeyJtoxkCQjPU9wIsNhhxumHmeu9GHvRD4DRY="; + rev = "refs/tags/${version}"; + hash = "sha256-NNB5dYQzzdNapjP4mtpCW08BzfZ+FFRESUtpxCOzrdk="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/dbus-fast/default.nix b/pkgs/development/python-modules/dbus-fast/default.nix index c956c4acb1e2..5dc9b5675a4d 100644 --- a/pkgs/development/python-modules/dbus-fast/default.nix +++ b/pkgs/development/python-modules/dbus-fast/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { pname = "dbus-fast"; - version = "2.2.0"; + version = "2.7.0"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -22,7 +22,7 @@ buildPythonPackage rec { owner = "Bluetooth-Devices"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-47Z8szHVBz8Sx7g+WiKfLzg3MIFTyMjPLDlgGfPb//U="; + hash = "sha256-o75N/msocSYBe3tTLYGJbqMnbiQb/t3nfJIDDr6kPxM="; }; # The project can build both an optimized cython version and an unoptimized diff --git a/pkgs/development/python-modules/pymongo-inmemory/default.nix b/pkgs/development/python-modules/pymongo-inmemory/default.nix new file mode 100644 index 000000000000..98cbf453e554 --- /dev/null +++ b/pkgs/development/python-modules/pymongo-inmemory/default.nix @@ -0,0 +1,65 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, fetchpatch +, poetry-core +, pymongo +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pymongo-inmemory"; + version = "0.3.1"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "kaizendorks"; + repo = "pymongo_inmemory"; + rev = "refs/tags/v${version}"; + hash = "sha256-1v36cI6JjDZA/uJE85NSMNnoyKI1VCgDrymfnCkpVqU="; + }; + + postPatch = '' + # move cache location from nix store to home + substituteInPlace pymongo_inmemory/context.py \ + --replace \ + 'CACHE_FOLDER = path.join(path.dirname(__file__), "..", ".cache")' \ + 'CACHE_FOLDER = os.environ.get("XDG_CACHE_HOME", os.environ["HOME"] + "/.cache") + "/pymongo-inmemory"' + + # fix a broken assumption arising from the above fix + substituteInPlace pymongo_inmemory/_utils.py \ + --replace \ + 'os.mkdir(current_path)' \ + 'os.makedirs(current_path)' + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + pymongo + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + preCheck = '' + export HOME="$(mktemp -d)" + ''; + + pythonImportsCheck = [ + "pymongo_inmemory" + ]; + + meta = { + homepage = "https://github.com/kaizendorks/pymongo_inmemory"; + description = "A mongo mocking library with an ephemeral MongoDB running in memory"; + maintainers = with lib.maintainers; [ pbsds ]; + license = lib.licenses.mit; + }; +} |