https://github.com/halide/Halide
Revision 6f2cae6de519a0d1c78b79525c3c88441e79b78b authored by Alex Reinking on 28 June 2023, 16:38:47 UTC, committed by GitHub on 28 June 2023, 16:38:47 UTC
* Hoist Threads::Threads to the top level

* Remove global OpenGL dependency

This is added by the helpers as-needed. Removing it here lets one build
just libHalide without searching for OpenGL.

* Narrow scope of OpenMP to tutorial

Only the tutorial targets actually use OpenMP. Don't search for OpenMP
if WITH_TUTORIALS is off.

* Move JPEG and PNG deps to tools

Only the Halide::ImageIO library uses these directly, so limiting the
scope protects against unintented use.

* Work around CMake bug

The CMake $<TARGET_NAME_IF_EXISTS:...> genex uses dynamic scoping w.r.t.
the target environment, rather than the usual static scoping. This means
we need to move the PNG and JPEG dependencies higher up.

* Add link to CMake issue in comments.
1 parent 470f43c
Raw File
Tip revision: 6f2cae6de519a0d1c78b79525c3c88441e79b78b authored by Alex Reinking on 28 June 2023, 16:38:47 UTC
Dependency wrangling part 0/N: standard CMake modules (#7658)
Tip revision: 6f2cae6
setup.py
import pybind11
from setuptools import find_packages
from skbuild import setup
from pathlib import Path

this_directory = Path(__file__).parent
long_description = (this_directory / "README_python.md").read_text()

setup(
    name="halide",
    version='16.0.0',
    author="The Halide team",
    author_email="halide-dev@lists.csail.mit.edu",
    description="Halide is a programming language designed to make it easier "
                "to write high-performance image and array processing code.",
    long_description=long_description,
    long_description_content_type='text/markdown',
    python_requires=">=3.8",
    packages=find_packages(where="python_bindings/src"),
    package_dir={"": "python_bindings/src"},
    cmake_source_dir="python_bindings",
    cmake_args=[
        f"-Dpybind11_ROOT={pybind11.get_cmake_dir()}",
        "-DCMAKE_REQUIRE_FIND_PACKAGE_pybind11=YES",
        "-DHalide_INSTALL_PYTHONDIR=python_bindings/src",
        "-DCMAKE_INSTALL_RPATH=$<IF:$<PLATFORM_ID:Darwin>,@loader_path,$ORIGIN>",
        "-DHalide_Python_INSTALL_IMPORTED_DEPS=ON",
        "-DWITH_TESTS=NO",
        "-DWITH_TUTORIALS=NO",
        "-DWITH_PYTHON_STUBS=NO",
        "-DCMAKE_PREFIX_PATH=$ENV{CMAKE_PREFIX_PATH}",
        "--no-warn-unused-cli",
    ],
)
back to top