backblaze-b2: 2.1.0 -> 2.4.0 (#121250)
* python3Packages.b2sdk: 1.6.0 -> 1.7.0 * python3Packages.b2sdk: enable tests * pythonPackages.rst2ansi: init at 0.1.5 * backblaze-b2: 2.1.0 -> 2.4.0 Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
This commit is contained in:
parent
6b328db916
commit
06efb08ec4
4 changed files with 91 additions and 18 deletions
|
@ -1,17 +1,48 @@
|
|||
{ lib, buildPythonPackage, fetchPypi, setuptools-scm, isPy27, pytestCheckHook
|
||||
, requests, arrow, logfury, tqdm }:
|
||||
{ lib
|
||||
, arrow
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, importlib-metadata
|
||||
, isPy27
|
||||
, logfury
|
||||
, pytestCheckHook
|
||||
, pytest-lazy-fixture
|
||||
, pytest-mock
|
||||
, pythonOlder
|
||||
, requests
|
||||
, setuptools-scm
|
||||
, tqdm
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "b2sdk";
|
||||
version = "1.6.0";
|
||||
|
||||
version = "1.7.0";
|
||||
disabled = isPy27;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-6fjreuMUC056ljddfAidfBbJkvEDndB/dIkx1bF7efs=";
|
||||
sha256 = "sha256-8X5XLh9SxZI1P7/2ZjOy8ipcEzTcriJfGI7KlMXncv4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
arrow
|
||||
logfury
|
||||
requests
|
||||
tqdm
|
||||
] ++ lib.optionals (pythonOlder "3.8") [
|
||||
importlib-metadata
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
pytest-lazy-fixture
|
||||
pytest-mock
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace 'setuptools_scm<6.0' 'setuptools_scm'
|
||||
|
@ -19,16 +50,16 @@ buildPythonPackage rec {
|
|||
--replace 'arrow>=0.8.0,<1.0.0' 'arrow'
|
||||
'';
|
||||
|
||||
disabledTests = [
|
||||
# Test requires an API key
|
||||
"test_raw_api"
|
||||
"test_files_headers"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "b2sdk" ];
|
||||
|
||||
nativeBuildInputs = [ setuptools-scm ];
|
||||
propagatedBuildInputs = [ requests arrow logfury tqdm ];
|
||||
|
||||
# requires unpackaged dependencies like liccheck
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Client library and utilities for access to B2 Cloud Storage (backblaze).";
|
||||
description = "Client library and utilities for access to B2 Cloud Storage (backblaze)";
|
||||
homepage = "https://github.com/Backblaze/b2-sdk-python";
|
||||
license = licenses.mit;
|
||||
};
|
||||
|
|
20
pkgs/development/python-modules/rst2ansi/default.nix
Normal file
20
pkgs/development/python-modules/rst2ansi/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ lib, buildPythonPackage, fetchPypi, docutils, }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "rst2ansi";
|
||||
version = "0.1.5";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-Gxf7mmKNQPV5M60aOqlSNGREvgaUaVCOc+lQYNoz/m8=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ docutils ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A rst converter to ansi-decorated console output";
|
||||
homepage = "https://github.com/Snaipe/python-rst-to-ansi";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ vojta001 ];
|
||||
};
|
||||
}
|
|
@ -1,21 +1,41 @@
|
|||
{ fetchFromGitHub, lib, python3Packages }:
|
||||
|
||||
let
|
||||
python3Packages2 = python3Packages.override {
|
||||
overrides = self: super: {
|
||||
arrow = self.callPackage ../../python-modules/arrow/2.nix { };
|
||||
};
|
||||
};
|
||||
in
|
||||
let
|
||||
python3Packages = python3Packages2; # two separate let … in to avoid infinite recursion
|
||||
in
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "backblaze-b2";
|
||||
version = "2.1.0";
|
||||
version = "2.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Backblaze";
|
||||
repo = "B2_Command_Line_Tool";
|
||||
rev = "v${version}";
|
||||
sha256 = "1kkpvxqgh5pw4kr8lh5gy9d7960hv9zvajbjiqhj6xgykwbpbgmq";
|
||||
src = python3Packages.fetchPypi {
|
||||
inherit version;
|
||||
pname = "b2";
|
||||
sha256 = "sha256-nNQDdSjUolj3PjWRn1fPBAEtPlgeent2PxzHqwH1Z6s=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace 'setuptools_scm<6.0' 'setuptools_scm'
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
b2sdk
|
||||
class-registry
|
||||
phx-class-registry
|
||||
setuptools
|
||||
docutils
|
||||
rst2ansi
|
||||
];
|
||||
|
||||
nativeBuildInputs = with python3Packages; [
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
checkInputs = with python3Packages; [ pytestCheckHook ];
|
||||
|
|
|
@ -7167,6 +7167,8 @@ in {
|
|||
|
||||
rsa = callPackage ../development/python-modules/rsa { };
|
||||
|
||||
rst2ansi = callPackage ../development/python-modules/rst2ansi { };
|
||||
|
||||
rtmidi-python = callPackage ../development/python-modules/rtmidi-python { };
|
||||
|
||||
Rtree = callPackage ../development/python-modules/Rtree {
|
||||
|
|
Loading…
Reference in a new issue