Unverified Commit 7bf96d32 authored by Fabian Affolter's avatar Fabian Affolter Committed by Michael Daniels
Browse files

python3Packages.py-multiaddr: 0.0.10 -> 0.0.11; fix build

parent 110ca1cf
Loading
Loading
Loading
Loading
+30 −10
Original line number Diff line number Diff line
{
  lib,
  base58,
  buildPythonPackage,
  fetchFromGitHub,
  varint,
  base58,
  netaddr,
  idna,
  netaddr,
  py-cid,
  py-multicodec,
  trio,
  pytestCheckHook,
  setuptools,
  psutil,
  varint,
  dnspython,
  trio-typing,
}:

buildPythonPackage rec {
  pname = "py-multiaddr";
  version = "0.0.10";
  format = "setuptools";
  version = "0.0.11";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "multiformats";
    repo = "py-multiaddr";
    tag = "v${version}";
    hash = "sha256-N46D2H3RG6rtdBrSyDjh8UxD+Ph/FXEa4FcEI2uz4y8=";
    hash = "sha256-mlHcuLVtczp3APXJFkWbjeY7xU39eFERa8hhiOEwBSU=";
  };

  postPatch = ''
    substituteInPlace setup.py --replace "'pytest-runner'," ""
  '';
  build-system = [ setuptools ];

  propagatedBuildInputs = [
  dependencies = [
    varint
    base58
    netaddr
    dnspython
    trio-typing
    trio
    idna
    py-cid
    psutil
    py-multicodec
  ];

@@ -40,9 +47,22 @@ buildPythonPackage rec {

  pythonImportsCheck = [ "multiaddr" ];

  disabledTests = [
    # Test is outdated
    "test_resolve_cancellation_with_error"
    # AssertionError
    "test_ipv4_wildcard"
  ];

  disabledTestPaths = [
    # Tests require network access
    "tests/test_resolvers.py"
  ];

  meta = {
    description = "Composable and future-proof network addresses";
    homepage = "https://github.com/multiformats/py-multiaddr";
    changelog = "https://github.com/multiformats/py-multiaddr/releases/tag/${src.tag}";
    license = with lib.licenses; [
      mit
      asl20