python310Packages.oscrypto: 1.2.1 -> 1.3.0

main
Fabian Affolter 2 years ago
parent e78b11b18e
commit d9f391d75c
  1. 44
      pkgs/development/python-modules/oscrypto/default.nix

@ -1,24 +1,25 @@
{ lib { lib
, stdenv , stdenv
, buildPythonPackage
, asn1crypto , asn1crypto
, fetchPypi , buildPythonPackage
, fetchFromGitHub
, openssl , openssl
, pytestCheckHook
, pythonOlder
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "oscrypto"; pname = "oscrypto";
version = "1.2.1"; version = "1.3.0";
format = "setuptools";
src = fetchPypi { disabled = pythonOlder "3.7";
inherit pname version;
sha256 = "1546si2bdgkqnbvv4mw1hr4mhh6bq39d9z4wxgv1m7fq6miclb3x";
};
testSources = fetchPypi { src = fetchFromGitHub {
inherit version; owner = "wbond";
pname = "oscrypto_tests"; repo = pname;
sha256 = "1ha68dsrbx6mlra44x0n81vscn17pajbl4yg7cqkk7mq1zfmjwks"; rev = version;
hash = "sha256-CmDypmlc/kb6ONCUggjT1Iqd29xNSLRaGh5Hz36dvOw=";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [
@ -26,21 +27,26 @@ buildPythonPackage rec {
openssl openssl
]; ];
preCheck = '' checkInputs = [
tar -xf ${testSources} pytestCheckHook
mv oscrypto_tests-${version} tests ];
# remove tests that require network
sed -e '/TLSTests/d' -e '/TrustListTests/d' -i tests/__init__.py
'';
pythonImportsCheck = [ "oscrypto" ]; pythonImportsCheck = [
"oscrypto"
];
doCheck = !stdenv.isDarwin; doCheck = !stdenv.isDarwin;
disabledTests = [
# Tests require network access
"TLSTests"
"TrustListTests"
];
meta = with lib; { meta = with lib; {
description = "Encryption library for Python"; description = "Encryption library for Python";
homepage = "https://github.com/wbond/oscrypto"; homepage = "https://github.com/wbond/oscrypto";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ ];
}; };
} }

Loading…
Cancel
Save