2017-11-07 13:53:19 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchFromGitHub
|
|
|
|
, requests, decorator, flake8, mock, six, update_checker, pytestrunner, prawcore
|
|
|
|
, pytest, betamax, betamax-serializers, betamax-matchers, requests_toolbelt
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "praw";
|
2018-04-13 13:47:53 +02:00
|
|
|
version = "5.4.0";
|
2017-11-07 13:53:19 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "praw-dev";
|
|
|
|
repo = "praw";
|
|
|
|
rev = "v${version}";
|
2018-04-13 13:47:53 +02:00
|
|
|
sha256 = "13vbh2r952ai2m6sc79psfwaj5fc8cssdg2pqpizg2mwd0l1s6lb";
|
2017-11-07 13:53:19 +01:00
|
|
|
};
|
|
|
|
|
2018-04-17 16:03:29 +02:00
|
|
|
postPatch = ''
|
|
|
|
# drop upper bound of prawcore requirement
|
|
|
|
sed -ri "s/'(prawcore >=.+), <.+'/'\1'/" setup.py
|
|
|
|
'';
|
|
|
|
|
2017-11-07 13:53:19 +01:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|