summaryrefslogtreecommitdiff
path: root/BUILD.bazel
blob: dc694c922d6bf8cd1d1b183d8ea599c2403271dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Bazel build file for inclusion as external dependency.
#
# Most useful is the pyx_library rule from //Tools:rules.bzl
# which mirrors py_library but compiles .pyx files.

py_library(
    name = "cython_lib",
    srcs = glob(
        ["Cython/**/*.py"],
        exclude = [
            "**/Tests/*.py",
        ],
    ) + ["cython.py"],
    data = glob([
        "Cython/**/*.pyx",
        "Cython/Utility/*.*",
        "Cython/Includes/**/*.pxd",
    ]),
    visibility = ["//visibility:public"],
)

py_binary(
    name = "cythonize",
    srcs = ["cythonize.py"],
    visibility = ["//visibility:public"],
    deps = ["cython_lib"],
)

py_binary(
    name = "cython",
    srcs = ["cython.py"],
    visibility = ["//visibility:public"],
    deps = ["cython_lib"],
)