Skip to content

Commit

Permalink
brew instead of submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathf committed Jun 26, 2024
1 parent ff3b43e commit e113ad7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "vroom"]
path = vroom
url = https://github.com/VROOM-Project/vroom
[submodule "asio"]
path = asio
url = https://github.com/chriskohlhoff/asio
1 change: 0 additions & 1 deletion asio
Submodule asio deleted from 12e0ce
11 changes: 10 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,20 @@ manylinux-x86_64-image = "quay.io/pypa/manylinux_2_28_x86_64"
before-all = """
dnf update -y
dnf module enable -y mariadb-devel
dnf install -y openssl-devel
dnf install -y openssl-devel asio-devel
"""

[[tool.cibuildwheel.overrides]]
select = "*musllinux*"
before-all = """
apk add asio-dev
apk add openssl-dev
"""


[tool.cibuildwheel.macos]

before-all = """
brew install openssl
brew install asio
"""
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging
import os
import platform
from subprocess import run
from pathlib import Path
from setuptools import setup
from pybind11.setup_helpers import Pybind11Extension, build_ext
Expand All @@ -11,7 +12,6 @@
os.path.join("vroom", "src"),
os.path.join("vroom", "include"),
os.path.join("vroom", "include", "cxxopts", "include"),
os.path.join("asio", "asio", "include"),
]
libraries = []
library_dirs = []
Expand Down Expand Up @@ -48,8 +48,10 @@

if platform.system() == "Darwin":
# Homebrew puts include folders in weird places.
include_dirs.append("/usr/local/opt/[email protected]/include")
extra_link_args.insert(0, "-L/usr/local/opt/[email protected]/lib")
prefix = run(["brew", "--prefix"], capture_output=True).stdout.decode("utf-8")[:-1]
include_dirs.append(f"{prefix}/include")
extra_link_args.insert(0, f"-L{prefix}/lib")
assert 0, (prefix, include_dirs, extra_link_args)

# try conan dependency resolution
conanfile = tuple(Path(__file__).parent.resolve().rglob("conanbuildinfo.json"))
Expand Down

0 comments on commit e113ad7

Please sign in to comment.