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

If dir_target ("/target") directory does not exist, install_dependencies task fails #658

Closed
tjoneslo opened this issue Mar 3, 2020 · 2 comments · Fixed by #666
Closed
Assignees
Labels

Comments

@tjoneslo
Copy link

tjoneslo commented Mar 3, 2020

# pyb --version
pyb 0.12.0.dev20200301164703

# pyb -v -X install_dependencies
[INFO]  Installing all dependencies
[DEBUG] Inspecting package requirements.txt
[DEBUG] Package requirements.txt is a requirement file and will be updated
Traceback (most recent call last):
  File "/.venv/lib/python3.8/site-packages/pybuilder/cli.py", line 433, in main
    summary = reactor.build(
  File "/.venv/lib/python3.8/site-packages/pybuilder/reactor.py", line 235, in build
    execution_summary = self.build_execution_plan(tasks, execution_plan)
  File "/.venv/lib/python3.8/site-packages/pybuilder/reactor.py", line 270, in build_execution_plan
    task_execution_summaries = self.execution_manager.execute_execution_plan(
  File "/.venv/lib/python3.8/site-packages/pybuilder/execution.py", line 399, in execute_execution_plan
    summaries.append(self.execute_task(task, **kwargs))
  File "/.venv/lib/python3.8/site-packages/pybuilder/execution.py", line 346, in execute_task
    task.execute(self.logger, kwargs, _executable=_executable)
  File "/.venv/lib/python3.8/site-packages/pybuilder/execution.py", line 187, in execute
    executable.execute(argument_dict)
  File "/.venv/lib/python3.8/site-packages/pybuilder/execution.py", line 101, in execute
    self.callable(*arguments)
  File "/.venv/lib/python3.8/site-packages/pybuilder/plugins/python/install_dependencies_plugin.py", line 53, in install_dependencies
    install_dependency(logger, project, as_list(project.build_dependencies) + as_list(project.dependencies),
  File "/.venv/lib/python3.8/site-packages/pybuilder/install_utils.py", line 47, in install_dependencies
    create_constraint_file(constraints_file, dependency_constraints)
  File "/.venv/lib/python3.8/site-packages/pybuilder/pip_utils.py", line 202, in create_constraint_file
    with open(file_name, "wt") as fout:
FileNotFoundError: [Errno 2] No such file or directory: '/workspace/target/install_dependencies_constraints'
------------------------------------------------------------
BUILD FAILED - [Errno 2] No such file or directory: '/workspace/target/install_dependencies_constraints'
------------------------------------------------------------

This works if I do the following first:

mkdir -p /workspace/target/logs/install_dependencies
@arcivanov
Copy link
Member

Thanks!

@arcivanov
Copy link
Member

You shouldn't need install_dependencies anymore at all, but this is very helpful, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants