Path: csiph.com!news.mixmin.net!weretis.net!feeder4.news.weretis.net!ecngs!testfeeder.ecngs.de!newsfeed.freenet.ag!newsfeed.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!not-for-mail From: "David N. Mashburn" Newsgroups: comp.lang.python.announce Subject: ANN: Cpyx 0.2 Date: Thu, 10 Dec 2015 01:12:37 -0500 Lines: 72 Approved: python-announce-list@python.org Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de KoByyfPo0f9tExXxc4d1GgNQBbviAyhETfqK9Q7L/aTQ== Return-Path: X-Original-To: python-announce-list@python.org Delivered-To: python-announce-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; 'distutils': 0.05; 'installed.': 0.05; 'url:bitbucket': 0.05; 'subject:ANN': 0.07; 'verbatim': 0.07; 'wrapper': 0.07; '0.1': 0.09; 'url:github': 0.09; 'python': 0.10; 'python.': 0.11; 'argument': 0.15; '"cc"': 0.16; '(everything': 0.16; '0.2': 0.16; 'cheers!': 0.16; 'code),': 0.16; 'ideally,': 0.16; 'notably': 0.16; 'numpy': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'string': 0.17; 'debugging': 0.18; 'linux,': 0.18; 'library': 0.20; 'windows': 0.20; 'extension': 0.20; '(the': 0.22; 'arguments': 0.22; 'dropped': 0.22; 'import': 0.24; '(most': 0.24; 'examples': 0.24; 'header:User-Agent:1': 0.26; 'example': 0.26; 'command': 0.26; 'linux': 0.26; 'helpful': 0.27; 'supported': 0.27; 'module.': 0.27; 'function': 0.28; "skip:' 10": 0.28; 'resolution': 0.28; 'cases.': 0.29; 'quoting': 0.29; 'there.': 0.30; 'anywhere': 0.30; 'code': 0.30; 'branch': 0.30; 'skip:g 30': 0.30; 'skip:[ 10': 0.31; "i'd": 0.31; 'core': 0.32; 'included': 0.32; 'run': 0.33; 'url:python': 0.33; 'builds': 0.33; 'ubuntu': 0.33; 'utility': 0.33; 'message-id:@gmail.com': 0.34; 'worked': 0.34; 'list': 0.34; 'received:google.com': 0.35; 'path': 0.35; 'quite': 0.35; 'supports': 0.35; 'but': 0.36; 'should': 0.36; 'project': 0.36; 'there': 0.36; 'url:org': 0.36; 'lines': 0.36; 'received:209.85': 0.36; '(and': 0.36; '(i.e.': 0.36; 'subject:: ': 0.37; 'two': 0.37; 'mac': 0.37; 'received:209.85.213': 0.37; 'signature': 0.37; 'sources': 0.37; 'thought': 0.37; 'doing': 0.38; 'version': 0.38; 'received:209': 0.38; 'names': 0.38; 'shared': 0.38; 'does': 0.39; 'build': 0.40; 'to:addr:python.org': 0.40; 'easy': 0.60; 'relatively': 0.63; 'complete': 0.63; 'information': 0.63; 'here:': 0.63; 'mingw': 0.84; 'url:master': 0.84; 'announcing': 0.91; 'thoroughly': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:message-id:date:user-agent:mime-version :content-type:content-transfer-encoding; bh=MdBRjl6tPA9xBAJHgArB343NTfV1YIwjYQbhNqyvaNE=; b=m9hYfNaOfFNnLQsKcfy9OTPXMOeo1mAumdAlmE9HORkqLikx/fvLCqoymb+/KcarSq YPegWP1TuQt4IegfhR40bGzyolTX418mdbWvpd9QjdDdM2WOKb3i/hCHNpbo/C5R87So BsZwqzONWEgzrxaoVkehgpHxH4aKTER3GFPcj1B2WIUqlUvHaf2WFXEegUMwhEvW/qhR SUyrDYP/oEd/Hmyh7YjcxkHRGmsaw6qYkHp6Zm1VNcc137BuuWM9oRy+NAqWg7qE+tDc eSPgVcxh+XRzqWtEqDQxpWNffgx9J7weA7dDOCOSeFiCstVzvwHodn568kWl0VkPmiKH XmeA== X-Received: by 10.50.73.106 with SMTP id k10mr6940976igv.84.1449727959269; Wed, 09 Dec 2015 22:12:39 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 X-Mailman-Approved-At: Thu, 10 Dec 2015 04:03:38 -0500 X-BeenThere: python-announce-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: Announcement-only list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python.announce:1951 Announcing Cpyx version 0.2 Github: https://github.com/davidmashburn/cpyx Bitbucket: https://bitbucket.org/davidmashburn/cpyx PyPI: https://pypi.python.org/pypi/Cpyx Cpyx is a utility to automatically build C and Cython code using either distutils or command line cython and gcc. Numpy is supported in both cases. The two core functions are cc and cpyx which compile c sources and cython+c sources respecively. * "cc" builds a shared library from all included inputs, using path resolution and quoting to aid in debugging issues (gcc commands should run verbatim from any directory). * "cpyx" builds multiple c and cython sources into a python extension module. Cpyx is quite simple (the main two functions are only ~100 lines of code), so it is easy to fiddle with. Example usage: import Cpyx Cpyx.cpyx('some_file.pyx', ['one_file.c', 'another_file.c']) Complete examples can be found here: https://github.com/davidmashburn/Cpyx/tree/master/examples NEW IN VERSION 0.2: *All functions were significantly overhauled and function names were changed* (old Cdll and Cpyx/CpyxLib became "cc" and "cpyx" respectively). Support for inlined cython code has been dropped since cython now supports this automatically using "cython.inline". New helpful utilities for extracting C function information (i.e. to generate code using templates): * get_function_raw_arguments -- Get all arguments as a single string (everything inside the parentheses) * get_function_args -- Get a string for each argument * get_function_types_and_variables -- Get a list of [type, variable] for each argument * rebuild_function_signature -- Get a well-formatted version of the full function signature Ideally, Cpyx should work anywhere gcc, cython, and python/numpy are installed. The 0.1 branch was relatively well-tested and worked on Windows (XP/Vista/7), Linux (Ubuntu), and Mac OS X (Leopard/Snow Leopard). The 0.2 branch has been pretty thoroughly tested on Ubuntu Linux, but let me know if it does not work for you on any OS. distutils may or may not work on Windows with mingw I know there are other tools out there (most notably pyximport and sage's misc/cython.py) to do this same kind of thing (and in much cooler ways). But Cpyx scratches my itch, so I thought I'd put it out there. Happy Cythoning! This project supports work that I did at Vanderbilt University and am doing at Pluralsight, LLC. Cheers! -David Mashburn

Cpyx 0.2 - A gcc/cython/distutils wrapper for compiling Cython and C code directly from python. (10-Dec-15)