Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3Packages.warcio: init at 1.7.4 #139766

Merged
merged 1 commit into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions pkgs/development/python-modules/warcio/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, six
, setuptools
, pytestCheckHook
, httpbin
, requests
, wsgiprox
, multidict
}:

buildPythonPackage rec {
pname = "warcio";
version = "1.7.4";

src = fetchFromGitHub {
owner = "webrecorder";
repo = "warcio";
rev = "aa702cb321621b233c6e5d2a4780151282a778be"; # Repo has no git tags, see https://github.com/webrecorder/warcio/issues/126
sha256 = "sha256-wn2rd73wRfOqHu9H0GIn76tmEsERBBCQatnk4b/JToU=";
};

patches = [
(fetchpatch {
name = "add-offline-option.patch";
url = "https://github.com/webrecorder/warcio/pull/135/commits/2546fe457c57ab0b391764a4ce419656458d9d07.patch";
sha256 = "sha256-3izm9LvAeOFixiIUUqmd5flZIxH92+NxL7jeu35aObQ=";
})
];

propagatedBuildInputs = [
six
setuptools
];

checkInputs = [
pytestCheckHook
httpbin
requests
wsgiprox
multidict # Optional. Without this, one test in test/test_utils.py is skipped.
];

pytestFlagsArray = [ "--offline" ];

pythonImportsCheck = [ "warcio" ];

meta = with lib; {
description = "Streaming WARC/ARC library for fast web archive IO";
homepage = "https://github.com/webrecorder/warcio";
license = licenses.asl20;
maintainers = with maintainers; [ Luflosi ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10308,6 +10308,8 @@ in {

wandb = callPackage ../development/python-modules/wandb { };

warcio = callPackage ../development/python-modules/warcio { };

warlock = callPackage ../development/python-modules/warlock { };

warrant = callPackage ../development/python-modules/warrant { };
Expand Down