build/xilinx/vivado: cleanup pull request #170

This commit is contained in:
Florent Kermarrec 2019-04-23 05:33:56 +02:00
parent 3b24b8d5b4
commit 115c842ef0
1 changed files with 3 additions and 5 deletions

View File

@ -5,7 +5,7 @@ import os
import subprocess
import sys
import math
from distutils import spawn
from distutils.spawn import find_executable
from migen.fhdl.structure import _Fragment
@ -65,10 +65,8 @@ def _run_vivado(build_name, vivado_path, source, ver=None):
command = build_script_file
else:
build_script_contents = "# Autogenerated by Migen\nset -e\n"
# No reason to search for vivado if it's already in our $PATH
# https://stackoverflow.com/questions/377017/test-if-executable-exists-in-python
if not spawn.find_executable("vivado"):
# Only source Vivado settings if not already in our $PATH
if not find_executable("vivado"):
# For backwards compatibility with ISE paths, also
# look for a version in a subdirectory named "Vivado"
# under the current directory.