Merge pull request #31355 from Mic92/fix-praw

Fix praw
This commit is contained in:
Jörg Thalheim 2017-11-07 13:20:10 +00:00 committed by GitHub
commit b1d6c259b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 199 additions and 86 deletions

View File

@ -0,0 +1,21 @@
{ stdenv, buildPythonPackage, fetchPypi
, betamax, requests_toolbelt }:
buildPythonPackage rec {
pname = "betamax-matchers";
version = "0.4.0";
src = fetchPypi {
inherit pname version;
sha256 = "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43";
};
buildInputs = [ betamax requests_toolbelt ];
meta = with stdenv.lib; {
homepage = https://github.com/sigmavirus24/betamax_matchers;
description = "A group of experimental matchers for Betamax";
license = licenses.asl20;
maintainers = with maintainers; [ pSub ];
};
}

View File

@ -0,0 +1,20 @@
{ stdenv, buildPythonPackage, fetchPypi
, betamax, pyyaml }:
buildPythonPackage rec {
pname = "betamax-serializers";
version = "0.2.0";
src = fetchPypi {
inherit pname version;
sha256 = "1yqzwx204m4lxlpg04cwv6iwzmcpdzr19wvj97vvxchp0g4qg83d";
};
buildInputs = [ betamax pyyaml ];
meta = with stdenv.lib; {
homepage = https://gitlab.com/betamax/serializers;
description = "A set of third-party serializers for Betamax";
license = licenses.asl20;
};
}

View File

@ -0,0 +1,43 @@
{ stdenv, buildPythonPackage, fetchFromGitHub
, requests, decorator, flake8, mock, six, update_checker, pytestrunner, prawcore
, pytest, betamax, betamax-serializers, betamax-matchers, requests_toolbelt
}:
buildPythonPackage rec {
pname = "praw";
version = "5.2.0";
src = fetchFromGitHub {
owner = "praw-dev";
repo = "praw";
rev = "v${version}";
sha256 = "0nwfadczxa1fyq65zc3sfv8g2r4w3xrx3bdi5fv9xpn97wh2ifgw";
};
propagatedBuildInputs = [
requests
decorator
flake8
mock
six
update_checker
pytestrunner
prawcore
];
checkInputs = [
pytest
betamax
betamax-serializers
betamax-matchers
requests_toolbelt
];
meta = with stdenv.lib; {
description = "Python Reddit API wrapper";
homepage = http://praw.readthedocs.org/;
license = licenses.gpl3;
platforms = platforms.all;
maintainers = with maintainers; [ jgeerds ];
};
}

View File

@ -0,0 +1,38 @@
{ stdenv, buildPythonPackage, fetchFromGitHub
, requests
, testfixtures, mock, requests_toolbelt
, betamax, betamax-serializers, betamax-matchers
}:
buildPythonPackage rec {
pname = "prawcore";
version = "0.12.0";
src = fetchFromGitHub {
owner = "praw-dev";
repo = "prawcore";
rev = "v${version}";
sha256 = "1z5fz6v4bv6xw84l4q3rpw3j63bb2dldl0fd6ckz8wqlpb2l45br";
};
propagatedBuildInputs = [
requests
];
checkInputs = [
testfixtures
mock
betamax
betamax-serializers
betamax-matchers
requests_toolbelt
];
meta = with stdenv.lib; {
description = "Low-level communication layer for PRAW";
homepage = http://praw.readthedocs.org/;
license = licenses.gpl3;
platforms = platforms.all;
maintainers = with maintainers; [ jgeerds ];
};
}

View File

@ -0,0 +1,24 @@
{ stdenv, buildPythonApplication, fetchPypi
, pytest, nose }:
buildPythonApplication rec {
pname = "sybil";
version = "1.0.5";
src = fetchPypi {
inherit pname version;
sha256 = "0x8qd5p5qliv8wmdglda2iy3f70i4jg8zqyk8yhklm5hrxm8jdl6";
};
checkInputs = [ pytest nose ];
checkPhase = ''
py.test tests
'';
meta = with stdenv.lib; {
description = "Automated testing for the examples in your documentation.";
homepage = https://github.com/cjw296/sybil/;
license = licenses.mit;
};
}

View File

@ -0,0 +1,23 @@
{ stdenv, buildPythonPackage, fetchPypi
, mock, manuel, pytest, sybil, zope_component, django }:
buildPythonPackage rec {
pname = "testfixtures";
version = "5.3.0";
src = fetchPypi {
inherit pname version;
sha256 = "1xfar653qmikwb94xj3f0xfp8dh2llxjsxipx1272d8qwl0aknnx";
};
checkInputs = [ mock manuel pytest sybil zope_component ];
checkPhase = ''
# django is too much hasle to setup at the moment
pytest --ignore=testfixtures/tests/test_django testfixtures/tests
'';
meta = with stdenv.lib; {
homepage = "https://github.com/Simplistix/testfixtures";
};
}

