1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, python
5, isPy27
6, pythonAtLeast
7, pinqSupport ? false, sqlalchemy
8, pyxlSupport ? false, pyxl3
9}:
10
11buildPythonPackage rec {
12 # https://github.com/lihaoyi/macropy/issues/94
13 version = "1.1.0b2";
14 pname = "macropy";
15 disabled = isPy27;
16
17 src = fetchFromGitHub {
18 owner = "lihaoyi";
19 repo = pname;
20 rev = "v${version}";
21 sha256 = "1bd2fzpa30ddva3f8lw2sbixxf069idwib8srd64s5v46ricm2cf";
22 };
23
24 # js_snippets extra only works with python2
25 propagatedBuildInputs = [ ]
26 ++ lib.optional pinqSupport sqlalchemy
27 ++ lib.optional pyxlSupport pyxl3;
28
29 checkPhase = ''
30 ${python.interpreter} run_tests.py
31 '';
32
33 meta = with lib; {
34 homepage = "https://github.com/lihaoyi/macropy";
35 description = "Macros in Python: quasiquotes, case classes, LINQ and more";
36 license = licenses.mit;
37 maintainers = [ maintainers.costrouc ];
38 broken = pythonAtLeast "3.8"; # see https://github.com/lihaoyi/macropy/issues/103
39 };
40}