This is a quick proof of concept of using the LLVM JIT compiler as
Python's extension module loader. This implelentation completely
replaces the standard extension module framework, so regular extension
modules cannot be loaded. It would not be too difficult to extend the
patch to allow loading both LLVM bitcode (.bc
) and regular extension
(.so
) modules.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Patch bitey to auto-generate struct member names with exuberant ctags.""" | |
__author__ = 'adam@adamia.com (Adam R. Smith)' | |
from collections import OrderedDict | |
import logging as log | |
import os | |
import subprocess |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
An Python re-implementation of hierarchical module import. | |
Function names and arguments have been chosen to mimic the C code in | |
`Python/import.c` whenever possible. | |
This code is intended to be read, not executed. However, it does work | |
-- all you need to do to enable it is "import knee". | |
(The name is a pun on the klunkier predecessor of this module, "ni".) |