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