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

small fixes for qisys.command.find_program #86

Open
dmerejkowsky opened this issue Apr 28, 2016 · 0 comments
Open

small fixes for qisys.command.find_program #86

dmerejkowsky opened this issue Apr 28, 2016 · 0 comments

Comments

@dmerejkowsky
Copy link
Contributor

  • On Windows, we should look for files with extension first, or even never look for file without extensions. Often they are scripts with shebangs (#!) that Windows cannot handle (examples are mvn and gcovr)
  • It would be convenient to insert paths to be searched directly in find_program

Right now you have to write something like:

my_dir = "C:\\foo\\bin"
import qisys.envsetter
# Prepend a dir to environ["PATH"]
env_setter = qisys.envsetter.EnvSetter()
env_setter.prepend_to_path(my_dir)
env = env_setter.get_build_env()
foo_exe = qisys.command.find_program("foo", env=env)

It would be better to have:

my_dir = "C:\\foo\\bin"
foo_exe = qisys.command.find_program("foo", paths=[my_dir])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant