Skip to main content

Convert `.pyx` to `(.pyd|.so)` very easily.

Project description

Because writing a setup.py each time is painful.

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

$ python easycython.py myext.pyx

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

$ easycython myext.pyx

or even:

$ easycython *.pyx

You can type:

$ easycython -h

to obtain the following CLI:

usage: easycython.py [-h] [--annotation] [--no-annotation] [--numpy-includes]
                     [--no-numpy-includes]
                     [filenames [filenames ...]]

positional arguments:
  filenames

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

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

  • Compiler flags -O2 -march=native are automatically passed to the compiler. I have not yet had to step through the generated C code with a debugger.

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

easycython-1.0.6.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

easycython-1.0.6-py2.py3-none-any.whl (5.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file easycython-1.0.6.tar.gz.

File metadata

  • Download URL: easycython-1.0.6.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for easycython-1.0.6.tar.gz
Algorithm Hash digest
SHA256 4aec800ef5a1a84e384903e335c2286d8d336ba30064035417ba306e409d6051
MD5 498010f9a8626bb1324e702603ac537a
BLAKE2b-256 a19e5f1c52e1c5b3391d1bf7efba4d824e7182243350ed76109860e75dceaa41

See more details on using hashes here.

File details

Details for the file easycython-1.0.6-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for easycython-1.0.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0c5c06e5c820e199cb3515a86279af0f8a7a4d2b43bd240d81544b367ccfa01a
MD5 c355dda0ba2a8f4cccf30708325f2863
BLAKE2b-256 464d3c8545a65f61e18dfd0467b5789e35ab3c8d1cca90903116388dfd12c571

See more details on using hashes here.

Supported by

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