We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the README the is a pyproject.toml and a hatch.toml example. The pyproject example also has hatch.toml examples in it.
Are these alternative methods, or do I need to use both to build modules with hatch-python?
Could you please split these into separate minimal use case examples?
The build hook name is cython. pyproject.toml # [tool.hatch.build.hooks.cython] # or # (hatch.toml) # [build.targets.wheel.hooks.cython] # or [tool.hatch.build.targets.wheel.hooks.cython] dependencies = ["hatch-cython"] # [tool.hatch.build.hooks.cython.options] # or # (hatch.toml) # [build.targets.wheel.hooks.cython.options] # or [tool.hatch.build.targets.wheel.hooks.cython.options] # include .h or .cpp directories includes = [] # include numpy headers include_numpy = false include_pyarrow = false # include_{custom} include_somelib = { # must be included in build-dependencies 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 "-v", # by platform { platforms = ["linux", "darwin"], arg = "-Wcpp" }, # by platform & arch { platforms = "darwin", arch = "x86_64", arg = "-arch x86_64" }, { platforms = ["darwin"], arch = "arm64", arg = "-arch arm64" }, # with pep508 markers { platforms = ["darwin"], arch = "x86_64", arg = "-I/usr/local/opt/llvm/include", depends_path = true, marker = "python_version <= '3.10'" }, ] directives = { boundscheck = false, nonecheck = false, language_level = 3, binding = true } compile_kwargs = { } hatch.toml # [build.hooks.cython] # or [build.targets.wheel.hooks.cython] dependencies = ["hatch-cython"] # [build.hooks.cython.options] # or [build.targets.wheel.hooks.cython.options] directives = { boundscheck = false, nonecheck = false, language_level = 3, binding = true } compile_args = [ "-O3", ] includes = [] include_numpy = false # equivalent to include_pyarrow = true include_somelib = { pkg = "pyarrow", include="get_include", libraries="get_libraries", library_dirs="get_library_dirs", required_call="create_library_symlinks" } define_macros = [ # ["ABC"] -> ["ABC", "FOO"] | ["ABC", "DEF"] ["NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION"], ]
The build hook name is cython.
# [tool.hatch.build.hooks.cython] # or # (hatch.toml) # [build.targets.wheel.hooks.cython] # or [tool.hatch.build.targets.wheel.hooks.cython] dependencies = ["hatch-cython"] # [tool.hatch.build.hooks.cython.options] # or # (hatch.toml) # [build.targets.wheel.hooks.cython.options] # or [tool.hatch.build.targets.wheel.hooks.cython.options] # include .h or .cpp directories includes = [] # include numpy headers include_numpy = false include_pyarrow = false # include_{custom} include_somelib = { # must be included in build-dependencies 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 "-v", # by platform { platforms = ["linux", "darwin"], arg = "-Wcpp" }, # by platform & arch { platforms = "darwin", arch = "x86_64", arg = "-arch x86_64" }, { platforms = ["darwin"], arch = "arm64", arg = "-arch arm64" }, # with pep508 markers { platforms = ["darwin"], arch = "x86_64", arg = "-I/usr/local/opt/llvm/include", depends_path = true, marker = "python_version <= '3.10'" }, ] directives = { boundscheck = false, nonecheck = false, language_level = 3, binding = true } compile_kwargs = { }
# [build.hooks.cython] # or [build.targets.wheel.hooks.cython] dependencies = ["hatch-cython"] # [build.hooks.cython.options] # or [build.targets.wheel.hooks.cython.options] directives = { boundscheck = false, nonecheck = false, language_level = 3, binding = true } compile_args = [ "-O3", ] includes = [] include_numpy = false # equivalent to include_pyarrow = true include_somelib = { pkg = "pyarrow", include="get_include", libraries="get_libraries", library_dirs="get_library_dirs", required_call="create_library_symlinks" } define_macros = [ # ["ABC"] -> ["ABC", "FOO"] | ["ABC", "DEF"] ["NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION"], ]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In the README the is a pyproject.toml and a hatch.toml example. The pyproject example also has hatch.toml examples in it.
Are these alternative methods, or do I need to use both to build modules with hatch-python?
Could you please split these into separate minimal use case examples?
The text was updated successfully, but these errors were encountered: