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