Skip to content

Commit

Permalink
Merge pull request #502 from gaphor/fix-macos-build
Browse files Browse the repository at this point in the history
Fix macos build
  • Loading branch information
danyeaw committed Oct 26, 2020
2 parents 29eb9f3 + 1fa1f4f commit 747fdfb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: ${{ runner.os }}-poetry-
- name: Install Python Dependencies
run: poetry install
run: make install
- name: Test with Pytest
run: make test-all
- name: Create macOS Application
Expand Down
12 changes: 0 additions & 12 deletions macos-dmg/package-local.sh

This file was deleted.

14 changes: 10 additions & 4 deletions macos-dmg/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,19 @@ function log() {
rm -rf Gaphor.app Gaphor-*.dmg


# Make a virtual env, so we are not bothered with site-packages installed on the host system
VERSION="$(poetry version | cut -d' ' -f2)"

python3 -m venv --copies --prompt Gaphor.app "${RESOURCESDIR}"
# Obtain the Python version from the python dependency.
PYVER="$(brew deps gobject-introspection | grep '^python@' | cut -d@ -f2)"

VERSION="$(poetry version | cut -d' ' -f2)"
PYVER="$(python3 -c 'import sys; print("{}.{}".format(*sys.version_info))')"
test -n "${PYVER}" || { echo "Could not determine Python version!"; exit 1; }
echo "Python version: ${PYVER}"

export LDFLAGS="-L/usr/local/opt/python@${PYVER}/lib"
export PKG_CONFIG_PATH="/usr/local/opt/python@${PYVER}/lib/pkgconfig"

# Make a virtual env, so we are not bothered with site-packages installed on the host system
"/usr/local/opt/python@${PYVER}/bin/python3" -m venv --copies --prompt Gaphor.app "${RESOURCESDIR}"

# Copy all files in the application bundle:

Expand Down

0 comments on commit 747fdfb

Please sign in to comment.