Skip to content

Commit

Permalink
fixes activation of venv under Linux
Browse files Browse the repository at this point in the history
Signed-off-by: cribeul <christian.perwass@de.bosch.com>
  • Loading branch information
cribeul committed Feb 1, 2024
1 parent 555125b commit 9a393e3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/generate-docs-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Build Documentation
run: |
pwd
cathy build docs -J
cathy build docs -I
- name: Check Python venv 1
run: ls
Expand All @@ -57,21 +57,20 @@ jobs:
run: ls env/docs

- name: Check Python venv 4
run: ls env/docs/Scripts
run: ls env/docs/bin


# - name: Copy index referrer
# run: cp data/wf-gen-docs/index.html ./docs/build/.
- name: Copy index referrer
run: cp data/wf-gen-docs/index.html ./docs/build/.

# - name: List docs folder
# run: ls docs/build
- name: List docs folder
run: ls docs/build

# - name: Deploy
# uses: peaceiris/actions-gh-pages@v3
# with:
# publish_branch: gh-pages
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: docs/build/
# force_orphan: true
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/
force_orphan: true

- run: echo "🍏 This job's status is ${{ job.status }}."
10 changes: 8 additions & 2 deletions src/catharsys/setup/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import io
import os
import sys
import platform
import subprocess
import typing
import json
Expand Down Expand Up @@ -233,8 +234,13 @@ def ExecShellCmd(

sEffCmd = ""
if pathVirtEnv is not None:
pathAct = pathVirtEnv / "Scripts" / "activate"
sEffCmd = "{} & ".format(str(pathAct))
if platform.system() == "Windows":
pathAct = pathVirtEnv / "Scripts" / "activate.bat"
sEffCmd = "{} & ".format(str(pathAct))
else:
pathAct = pathVirtEnv / "bin" / "activate"
sEffCmd = "source {} && ".format(str(pathAct))
# endif
# endif

sEffCmd += sCmd
Expand Down

0 comments on commit 9a393e3

Please sign in to comment.