Merge pull request #227329 from mweinelt/python-deps

Various python updates and fixes
This commit is contained in:
Martin Weinelt 2023-04-22 03:25:34 +02:00 committed by GitHub
commit 9226999d11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 59 additions and 2 deletions

View file

@ -1,5 +1,6 @@
{ lib
, fetchFromGitHub
, pythonAtLeast
, pythonOlder
, buildPythonPackage
@ -66,6 +67,11 @@ buildPythonPackage {
pytestCheckHook
];
pytestFlagsArray = lib.optionals (pythonAtLeast "3.11") [
# DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
"-W" "ignore::DeprecationWarning"
];
disabledTests = [
# ModuleNotFoundError: No module named 'test_cache_options'
"test_custom_key_function"

View file

@ -0,0 +1,42 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
, requests
}:
buildPythonPackage rec {
pname = "opencontainers";
version = "0.0.14";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-/eO4CZtWtclWQV34kz4iJ+GRToBaJ3uETy+eUjQXOPI=";
};
postPatch = ''
sed -i "/pytest-runner/d" setup.py
'';
passthru.optional-dependencies.reggie = [
requests
];
pythonImportsCheck = [
"opencontainers"
];
nativeCheckInputs = [
pytestCheckHook
] ++ passthru.optional-dependencies.reggie;
__darwinAllowLocalNetworking = true;
meta = with lib; {
description = "Python module for oci specifications";
homepage = "https://github.com/vsoch/oci-python";
license = licenses.mpl20;
maintainers = with maintainers; [ hexa ];
};
}

View file

@ -40,7 +40,7 @@
buildPythonPackage rec {
pname = "sentry-sdk";
version = "1.18.0";
version = "1.20.0";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -49,7 +49,7 @@ buildPythonPackage rec {
owner = "getsentry";
repo = "sentry-python";
rev = "refs/tags/${version}";
hash = "sha256-4HOJ6ouUU6RqtxYOsnoojT4aQ/h8YzcLHTO8lFZecZw=";
hash = "sha256-fAlEh3S95Dyw1xHK2XaqbA6xUsASXbhzELGZTH/G+kg=";
};
propagatedBuildInputs = [

View file

@ -2,6 +2,7 @@
, fetchFromGitHub
, buildPythonPackage
, lxml
, pythonAtLeast
, pythonOlder
, pytestCheckHook
}:
@ -26,6 +27,12 @@ buildPythonPackage rec {
pytestCheckHook
];
pytestFlagsArray = lib.optionals (pythonAtLeast "3.11") [
# AttributeError: 'tuple' object has no attribute 'shortDescription'
"--deselect=tests/testsuite.py::XMLTestRunnerTestCase::test_basic_unittest_constructs"
"--deselect=tests/testsuite.py::XMLTestRunnerTestCase::test_unexpected_success"
];
pythonImportsCheck = [ "xmlrunner" ];
meta = with lib; {

View file

@ -6853,6 +6853,8 @@ self: super: with self; {
opencensus-context = callPackage ../development/python-modules/opencensus-context { };
opencontainers = callPackage ../development/python-modules/opencontainers { };
opencv3 = toPythonModule (pkgs.opencv3.override {
enablePython = true;
pythonPackages = self;