mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-27 14:34:33 +00:00
Merge pull request #169302 from kfollesdal/httpie-ntlm
This commit is contained in:
commit
5eb5ae4261
31
pkgs/development/python-modules/httpie-ntlm/default.nix
Normal file
31
pkgs/development/python-modules/httpie-ntlm/default.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, httpie
|
||||
, requests_ntlm
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "httpie-ntlm";
|
||||
version = "1.0.2";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "b1f757180c0bd60741ea16cf91fc53d47df402a5c287c4a61a14b335ea0552b3";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ httpie requests_ntlm ];
|
||||
|
||||
# Package have no tests
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "httpie_ntlm" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "NTLM auth plugin for HTTPie";
|
||||
homepage = "https://github.com/httpie/httpie-ntlm";
|
||||
license = licenses.bsdOriginal;
|
||||
maintainers = with maintainers; [ kfollesdal ];
|
||||
};
|
||||
}
|
@ -1,20 +1,38 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, python3
|
||||
, pandoc
|
||||
, pythonOlder
|
||||
# BuildInputs
|
||||
, charset-normalizer
|
||||
, defusedxml
|
||||
, multidict
|
||||
, pygments
|
||||
, requests
|
||||
, requests-toolbelt
|
||||
, setuptools
|
||||
, rich
|
||||
, pysocks
|
||||
# CheckInputs
|
||||
, pytest-httpbin
|
||||
, pytest-lazy-fixture
|
||||
, pytest-mock
|
||||
, pytestCheckHook
|
||||
, responses
|
||||
, werkzeug
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
buildPythonPackage rec {
|
||||
pname = "httpie";
|
||||
version = "3.1.0";
|
||||
version = "3.2.1";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "httpie";
|
||||
repo = "httpie";
|
||||
rev = version;
|
||||
hash = "sha256-x7Zucb2i8D4Xbn77eBzSxOAcc2fGg5MFKFiyJhytQ0s=";
|
||||
hash = "sha256-WEe8zSlNckl7bPBi6u8mHQ1/xPw3kE81F8Xr15TchgM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -22,7 +40,7 @@ python3.pkgs.buildPythonApplication rec {
|
||||
pandoc
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
propagatedBuildInputs = [
|
||||
charset-normalizer
|
||||
defusedxml
|
||||
multidict
|
||||
@ -30,15 +48,17 @@ python3.pkgs.buildPythonApplication rec {
|
||||
requests
|
||||
requests-toolbelt
|
||||
setuptools
|
||||
rich
|
||||
pysocks
|
||||
];
|
||||
|
||||
checkInputs = with python3.pkgs; [
|
||||
mock
|
||||
pytest
|
||||
checkInputs = [
|
||||
pytest-httpbin
|
||||
pytest-lazy-fixture
|
||||
pytest-mock
|
||||
pytestCheckHook
|
||||
responses
|
||||
werkzeug
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
@ -58,15 +78,6 @@ python3.pkgs.buildPythonApplication rec {
|
||||
"tests"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
"test_chunked"
|
||||
"test_verbose_chunked"
|
||||
"test_multipart_chunked"
|
||||
"test_request_body_from_file_by_path_chunked"
|
||||
# Part of doctest
|
||||
"httpie.encoding.detect_encoding"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"httpie"
|
||||
];
|
@ -1,22 +0,0 @@
|
||||
diff --git a/tests/test_docs.py b/tests/test_docs.py
|
||||
index 340e64d..a6b4dc9 100644
|
||||
--- a/tests/test_docs.py
|
||||
+++ b/tests/test_docs.py
|
||||
@@ -42,15 +42,10 @@ assert filenames
|
||||
# HACK: hardcoded paths, venv should be irrelevant, etc.
|
||||
# TODO: simplify by using the Python API instead of a subprocess
|
||||
# then we wont’t need the paths.
|
||||
-VENV_BIN = Path(__file__).parent.parent / 'venv/bin'
|
||||
-VENV_PYTHON = VENV_BIN / 'python'
|
||||
-VENV_RST2PSEUDOXML = VENV_BIN / 'rst2pseudoxml.py'
|
||||
+VENV_PYTHON = 'python'
|
||||
+VENV_RST2PSEUDOXML = 'rst2pseudoxml.py'
|
||||
|
||||
|
||||
-@pytest.mark.skipif(
|
||||
- not VENV_RST2PSEUDOXML.exists(),
|
||||
- reason='docutils not installed',
|
||||
-)
|
||||
@pytest.mark.parametrize('filename', filenames)
|
||||
def test_rst_file_syntax(filename):
|
||||
p = subprocess.Popen(
|
@ -6968,7 +6968,7 @@ with pkgs;
|
||||
|
||||
httpdump = callPackage ../tools/security/httpdump { };
|
||||
|
||||
httpie = callPackage ../tools/networking/httpie { };
|
||||
httpie = with python3Packages; toPythonApplication httpie;
|
||||
|
||||
httping = callPackage ../tools/networking/httping {};
|
||||
|
||||
|
@ -3939,8 +3939,12 @@ in {
|
||||
|
||||
httpcore = callPackage ../development/python-modules/httpcore { };
|
||||
|
||||
httpie = callPackage ../development/python-modules/httpie { };
|
||||
|
||||
http-ece = callPackage ../development/python-modules/http-ece { };
|
||||
|
||||
httpie-ntlm = callPackage ../development/python-modules/httpie-ntlm { };
|
||||
|
||||
httplib2 = callPackage ../development/python-modules/httplib2 { };
|
||||
|
||||
http-message-signatures = callPackage ../development/python-modules/http-message-signatures { };
|
||||
|
Loading…
Reference in New Issue
Block a user