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.7.tar.gz (12.7 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.7-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hatch_cython-0.1.7.tar.gz
  • Upload date:
  • Size: 12.7 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.7.tar.gz
Algorithm Hash digest
SHA256 90691802516cc02075680854c909450a34e19c9901885c19829a4976095db093
MD5 f9f94ca9795d22f10d58df499148c7e4
BLAKE2b-256 b9c1458fdf68a8d1c659612e12450f02090f89ab466223f09e1b6a4fb6d34892

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hatch_cython-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 9.1 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 fe2bec33c5f0d9be8583e44822847c5450af876b288fc946f3ffe97a6be65b31
MD5 b7e45079d630cf54b467d72b15a2159d
BLAKE2b-256 b37479e64c59152cd122cfeeaaf1212a0ab77c47fe7bd930a50129da6e66dd03

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