setuptools-golang

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2016 License: MIT

README

Build Status Coverage Status

setuptools-golang

A setuptools extension for building cpython extensions written in golang.

Requirements

This requires golang >= 1.5. It is currently tested against 1.5 and 1.6.

This requires python >= 2.7. It is currently tested against 2.7, 3.4, 3.5, and pypy.

It is incompatible with pypy3 (for now) due to a lack of c-api.

Usage

Add setuptools-golang to the setup_requires in your setup.py and build_golang={'root': ...}. root refers to the root go import path of your project.

An extension must be a single file in the main go package (though the entire main package will be built into the extension). That package may import other code. You may have multiple extensions in your setup.py.

setup(
    ...
    build_golang={'root': 'github.com/user/project'},
    ext_modules=[Extension('example', ['example.go'])],
    setup_requires=['setuptools-golang'],
    ...
)

Writing cpython extensions in golang

TODO

Directories

Path Synopsis
testing
imports_gh command
multidir/dir1 command
multidir/dir2 command
sum command
sum_pure_go command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL