Skip to main content

hatch-cython

PyPI - Version PyPI - Python Version


Table of Contents

Usage

The build hook name is cython.

  • pyproject.toml
[tool.hatch.build.targets.wheel.hooks.cython]
dependencies = ["hatch-cython"]

[tool.hatch.build.targets.wheel.hooks.cython.options]
<!-- include .h or .cpp directories -->
includes = []
<!-- include numpy headers -->
include_numpy = false
include_pyarrow = false

include_somelib = {
    pkg = "somelib",
    <!-- somelib.gets_include() -> str -->
    include = "gets_include",
    <!-- somelib.gets_libraries() -> list[str] -->
    libraries = "gets_libraries",
    <!-- somelib.gets_library_dirs() -> list[str] -->
    library_dirs = "gets_library_dirs",
    <!-- somelib.some_setup_op() before build -->
    required_call = "some_setup_op"
}

compile_args = [
    <!-- single string -->
    "-std=c++17",
    <!-- list of platforms + arg -->
    { platforms = ["nt"], arg = "-std=c++17" },
    <!-- single platform + arg -->
    { platforms = "posix", arg = "-I/abc/def" },
]

directives = { boundscheck = false, nonecheck = false, language_level = 3, binding = true }

compile_kwargs = { }
  • hatch.toml
[build.targets.wheel.hooks.cython]
dependencies = ["hatch-cython"]

[build.targets.wheel.hooks.cython.options]
<!-- optional, defaults below -->
directives = { boundscheck = false, nonecheck = false, language_level = 3, binding = true }
compile-args = [
    "-O3",
]
includes = []
include_numpy = false
<!-- equivalent to include_numpy = true -->
include_somelib = { pkg = "pyarrow", include="get_include", libraries="get_libraries", library_dirs="get_library_dirs", required_call="create_library_symlinks" }

License

hatch-cython is distributed under the terms of the MIT license.

Download files

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

Source Distribution

hatch_cython-0.1.4.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

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

hatch_cython-0.1.4-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file hatch_cython-0.1.4.tar.gz.

File metadata

  • Download URL: hatch_cython-0.1.4.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for hatch_cython-0.1.4.tar.gz
Algorithm Hash digest
SHA256 016c05c0c841be11976d90b9ede384b50e16729a664ae9f20bbd27035ea81ca1
MD5 a9cfbcf196d26cc3bfabce58a5cf619a
BLAKE2b-256 11f99f42a0f154e622dd0ae2a86614dd8603eb85a5eeeb00b905dbce5c605dc4

See more details on using hashes here.

File details

Details for the file hatch_cython-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: hatch_cython-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for hatch_cython-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0a201a7848d4d3def1eedf466db2659cc4ccbb090c85d2f06affa1fd260954b7
MD5 db3217a5f8d93feb0165bb6d5dad935b
BLAKE2b-256 ec55acd548ba9c05378e6f3ff3485e5520997df16966883cea52d76cff496afc

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 Sentry Error logging StatusPage Status page