1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/python-modules/prawcore/default.nix
Jonathan Ringer 01f1f3d5d0
python2Packages.prawcore: disable on python2
no longer compatible with python2's urllib

```
  prawcore/exceptions.py:2: in <module>
      from urllib.parse import urlparse
  E   ImportError: No module named parse
  builder for '/nix/store/3l1rqygq58hbwyzn6fqx8x4djbmzgggh-python2.7-prawcore-1.4.0.drv' failed with exit code
```
2020-07-04 08:32:46 -07:00

43 lines
903 B
Nix

{ stdenv, buildPythonPackage, fetchPypi, isPy27
, requests
, testfixtures, mock, requests_toolbelt
, betamax, betamax-serializers, betamax-matchers, pytest
}:
buildPythonPackage rec {
pname = "prawcore";
version = "1.4.0";
disabled = isPy27; # see https://github.com/praw-dev/prawcore/pull/101
src = fetchPypi {
inherit pname version;
sha256 = "cf71388d869becbcbdfd90258b19d2173c197a457f2dd0bef0566b6cfb9b95a1";
};
propagatedBuildInputs = [
requests
];
checkInputs = [
testfixtures
mock
betamax
betamax-serializers
betamax-matchers
requests_toolbelt
pytest
];
checkPhase = ''
pytest
'';
meta = with stdenv.lib; {
description = "Low-level communication layer for PRAW";
homepage = "https://praw.readthedocs.org/";
license = licenses.gpl3;
platforms = platforms.all;
maintainers = with maintainers; [ ];
};
}