Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rodan workaround step 2: gamera for staff removal  #1158

Open
kyrieb-ekat opened this issue May 30, 2024 · 1 comment
Open

Rodan workaround step 2: gamera for staff removal  #1158

kyrieb-ekat opened this issue May 30, 2024 · 1 comment
Assignees

Comments

@kyrieb-ekat
Copy link

kyrieb-ekat commented May 30, 2024

Log space for staff removal using gamera; thank you Lucas for your earlier help. Other details on progress in this can be found here hsnr-gamera/gamera-4#72 . Per last recommendation in other thread, trying recommendations, then worst case trying the Ubuntu attempt.

@kyrieb-ekat
Copy link
Author

kyrieb-ekat commented May 30, 2024

installation fix in the png_support.py file to add the specific libpng path worked, proceeding to trying to get the wrapper fix going.

#
# wrapper script for running gamera_gui
# from virtualenv with homebrew python
#

source /usr/local/lib/py2gamera/bin/activate

WXPYTHON_APP="gamera_gui"
PYVER="$(python --version 2>&1 | cut -d ' ' -f 2 | cut -d '.' -f 1,2)"

if [ -z "$VIRTUAL_ENV" ] ; then
    echo "You must activate your virtualenv: set '$VIRTUAL_ENV'"
    exit 1
fi

SYSTEM_FRAMEWORK_PYTHON_ROOT="/System$SYSTEM_FRAMEWORK_PYTHON_ROOT"

PYSUBVER="$(python --version 2>&1 | cut -d ' ' -f2)"  # e.g., 2.7.10
BREW_PYTHON_ROOT="`ls -d $(brew --prefix)/Cellar/python@2/$PYSUBVER*`"
BREW_PYTHON_ROOT="$BREW_PYTHON_ROOT/Frameworks/Python.framework/Versions/$PYVER"

PYTHON_BINARY="bin/python$PYVER"
FRAMEWORK_PYTHON="$BREW_PYTHON_ROOT/$PYTHON_BINARY"

VENV_SITE_PACKAGES="$VIRTUAL_ENV/lib/python$PYVER/site-packages"

# Ensure wx.pth is set up in the virtualenv
# (does not seem to be necessary, so we comment it out)
#test -e "$VENV_SITE_PACKAGES/wx.pth" || \
#  cp "/Library/Python/$PYVER/site-packages/wxredirect.pth" "$VENV_SITE_PACKAGES/wx.pth"

# Use the Framework Python to run the app
export PYTHONHOME=$VIRTUAL_ENV
exec "$FRAMEWORK_PYTHON" "$VIRTUAL_ENV/bin/$WXPYTHON_APP" $*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants