httpie: 2.2.0 -> 2.4.0
This commit is contained in:
parent
cb52887c38
commit
a56bc4a996
@ -1,30 +1,23 @@
|
|||||||
{ lib, fetchFromGitHub, python3Packages, docutils, fetchpatch }:
|
{ lib, fetchFromGitHub, python3Packages, docutils }:
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
python3Packages.buildPythonApplication rec {
|
||||||
pname = "httpie";
|
pname = "httpie";
|
||||||
version = "2.2.0";
|
version = "2.4.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "jakubroztocil";
|
owner = "httpie";
|
||||||
repo = "httpie";
|
repo = "httpie";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0caazv24jr0844c4mdx77vzwwi5m869n10wa42cydb08ppx1xxj6";
|
sha256 = "00lafjqg9nfnak0nhcr2l2hzzkwn2y6qv0wdkm6r6f69snizy3hf";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./strip-venv.patch
|
||||||
|
];
|
||||||
|
|
||||||
outputs = [ "out" "doc" "man" ];
|
outputs = [ "out" "doc" "man" ];
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [ pygments requests setuptools ];
|
propagatedBuildInputs = with python3Packages; [ pygments requests requests-toolbelt setuptools ];
|
||||||
dontUseSetuptoolsCheck = true;
|
|
||||||
patches = [
|
|
||||||
./strip-venv.patch
|
|
||||||
|
|
||||||
# Fix `test_ciphers_none_can_be_selected`
|
|
||||||
# TODO: remove on next release
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://github.com/jakubroztocil/httpie/commit/49e71d252f54871a6bc49cb1cba103d385a543b8.patch";
|
|
||||||
sha256 = "13b2faf50gimj7f17dlx4gmd8ph8ipgihpzfqbvmfjlbf1v95fsj";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
checkInputs = with python3Packages; [
|
checkInputs = with python3Packages; [
|
||||||
mock
|
mock
|
||||||
@ -70,15 +63,6 @@ python3Packages.buildPythonApplication rec {
|
|||||||
toHtml CHANGELOG.rst $docdir/html/CHANGELOG.html
|
toHtml CHANGELOG.rst $docdir/html/CHANGELOG.html
|
||||||
toHtml CONTRIBUTING.rst $docdir/html/CONTRIBUTING.html
|
toHtml CONTRIBUTING.rst $docdir/html/CONTRIBUTING.html
|
||||||
|
|
||||||
# change a few links to the local files
|
|
||||||
substituteInPlace $docdir/html/index.html \
|
|
||||||
--replace \
|
|
||||||
'https://github.com/jakubroztocil/httpie/blob/master/CHANGELOG.rst' \
|
|
||||||
"CHANGELOG.html" \
|
|
||||||
--replace \
|
|
||||||
'https://github.com/jakubroztocil/httpie/blob/master/CONTRIBUTING.rst' \
|
|
||||||
"CONTRIBUTING.html"
|
|
||||||
|
|
||||||
${docutils}/bin/rst2man \
|
${docutils}/bin/rst2man \
|
||||||
--strip-elements-with-class=no-web \
|
--strip-elements-with-class=no-web \
|
||||||
--title=http \
|
--title=http \
|
||||||
@ -94,10 +78,14 @@ python3Packages.buildPythonApplication rec {
|
|||||||
export PATH=${docutils}/bin:$PATH
|
export PATH=${docutils}/bin:$PATH
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
checkPhase = ''
|
||||||
|
py.test ./httpie ./tests --doctest-modules --verbose ./httpie ./tests -k 'not test_chunked and not test_verbose_chunked and not test_multipart_chunked and not test_request_body_from_file_by_path_chunked'
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
description = "A command line HTTP client whose goal is to make CLI human-friendly";
|
description = "A command line HTTP client whose goal is to make CLI human-friendly";
|
||||||
homepage = "https://httpie.org/";
|
homepage = "https://httpie.org/";
|
||||||
license = lib.licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
maintainers = with lib.maintainers; [ antono relrod schneefux ];
|
maintainers = with maintainers; [ antono relrod schneefux SuperSandro2000 ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
diff --git a/tests/test_docs.py b/tests/test_docs.py
|
diff --git a/tests/test_docs.py b/tests/test_docs.py
|
||||||
index 7a41822..720ecf6 100644
|
index 340e64d..a6b4dc9 100644
|
||||||
--- a/tests/test_docs.py
|
--- a/tests/test_docs.py
|
||||||
+++ b/tests/test_docs.py
|
+++ b/tests/test_docs.py
|
||||||
@@ -41,12 +41,10 @@ assert filenames
|
@@ -42,15 +42,10 @@ assert filenames
|
||||||
|
|
||||||
# HACK: hardcoded paths, venv should be irrelevant, etc.
|
# HACK: hardcoded paths, venv should be irrelevant, etc.
|
||||||
# TODO: replaces the process with Python code
|
# 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_BIN = Path(__file__).parent.parent / 'venv/bin'
|
||||||
-VENV_PYTHON = VENV_BIN / 'python'
|
-VENV_PYTHON = VENV_BIN / 'python'
|
||||||
-VENV_RST2PSEUDOXML = VENV_BIN / 'rst2pseudoxml.py'
|
-VENV_RST2PSEUDOXML = VENV_BIN / 'rst2pseudoxml.py'
|
||||||
@ -13,7 +13,10 @@ index 7a41822..720ecf6 100644
|
|||||||
+VENV_RST2PSEUDOXML = 'rst2pseudoxml.py'
|
+VENV_RST2PSEUDOXML = 'rst2pseudoxml.py'
|
||||||
|
|
||||||
|
|
||||||
-@pytest.mark.skipif(not os.path.exists(VENV_RST2PSEUDOXML), reason='docutils not installed')
|
-@pytest.mark.skipif(
|
||||||
|
- not VENV_RST2PSEUDOXML.exists(),
|
||||||
|
- reason='docutils not installed',
|
||||||
|
-)
|
||||||
@pytest.mark.parametrize('filename', filenames)
|
@pytest.mark.parametrize('filename', filenames)
|
||||||
def test_rst_file_syntax(filename):
|
def test_rst_file_syntax(filename):
|
||||||
p = subprocess.Popen(
|
p = subprocess.Popen(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user