Add venv on Mac and do not use --user flag in that case
parent
b9e68ec79b
commit
9307536827
|
@ -168,9 +168,17 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
bash .github/scripts/python.sh -d
|
bash .github/scripts/python.sh -d
|
||||||
|
|
||||||
|
- name: Create virtual on MacOS
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
run: |
|
||||||
|
python$PYTHON_VERSION -m venv venv
|
||||||
|
source venv/bin/activate
|
||||||
|
echo "PATH=$(pwd)/venv/bin:$PATH" >> $GITHUB_ENV
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
|
||||||
- name: Install Python Dependencies
|
- name: Install Python Dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: python$PYTHON_VERSION -m pip install --break-system-packages --user -r python/dev_requirements.txt
|
run: python$PYTHON_VERSION -m pip install -r python/dev_requirements.txt
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
@ -266,7 +266,7 @@ endif()
|
||||||
# Add custom target so we can install with `make python-install`
|
# Add custom target so we can install with `make python-install`
|
||||||
set(GTSAM_PYTHON_INSTALL_TARGET python-install)
|
set(GTSAM_PYTHON_INSTALL_TARGET python-install)
|
||||||
add_custom_target(${GTSAM_PYTHON_INSTALL_TARGET}
|
add_custom_target(${GTSAM_PYTHON_INSTALL_TARGET}
|
||||||
COMMAND ${PYTHON_EXECUTABLE} -m pip install --break-system-packages --user .
|
COMMAND ${PYTHON_EXECUTABLE} -m pip install $(if [ -z "$VIRTUAL_ENV" ]; then echo "--user"; fi) .
|
||||||
DEPENDS ${GTSAM_PYTHON_DEPENDENCIES}
|
DEPENDS ${GTSAM_PYTHON_DEPENDENCIES}
|
||||||
WORKING_DIRECTORY ${GTSAM_PYTHON_BUILD_DIRECTORY})
|
WORKING_DIRECTORY ${GTSAM_PYTHON_BUILD_DIRECTORY})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue