python312Packages.pycurl: refactor
- disable failing test - add pythonImportsCheck - switch to pypa builder
This commit is contained in:
committed by
Martin Weinelt
parent
a6d1fe3c03
commit
839ff20cd5
@@ -10,24 +10,31 @@
|
||||
bottle,
|
||||
pytestCheckHook,
|
||||
flaky,
|
||||
setuptools,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pycurl";
|
||||
version = "7.45.3";
|
||||
format = "setuptools";
|
||||
disabled = isPyPy || (pythonOlder "3.5"); # https://github.com/pycurl/pycurl/issues/208
|
||||
pyproject = true;
|
||||
|
||||
disabled = isPyPy || pythonOlder "3.8"; # https://github.com/pycurl/pycurl/issues/208
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-jCRxr5B5rXmOFkXsCw09QiPbaHN50X3TanBjdEn4HWs=";
|
||||
};
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace setup.py --replace '--static-libs' '--libs'
|
||||
substituteInPlace setup.py \
|
||||
--replace-fail '--static-libs' '--libs'
|
||||
export PYCURL_SSL_LIBRARY=openssl
|
||||
'';
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
buildInputs = [
|
||||
curl
|
||||
openssl
|
||||
@@ -35,12 +42,10 @@ buildPythonPackage rec {
|
||||
|
||||
nativeBuildInputs = [ curl ];
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
nativeCheckInputs = [
|
||||
bottle
|
||||
pytestCheckHook
|
||||
flaky
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pytestFlagsArray = [
|
||||
@@ -52,6 +57,8 @@ buildPythonPackage rec {
|
||||
export HOME=$TMPDIR
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "pycurl" ];
|
||||
|
||||
disabledTests =
|
||||
[
|
||||
# tests that require network access
|
||||
@@ -76,6 +83,8 @@ buildPythonPackage rec {
|
||||
"test_request_with_verifypeer"
|
||||
# https://github.com/pycurl/pycurl/issues/836
|
||||
"test_proxy_tlsauth"
|
||||
# AssertionError: 'Москва' != '\n...
|
||||
"test_encoded_unicode_header"
|
||||
]
|
||||
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
|
||||
# Fatal Python error: Segmentation fault
|
||||
@@ -83,8 +92,12 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://pycurl.io/";
|
||||
description = "Python Interface To The cURL library";
|
||||
homepage = "http://pycurl.io/";
|
||||
changelog =
|
||||
"https://github.com/pycurl/pycurl/blob/REL_"
|
||||
+ replaceStrings [ "." ] [ "_" ] version
|
||||
+ "/ChangeLog";
|
||||
license = with licenses; [
|
||||
lgpl2Only
|
||||
mit
|
||||
|
||||
Reference in New Issue
Block a user