python-telegram-bot: use urllib3 from nixpkgs, disable all tests properly
This commit is contained in:
parent
5738da94f4
commit
7a82c83c63
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchPypi, buildPythonPackage, isPy3k, certifi, future }:
|
||||
{ stdenv, fetchPypi, buildPythonPackage, certifi, future, urllib3 }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "python-telegram-bot";
|
||||
@ -9,8 +9,18 @@ buildPythonPackage rec {
|
||||
sha256 = "0a5b4wfc6ms7kblynw2h3ygpww98kyz5n8iibqbdyykwx8xj7hzm";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ certifi future ];
|
||||
doCheck = !isPy3k;
|
||||
prePatch = ''
|
||||
rm -rf telegram/vendor
|
||||
substituteInPlace telegram/utils/request.py \
|
||||
--replace "import telegram.vendor.ptb_urllib3.urllib3 as urllib3" "import urllib3 as urllib3" \
|
||||
--replace "import telegram.vendor.ptb_urllib3.urllib3.contrib.appengine as appengine" "import urllib3.contrib.appengine as appengine" \
|
||||
--replace "from telegram.vendor.ptb_urllib3.urllib3.connection import HTTPConnection" "from urllib3.connection import HTTPConnection" \
|
||||
--replace "from telegram.vendor.ptb_urllib3.urllib3.util.timeout import Timeout" "from urllib3.util.timeout import Timeout"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ certifi future urllib3 ];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "This library provides a pure Python interface for the Telegram Bot API.";
|
||||
|
Loading…
Reference in New Issue
Block a user