I have a simple example package served with uwsgi, that I'm trying to switch from building with makefile rules to bazel.
The WORKSPACE file that, in addition to loading rules_python
and other default stuff (registering toolchains) also gets uwsgi as follows
load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")
new_git_repository(
name = "uwsgi",
remote = "git@github.com:unbit/uwsgi.git",
commit = "ca8bc6acc98b2c062b5b00668acd851e210fcbca",
build_file_content = """
...
"""
)
What I can't quite get my head around is how to build uwsgi
. Technically, you're building a C package. However, I'm building it using the provided python script (uwsgiconfig.py
) and my configuration file (I'll call it myconf.ini
that I manually copy into the uwsgi/buildconf/
directory then build the package using python uwsgiconfig.py --build myconfig
This is the stage I'm (hopefully) trying to accomplish with bazel. However, I'm not sure if I should be using a cc_binary
or a py_binary
rule for to build uwsgi.
Any assistance is greatly appreciated.