Skip to content

Commit

Permalink
chore: Update dependencies and build configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
cauliyang committed Feb 3, 2024
1 parent f199e37 commit 847a7f7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 32 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,20 +180,6 @@ jobs:
with:
python-version: "3.10"

- name: Install Dependencies
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1 # Do not run brew cleanup automatically.
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 # Do not automatically update packages.
run: |
# brew install openssl@3
# mkdir -p /usr/local/include
# mkdir -p /usr/local/lib
ln -sf $(brew --prefix openssl)/include/openssl /usr/include/openssl
ln -sf $(brew --prefix openssl)/lib/*a /usr/lib/
ln -sf $(brew --prefix openssl)/lib/*dylib /usr/lib/
ls $(brew --prefix openssl)/include
- name: Install poetry
uses: snok/install-poetry@v1
with:
Expand Down
42 changes: 25 additions & 17 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,25 +160,33 @@ def find_available_library(lib_name: str, *, ignores=[]):
return Path(lib_path).parent, header_path


# def find_openssl_libs():
# openssl_dir = subprocess.getoutput('openssl version -d')
# openssl_dir = openssl_dir.replace('OPENSSLDIR: "', '').replace('"', '').strip()
def find_openssl_libs_header():
from shutil import which
import platform

# lib_paths = [f"{openssl_dir}/lib"]
# head_paths = [f"{openssl_dir}/include"]
current_platform = platform.system().lower()

lib_paths = []
head_paths = []

# if not Path(lib_paths[0]).exists():
# print(f"Cannot find openssl lib in {lib_paths[0]}")
# else:
# print(f"Find openssl lib_paths: {lib_paths}")
if current_platform == "darwin" and which("brew"):
openssl_dir = subprocess.getoutput('brew --prefix openssl')

# if not Path(head_paths[0]).exists():
# print(f"Cannot find openssl include in {head_paths[0]}")
# else:
# print(f"Find openssl include: {head_paths}")
lib_paths.append(f"{openssl_dir}/lib")
head_paths.append(f"{openssl_dir}/include")

if not Path(lib_paths[0]).exists():
print(f"Cannot find openssl lib in {lib_paths[0]}")
else:
print(f"Find openssl lib_paths: {lib_paths}")

if not Path(head_paths[0]).exists():
print(f"Cannot find openssl include in {head_paths[0]}")
else:
print(f"Find openssl include: {head_paths}")

return lib_paths, head_paths

# return lib_paths, head_paths

def _extra_compile_args_for_libpxblat():
return [
Expand Down Expand Up @@ -214,12 +222,12 @@ def _extra_compile_args_for_pxblat():
ParallelCompile(f"{get_thread_count()}").install()


# openssl_lib, openssl_include = find_openssl_libs()
openssl_lib, openssl_include = find_openssl_libs_header()

extra_compile_args = ["-pthread"]
hidden_visibility_args = []
include_dirs: list[str] = []
library_dirs: list[str] = []
include_dirs: list[str] = [] + openssl_include
library_dirs: list[str] = [] + openssl_lib
python_module_link_args = []
base_library_link_args: list[str] = []
external_libraries = [
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pxblat"
version = "1.1.17"
version = "1.1.18"
description = "A native python binding for blat suite"
authors = ["Yangyang Li <yangyang.li@northwestern.edu>"]
homepage = "https://github.com/ylab-hi/pxblat"
Expand Down

0 comments on commit 847a7f7

Please sign in to comment.