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

rtv: 1.14.1 -> 1.15.1 #25207

Merged
merged 11 commits into from Apr 27, 2017
41 changes: 30 additions & 11 deletions pkgs/applications/misc/rtv/default.nix
@@ -1,28 +1,47 @@
{ stdenv, fetchFromGitHub, pkgs, lib, python, pythonPackages }:
{ stdenv, fetchFromGitHub, pkgs, pythonPackages }:

pythonPackages.buildPythonApplication rec {
version = "1.14.1";
with pythonPackages;
buildPythonApplication rec {
version = "1.15.1";
name = "rtv-${version}";

src = fetchFromGitHub {
owner = "michael-lazar";
repo = "rtv";
rev = "v${version}";
sha256 = "03106sdsvj4zjjaqqg7qvm3n959plvy08a6n28ir1yf67kwzsx8a";
sha256 = "037dhds1prxj7vsq15dr46wk3pfk3ixr0d60m3h796b6nbc1spya";
};

propagatedBuildInputs = with pythonPackages; [
checkPhase = ''
py.test
'';

buildInputs = [
coverage
coveralls
docopt
mock
pylint
pytest
vcrpy
];

propagatedBuildInputs = [
backports_functools_lru_cache
beautifulsoup4
configparser
contextlib2
decorator
kitchen
mailcap-fix
tornado
mccabe
requests2
six
praw
kitchen
praw
] ++ lib.optional (!pythonPackages.isPy3k) futures;
tornado
pyyaml
];

meta = with lib; {
meta = with stdenv.lib; {
homepage = https://github.com/michael-lazar/rtv;
description = "Browse Reddit from your Terminal";
license = licenses.mit;
Expand Down
51 changes: 51 additions & 0 deletions pkgs/development/python-modules/coveralls/default.nix
@@ -0,0 +1,51 @@
{ buildPythonPackage
, lib
, fetchPypi
, mock
, pytest_27
, sh
, coverage
, docopt
, requests2
, git
}:

buildPythonPackage rec {
pname = "coveralls";
name = "${pname}-python-${version}";
version = "1.1";

# wanted by tests
src = fetchPypi {
inherit pname version;
sha256 = "0238hgdwbvriqxrj22zwh0rbxnhh9c6hh75i39ll631vq62h65il";
};

buildInputs = [
mock
sh
pytest_27
git
];

# FIXME: tests requires .git directory to be present
doCheck = false;

checkPhase = ''
python setup.py test
'';

propagatedBuildInputs = [
coverage
docopt
requests2
];

meta = {
description = "Show coverage stats online via coveralls.io";
homepage = https://github.com/coveralls-clients/coveralls-python;
license = lib.licenses.mit;
};
}


27 changes: 27 additions & 0 deletions pkgs/development/python-modules/httpbin/default.nix
@@ -0,0 +1,27 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, flask
, markupsafe
, decorator
, itsdangerous
, six }:

buildPythonPackage rec {
pname = "httpbin";
version = "0.5.0";
name = "${pname}-${version}";

src = fetchPypi {
inherit pname version;
sha256 = "6b57f563900ecfe126015223a259463848daafbdc2687442317c0992773b9054";
};

propagatedBuildInputs = [ flask markupsafe decorator itsdangerous six ];

meta = with stdenv.lib; {
homepage = https://github.com/kennethreitz/httpbin;
description = "HTTP Request & Response Service";
license = licenses.mit;
};
}
17 changes: 17 additions & 0 deletions pkgs/development/python-modules/kitchen/default.nix
@@ -0,0 +1,17 @@
{ stdenv, buildPythonPackage, fetchPypi }:
buildPythonPackage rec {
pname = "kitchen";
version = "1.2.4";
name = "${pname}-${version}";

src = fetchPypi {
inherit pname version;
sha256 = "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq";
};

meta = with stdenv.lib; {
description = "Kitchen contains a cornucopia of useful code";
license = licenses.lgpl2;
maintainers = with maintainers; [ mornfall ];
};
}
36 changes: 36 additions & 0 deletions pkgs/development/python-modules/pytest-httpbin/default.nix
@@ -0,0 +1,36 @@
{ buildPythonPackage
, lib
, fetchFromGitHub
, pytest
, flask
, decorator
, httpbin
, six
, requests2
}:

buildPythonPackage rec {
name = "pytest-httpbin-${version}";
version = "0.2.3";

src = fetchFromGitHub {
owner = "kevin1024";
repo = "pytest-httpbin";
rev = "v${version}";
sha256 = "0j3n12jjy8cm0va8859wqra6abfyajrgh2qj8bhcngf3a72zl9ks";
};

checkPhase = ''
py.test -k "not test_chunked_encoding"
'';

buildInputs = [ pytest ];
propagatedBuildInputs = [ flask decorator httpbin six requests2 ];

meta = {
description = "Easily test your HTTP library against a local copy of httpbin.org";
homepage = https://github.com/kevin1024/pytest-httpbin;
license = lib.licenses.mit;
};
}

44 changes: 44 additions & 0 deletions pkgs/development/python-modules/vcrpy/default.nix
@@ -0,0 +1,44 @@
{ buildPythonPackage
, lib
, pkgs
, pyyaml
, mock
, contextlib2
, wrapt
, pytest_27
, httpbin
, pytest-httpbin
, yarl
}:

buildPythonPackage rec {
version = "1.10.5";
name = "vcrpy-${version}";

src = pkgs.fetchurl {
url = "mirror://pypi/v/vcrpy/vcrpy-${version}.tar.gz";
sha256 = "12kncg6jyvj15mi8ca74514f2x1ih753nhyz769nwvh39r468167";
};

buildInputs = [
pyyaml
mock
contextlib2
wrapt
pytest_27
httpbin
pytest-httpbin
yarl
];

checkPhase = ''
py.test --ignore=tests/integration -k "TestVCRConnection.testing_connect"
'';

meta = with lib; {
description = "Automatically mock your HTTP interactions to simplify and speed up testing";
homepage = https://github.com/kevin1024/vcrpy;
license = licenses.mit;
};
}

42 changes: 11 additions & 31 deletions pkgs/top-level/python-packages.nix
Expand Up @@ -4388,6 +4388,8 @@ in {
};
};

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

coverage = buildPythonPackage rec {
name = "coverage-4.0.1";

Expand Down Expand Up @@ -5191,6 +5193,8 @@ in {
};
};

pytest-httpbin = callPackage ../development/python-modules/pytest-httpbin { };

pytestcache = buildPythonPackage rec {
name = "pytest-cache-1.0";
src = pkgs.fetchurl {
Expand Down Expand Up @@ -10227,6 +10231,8 @@ in {
};
};

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

venusian = buildPythonPackage rec {
name = "venusian-1.0";

Expand Down Expand Up @@ -12715,23 +12721,7 @@ in {
};
});

httpbin = buildPythonPackage rec {
name = "httpbin-0.2.0";

src = pkgs.fetchurl {
url = "mirror://pypi/h/httpbin/${name}.tar.gz";
sha256 = "6b57f563900ecfe126015223a259463848daafbdc2687442317c0992773b9054";
};

propagatedBuildInputs = with self; [ flask markupsafe decorator itsdangerous six ];

meta = {
homepage = https://github.com/kennethreitz/httpbin;
description = "HTTP Request & Response Service";
license = licenses.mit;
};

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

httplib2 = buildPythonPackage rec {
name = "httplib2-0.9.2";
Expand Down Expand Up @@ -13196,9 +13186,9 @@ in {
license = with licenses; [ lgpl21 ];
};
};

iso-639 = callPackage ../development/python-modules/iso-639 {};

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

iso8601 = buildPythonPackage rec {
Expand Down Expand Up @@ -13587,17 +13577,7 @@ in {
};
};

kitchen = buildPythonPackage (rec {
name = "kitchen-1.1.1";
disabled = isPy3k;

meta.maintainers = with maintainers; [ mornfall ];

src = pkgs.fetchurl {
url = "mirror://pypi/k/kitchen/kitchen-1.1.1.tar.gz";
sha256 = "0ki840hjk1q19w6icv0dj2jxb00966nwy9b1jib0dgdspj00yrr5";
};
});
kitchen = callPackage ../development/python-modules/kitchen/default.nix { };

pylast = buildPythonPackage rec {
name = "pylast-${version}";
Expand Down Expand Up @@ -15608,7 +15588,7 @@ in {

patches = [
(pkgs.fetchpatch {
url = https://github.com/drkjam/netaddr/commit/2ab73f10be7069c9412e853d2d0caf29bd624012.patch;
url = https://github.com/drkjam/netaddr/commit/2ab73f10be7069c9412e853d2d0caf29bd624012.patch;
sha256 = "08rn1s3w9424jhandy4j9sksy852ny00088zh15nirw5ajqg1dn7";
})
];
Expand Down