1{ lib
2, fetchFromGitHub
3, buildPythonPackage
4, requests
5, pyopenssl
6, cryptography
7, idna
8, mock
9, isPy27
10, nose
11, pytz
12, responses
13}:
14
15buildPythonPackage rec {
16 pname = "simple-salesforce";
17 version = "0.74.3";
18
19 src = fetchFromGitHub {
20 owner = pname;
21 repo = pname;
22 rev = "v${version}";
23 sha256 = "1n960xgrnmv20l31nm0im7pb4nfa83bmx4x4clqrh2jkpzq3ric0";
24 };
25
26 propagatedBuildInputs = [
27 requests
28 pyopenssl
29 cryptography
30 idna
31 ];
32
33 checkInputs = [
34 nose
35 pytz
36 responses
37 ] ++ lib.optionals isPy27 [ mock ];
38
39 postPatch = ''
40 substituteInPlace setup.py \
41 --replace "mock==1.0.1" "mock"
42 '';
43
44 meta = with lib; {
45 description = "A very simple Salesforce.com REST API client for Python";
46 homepage = "https://github.com/simple-salesforce/simple-salesforce";
47 license = licenses.asl20;
48 maintainers = with maintainers; [ costrouc ];
49 };
50
51}