Skip to content

Commit

Permalink
Try again.
Browse files Browse the repository at this point in the history
  • Loading branch information
adalisk-emikhaylov committed Sep 20, 2024
1 parent ddd463b commit 3cf9f7e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pip-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,9 @@ jobs:
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64
./scripts/mrbind/generate_win.bat -B PACKAGE_NAME=meshlib PYTHON_PKGCONF_NAME=python-${{matrix.py-version}}-embed
./scripts/mrbind/generate_win.bat -B PACKAGE_NAME=meshlib \
PYTHON_CFLAGS=-IC:/hostedtoolcache/windows/python/${{steps.setup-python.outputs.python-version}}/x64/include \
PYTHON_LDFLAGS=-LC:/hostedtoolcache/windows/python/${{steps.setup-python.outputs.python-version}}/x64/libs -l${{matrix.py-file}}
- name: Run Test
working-directory: source\x64\Release
Expand Down
11 changes: 6 additions & 5 deletions scripts/mrbind/generate.mk
Original file line number Diff line number Diff line change
Expand Up @@ -161,17 +161,16 @@ endif
DEPS_INCLUDE_DIR := $(DEPS_BASE_DIR)/include

# Pkg-config name for Python.
ifneq ($(and $(value PYTHON_CFLAGS),$(value PYTHON_LDFLAGS)),)
$(info Using custom Python flags.)
else
ifneq ($(IS_WINDOWS),)
$(info Following Python pkg-config files are available: $(wildcard $(DEPS_BASE_DIR)/lib/pkgconfig/python*))
PYTHON_PKGCONF_NAME := $(basename $(notdir $(lastword $(sort $(wildcard $(DEPS_BASE_DIR)/lib/pkgconfig/python-*-embed.pc)))))
else
PYTHON_PKGCONF_NAME := python3-embed
endif
$(if $(PYTHON_PKGCONF_NAME),$(info Using Python version: $(PYTHON_PKGCONF_NAME:-embed=)),$(error Can't find the Python package in vcpkg))

# Python-config executable. Currently not used on Windows.
# Returns `python3-config`, or `python-3.XX-config`.
PYTHON_CONFIG := $(subst -,,$(PYTHON_PKGCONF_NAME:-embed=))-config
endif

# Python compilation flags.
ifneq ($(IS_WINDOWS),)
Expand All @@ -188,6 +187,8 @@ ifneq ($(IS_WINDOWS),)
PYTHON_MODULE_SUFFIX := .pyd
else
PYTHON_MODULE_SUFFIX := .so
# # Python-config executable. Returns `python3-config`, or `python-3.XX-config`.
# PYTHON_CONFIG := $(subst -,,$(PYTHON_PKGCONF_NAME:-embed=))-config
# PYTHON_MODULE_SUFFIX := $(call safe_shell,$(PYTHON_CONFIG) --extension-suffix)
endif
$(info Using Python module suffix: $(PYTHON_MODULE_SUFFIX))
Expand Down
3 changes: 1 addition & 2 deletions scripts/mrbind/install_mrbind_windows_msys2.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@echo on
rem TODO: ^ change that back to off
@echo off

rem Downloads the source code for MRBind and builds it, at `C:\msys64_meshlib_mrbind\home\username\mrbind\build`.
rem Before running this, run `install_deps_windows_msys2.bat`.
Expand Down

0 comments on commit 3cf9f7e

Please sign in to comment.