Skip to main content

Convert .py and .pyx to (.pyd | .so) very easily.

Project description

Cythonize one step faster

https://img.shields.io/badge/build-beta-brightgreen https://img.shields.io/badge/license-MIT-green https://img.shields.io/static/v1?label=Created%20with%20%E2%9D%A4%EF%B8%8F%20by&message=TechLearners&color=red

Introduction

cythonizer.py is a script that will attempt to automatically convert one or more .py and .pyx files into the corresponding compiled .pyd | .so binary modules files. Example:

$ python cythonizer.py myext.pyx

pip install cythonizer will automatically create an executable script in your Scripts/ folder, so you should be able to simply:

$ cythonizer myext.py

or even:

$ cythonizer *.pyx

You can type:

$ cythonizer -h

to obtain the following CLI:

usage: cythonizer.py [-h] [--annotation] [--numpy-includes]
                     [--debugmode] filenames [filenames ...]

positional arguments:
filenames         .py and .pyx files only

optional arguments:
-h, --help        show this help message and exit
--annotation      (default: False)
--numpy-includes  (default: False)
--debugmode       (default: False)
  • --annotation will create the HTML Cython annotation file.

  • --numpy-includes will add the numpy headers to the build command.

  • Compiler flags -O2 -march=native are automatically passed to the compiler.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cythonizer-1.2.0b2.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cythonizer-1.2.0b2-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file cythonizer-1.2.0b2.tar.gz.

File metadata

  • Download URL: cythonizer-1.2.0b2.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for cythonizer-1.2.0b2.tar.gz
Algorithm Hash digest
SHA256 2c58d980ca5c6586bc6f8b9fa5f7d148b68844cf59b794481d41ba93562752f9
MD5 0ffb10093b0ca94964d2bb0e2960b9bc
BLAKE2b-256 1f67af0600434e59e8c94a9a210f1d245e806b35ae902663889cefd77962d731

See more details on using hashes here.

File details

Details for the file cythonizer-1.2.0b2-py3-none-any.whl.

File metadata

  • Download URL: cythonizer-1.2.0b2-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for cythonizer-1.2.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 02855362173bc6413624bfa1d3693a2bb7ed4efcacd43070d92f44d7e7902f5f
MD5 d695c338e633681ab3ad971e52c7a5a3
BLAKE2b-256 00893eb126b613d480f0c675727fa1874c4735214ebf618a95782b3624d62e9c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page