Merge pull request #223764 from NickCao/uamqp

python3Packages.uamqp: use github source, unpin openssl_1_1, enable t…
This commit is contained in:
Nick Cao 2023-04-24 18:58:56 +08:00 committed by GitHub
commit 67ddf0d068
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 16 deletions

View file

@ -1,27 +1,28 @@
{ 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"

View file

@ -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;
};