Unverified Commit 67ddf0d0 authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

Merge pull request #223764 from NickCao/uamqp

python3Packages.uamqp: use github source, unpin openssl_1_1, enable t…
parents 1c757960 b8b706b0
Loading
Loading
Loading
Loading
+22 −15
Original line number Diff line number Diff line
{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, cython
, certifi
, CFNetwork
, cmake
, CoreFoundation
, enum34
, fetchpatch
, fetchPypi
, isPy3k
, libcxxabi
, openssl
, Security
, six
, pytestCheckHook
, pytest-asyncio
}:

buildPythonPackage rec {
  pname = "uamqp";
  version = "1.6.4";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-IYMzJDXveIL60ick4/L2PT/VpRx/DGNdY0h5SLAuN0k=";
  src = fetchFromGitHub {
    owner = "Azure";
    repo = "azure-uamqp-python";
    rev = "refs/tags/v.${version}";
    hash = "sha256-OjZTroaBuUB/dakl5gAYigJkim9EFiCwUEBo7z35vhQ=";
  };

  patches = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
@@ -43,9 +44,12 @@ buildPythonPackage rec {

  nativeBuildInputs = [
    cmake
    cython
  ];

  buildInputs = lib.optionals stdenv.isDarwin [
  buildInputs = [
    openssl
  ] ++ lib.optionals stdenv.isDarwin [
    CoreFoundation
    CFNetwork
    Security
@@ -53,10 +57,6 @@ buildPythonPackage rec {

  propagatedBuildInputs = [
    certifi
    openssl
    six
  ] ++ lib.optionals (!isPy3k) [
    enum34
  ];

  LDFLAGS = lib.optionals stdenv.isDarwin [
@@ -65,8 +65,15 @@ buildPythonPackage rec {

  dontUseCmakeConfigure = true;

  # Project has no tests
  doCheck = false;
  preCheck = ''
    # remove src module, so tests use the installed module instead
    rm -r uamqp
  '';

  nativeCheckInputs = [
    pytestCheckHook
    pytest-asyncio
  ];

  pythonImportsCheck = [
    "uamqp"
+0 −1
Original line number Diff line number Diff line
@@ -12204,7 +12204,6 @@ self: super: with self; {
  rustworkx = callPackage ../development/python-modules/rustworkx { };

  uamqp = callPackage ../development/python-modules/uamqp {
    openssl = pkgs.openssl_1_1;
    inherit (pkgs.darwin.apple_sdk.frameworks) CFNetwork CoreFoundation Security;
  };