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

Plantweb usable inside a virtual environment. #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions iplantuml/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import argparse
import sys
import os
import subprocess
import uuid
Expand Down Expand Up @@ -61,9 +62,11 @@ def plantuml_web(*file_names, **kwargs):
:param file_names: the filenames of the documents for parsing by PlantUML.
:return: the path to the generated SVG UML diagram.
"""
cmd = ["plantweb",
"--format",
"auto"] + list(file_names)
# Prefix is required to find plantweb if using virtual environments
bin_location = os.path.dirname(sys.executable)
cmd = [os.path.join(bin_location, 'plantweb'),
'--format',
'auto'] + list(file_names)

return _exec_and_get_paths(cmd, file_names)

Expand Down