View File

@ -0,0 +1,22 @@
{ stdenv, buildPythonPackage, fetchPypi, requests}:
buildPythonPackage rec {
pname = "update_checker";
version = "0.16";
src = fetchPypi {
inherit pname version;
sha256 = "1f38l40d32dm0avcidf3dmikma8z0la84yngj88v4xygzi399qvh";
};
propagatedBuildInputs = [ requests ];
# requires network
doCheck = false;
meta = with stdenv.lib; {
description = "A python module that will check for package updates";
homepage = https://github.com/bboe/update_checker;
license = licenses.bsd2;
};
}

View File

@ -1311,24 +1311,9 @@ in {
};
};
betamax-matchers = buildPythonPackage rec {
name = "betamax-matchers-${version}";
version = "0.3.0";
betamax-matchers = callPackage ../development/python-modules/betamax-matchers { };
src = pkgs.fetchurl {
url = "mirror://pypi/b/betamax-matchers/${name}.tar.gz";
sha256 = "039kvqsdcvvlfxjc3n1x2xvjg6qkqbql0p7rc4z7bnxm9kcm88la";
};
buildInputs = with self; [ betamax requests_toolbelt ];
meta = with stdenv.lib; {
homepage = https://github.com/sigmavirus24/betamax_matchers;
description = "A group of experimental matchers for Betamax";
license = licenses.asl20;
maintainers = with maintainers; [ pSub ];
};
};
betamax-serializers = callPackage ../development/python-modules/betamax-serializers { };
bibtexparser = callPackage ../development/python-modules/bibtexparser { };
@ -15066,34 +15051,9 @@ in {
};
};
praw = buildPythonPackage rec {
name = "praw-3.5.0";
praw = callPackage ../development/python-modules/praw { };
src = pkgs.fetchurl {
url = "mirror://pypi/p/praw/${name}.zip";
sha256 = "1hwdzqbrjdkicqhyxpcpsmld21k0ndpy8d2gk6l5mv9isw3dm8qa";
};
propagatedBuildInputs = with self; [
requests
decorator
flake8
mock
six
update_checker
];
# can't find the tests module?
doCheck = false;
meta = {
description = "Python Reddit API wrapper";
homepage = http://praw.readthedocs.org/;
license = licenses.gpl3;
platforms = platforms.all;
maintainers = with maintainers; [ jgeerds ];
};
};
prawcore = callPackage ../development/python-modules/prawcore { };
premailer = callPackage ../development/python-modules/premailer { };
@ -19733,6 +19693,8 @@ in {
};
};
sybil = callPackage ../development/python-modules/sybil { };
syncthing-gtk = buildPythonPackage rec {
version = "0.9.2.3";
name = "syncthing-gtk-${version}";
@ -20556,24 +20518,7 @@ in {
};
};
update_checker = buildPythonPackage rec {
name = "update_checker-0.11";
src = pkgs.fetchurl {
url = "mirror://pypi/u/update_checker/${name}.tar.gz";
sha256 = "681bc7c26cffd1564eb6f0f3170d975a31c2a9f2224a32f80fe954232b86f173";
};
propagatedBuildInputs = with self; [ requests ];
doCheck = false;
meta = {
description = "A python module that will check for package updates";
homepage = https://github.com/bboe/update_checker;
license = licenses.bsd2;
};
};
update_checker = callPackage ../development/python-modules/update_checker {};
uritemplate = buildPythonPackage rec {
name = "uritemplate-${version}";
@ -21809,30 +21754,7 @@ EOF
};
};
testfixtures = buildPythonPackage rec {
name = "testfixtures-${version}";
version = "4.5.0";
src = pkgs.fetchurl {
url = "mirror://pypi/t/testfixtures/testfixtures-${version}.tar.gz";
sha256 = "0my8zq9d27mc7j78pz9971cn5wz6zi4vxlqa50szr2vq9j2xxkll";
};
buildInputs = with self; [ nose mock manuel ];
checkPhase = ''
nosetests -v
'';
# Test suite seems broken
# TypeError: TestSuite() missing 1 required positional argument: 'm'
# Haven't checked with newer version
doCheck = false;
meta = with stdenv.lib; {
homepage = "https://github.com/Simplistix/testfixtures";
};
};
testfixtures = callPackage ../development/python-modules/testfixtures {};
tissue = buildPythonPackage rec {
name = "tissue-0.9.2";