项目作者: slurps-mad-rips

项目描述 :
Black Magic to hook into setuptools and distutils for Extensions
高级语言: C++
项目地址: git://github.com/slurps-mad-rips/brujeria.git
创建时间: 2018-02-21T22:27:36Z
项目社区:https://github.com/slurps-mad-rips/brujeria

开源协议:MIT License

下载




Overview

Brujería is a python library that simplifies development workflow for native
extensions. It does this by providing import hooks that allow you to compile
your extensions on import (much like cppimport) so you can play around with
the API in a REPL. Lastly, it provides some hooks so that using these from
tools like poetry are just a single line. It does all of this via CMake, but
in a way to reduce the need to touch CMake in the first place.

Brujería currently utilizes IXM to reduce the overhead of
maintaining a CMake project.

Features

Currently, Brujería provides the following:

  • Automatic discovery of C and C++ extensions.
  • Basic MinGW Support (CPython does not guarantee this)
  • Works on Windows, macOS, and Linux
  • The ability to mix C and C++ in a single extension (distutils/
    1. `setuptools` do not currently permit this)
  • Basic poetry integration via preprovided build function.
  • pyproject.toml integration for configuration settings

Why the name?

Brujería is a spanish word for “witchcraft”. Given the strange, mystic, and
sometimes arcane steps that distutils and setuptools must take when building
native extensions, it only makes sense that a library that takes advantage of
various undocumented hooks might be labelled Black Magic.