Skip to content

Commit

Permalink
Stop installing Artman outside of Docker. (#99)
Browse files Browse the repository at this point in the history
* Stop install Artman outside of Docker.

It's totally unneeded because we use the docker image. Also, this speeds up running Synthtool significantly.

* Remove unused import
  • Loading branch information
theacodes authored Oct 17, 2018
1 parent 5788b9f commit aca80ec
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions synthtool/gcp/artman.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,13 @@
# limitations under the License.

import os
import tempfile
import platform
import venv
import tempfile

from synthtool import cache
from synthtool import log
from synthtool import shell

ARTMAN_VERSION = os.environ.get("SYNTHTOOL_ARTMAN_VERSION", "latest")
ARTMAN_VENV = cache.get_cache_dir() / "artman_venv"


class Artman:
Expand Down Expand Up @@ -95,21 +92,5 @@ def _ensure_dependencies_installed(self):
)

def _install_artman(self):
if not ARTMAN_VENV.exists():
venv.main([str(ARTMAN_VENV)])

if ARTMAN_VERSION != "latest":
version_specifier = f"=={ARTMAN_VERSION}"
else:
version_specifier = ""

shell.run(
[
ARTMAN_VENV / "bin" / "pip",
"install",
"--upgrade",
f"googleapis-artman{version_specifier}",
]
)
log.debug("Pulling artman image.")
shell.run(["docker", "pull", f"googleapis/artman:{ARTMAN_VERSION}"])

0 comments on commit aca80ec

Please # to comment.