GithubHelp home page GithubHelp logo

msullivan / mypyc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mypyc/mypyc

0.0 2.0 0.0 479 KB

Compiler from type annotated Python to C extensions

License: Other

Python 84.29% C 6.62% Makefile 0.44% C++ 8.60% Shell 0.05%

mypyc's Introduction

mypyc: Mypy to Python C Extension Compiler

Mypyc is very early in development and not yet useful for anything.

Mypyc is a compiler that aims to eventually compile mypy-annotated, statically typed Python modules into Python C extensions.

MacOS Requirements

  • macOS Sierra

  • Xcode command line tools

  • Python 3.6 (64-bit) from python.org (other versions likely won't work right now)

Linux Requirements

  • A recent enough C/C++ build environment

  • Python 3.5+ (64-bit)

Windows Requirements

Windows is currently unsupported.

Quick Start for Contributors

First clone the mypyc git repository and git submodules:

$ git clone --recurse-submodules https://github.com/JukkaL/mypyc.git
$ cd mypyc

Optionally create a virtualenv (recommended):

$ virtualenv -p python3 <directory>
$ source <directory>/bin/activate

Then install the dependencies:

$ python3 -m pip install -r external/mypy/test-requirements.txt

You need to have the mypy subdirectory in your PYTHONPATH:

$ export PYTHONPATH=`pwd`/external/mypy

Now you can run the tests:

$ pytest mypyc

Look at the issue tracker for things to work on.

Documentation

We have some developer documentation.

Development Roadmap

These are the current planned major milestones:

  1. Support a smallish but useful Python subset (exact details to be decided). Focus on compiling single modules, while the rest of the program is interpreted and does not need to be type checked. Generate useful errors for code that uses unsupported Python features.

  2. Support compiling multiple modules as a single compilation unit (or dynamic linking of compiled modules). Without this inter-module calls will use slower Python-level objects, wrapper functions and Python namespaces.

  3. Self-compilation (both mypy and mypyc).

Future

We have some ideas for future improvements and optimizations.

mypyc's People

Contributors

jhance avatar jukkal avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.