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

fix installation of dependencies #1896

Merged
merged 3 commits into from
Jun 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions omnibus/config/software/datadog-agent-integrations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,18 @@
# Windows pip workaround to support globs
python_bin = "\"#{windows_safe_path(install_dir)}\\embedded\\python.exe\""
python_pip = "pip install -c #{windows_safe_path(install_dir)}\\agent_requirements.txt #{windows_safe_path(project_dir)}"
python_pip_req = "pip install -c #{windows_safe_path(install_dir)}\\agent_requirements.txt -r #{windows_safe_path(project_dir)}"

if windows?
command("#{python_bin} -m #{python_pip}\\datadog_checks_base")
command("#{python_bin} -m #{python_pip_req}\\datadog_checks_base\\requirements.in")
else
build_env = {
"LD_RUN_PATH" => "#{install_dir}/embedded/lib",
"PATH" => "#{install_dir}/embedded/bin:#{ENV['PATH']}",
}
pip "wheel --no-deps .", :env => build_env, :cwd => "#{project_dir}/datadog_checks_base"
pip "install -c #{install_dir}/agent_requirements.txt *.whl", :env => build_env, :cwd => "#{project_dir}/datadog_checks_base"
pip "install -c #{install_dir}/agent_requirements.txt *.whl -rrequirements.in", :env => build_env, :cwd => "#{project_dir}/datadog_checks_base"
end

# Set frozen requirements post `datadog_checks_base` - constraints file will be used by
Expand Down Expand Up @@ -171,13 +173,14 @@
File.file?("#{check_dir}/setup.py") || next
if windows?
command("#{python_bin} -m #{python_pip}\\#{check}")
command("#{python_bin} -m #{python_pip_req}\\#{check}\\requirements.in")
else
build_env = {
"LD_RUN_PATH" => "#{install_dir}/embedded/lib",
"PATH" => "#{install_dir}/embedded/bin:#{ENV['PATH']}",
}
pip "wheel --no-deps .", :env => build_env, :cwd => "#{project_dir}/#{check}"
pip "install -c #{install_dir}/agent_requirements.txt *.whl", :env => build_env, :cwd => "#{project_dir}/#{check}"
pip "install -c #{install_dir}/agent_requirements.txt *.whl -rrequirements.in", :env => build_env, :cwd => "#{project_dir}/#{check}"
end
end
end
Expand Down
2 changes: 2 additions & 0 deletions tasks/go.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,14 @@ def deps(ctx, no_checks=False, core_dir=None, verbose=False):
if core_dir:
checks_base = os.path.join(os.path.abspath(core_dir), 'datadog_checks_base')
ctx.run('pip install -{} -e {}'.format(verbosity, checks_base))
ctx.run('pip install -{} -r {}'.format(verbosity, os.path.join(checks_base, 'requirements.in')))
else:
core_dir = os.path.join(os.getcwd(), 'vendor', 'integrations-core')
checks_base = os.path.join(core_dir, 'datadog_checks_base')
if not os.path.isdir(core_dir):
ctx.run('git clone -{} https://github.com/DataDog/integrations-core {}'.format(verbosity, core_dir))
ctx.run('pip install -{} {}'.format(verbosity, checks_base))
ctx.run('pip install -{} -r {}'.format(verbosity, os.path.join(checks_base, 'requirements.in')))


@task
Expand Down