1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 aiohttp,
7 requests,
8 requests-futures,
9 pytestCheckHook,
10 mock,
11}:
12
13buildPythonPackage rec {
14 pname = "py-melissa-climate";
15 version = "2.1.4";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "kennedyshead";
20 repo = "py-melissa-climate";
21 tag = version;
22 hash = "sha256-zYr+nKdO+lCLLYGSvY16MUs8TxbWcyaoQk9cwNQ704Y=";
23 };
24
25 postPatch = ''
26 substituteInPlace setup.py \
27 --replace-fail "setup_requires=['setuptools-markdown']," ""
28 '';
29
30 build-system = [ setuptools ];
31
32 dependencies = [
33 aiohttp
34 requests
35 requests-futures
36 ];
37
38 nativeCheckInputs = [
39 mock
40 pytestCheckHook
41 ];
42
43 disabledTests = [
44 # Disable failing tests due to upstream bugs
45 "test_have_connection"
46 "test_send"
47 "test_send_ok"
48 ];
49
50 pythonImportsCheck = [ "melissa" ];
51
52 meta = {
53 description = "API wrapper for Melissa Climate";
54 homepage = "https://github.com/kennedyshead/py-melissa-climate";
55 license = lib.licenses.mit;
56 maintainers = [ lib.maintainers.jamiemagee ];
57 };
58}