Add toggle for python wheel build process
If a package (like stackviz) should be installed using a tarball, rather than from a git source, then it is better to be able to disable the wheel build process, constraints usage, etc and just install it from the tarball. Change-Id: Id1dc504586a3a1bbd7a161b7367606ced3789043
This commit is contained in:
parent
53dea0d306
commit
b84199341f
@ -95,6 +95,12 @@ venv_python_executable: "python2"
|
||||
# installed packages.
|
||||
venv_rebuild: no
|
||||
|
||||
# Enable/disable the build of python wheels
|
||||
# If the package concerned is built from a tarball, rather
|
||||
# than from a git source or pypi, then this may be best to
|
||||
# set to false.
|
||||
venv_wheel_build_enable: "{{ venv_build_host != inventory_hostname }}"
|
||||
|
||||
# Set the host where the wheels will be built.
|
||||
# If this host is not the same as the target host, then
|
||||
# python wheels will be built in order to speed up the
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
- name: Install distro packages for venv build
|
||||
package:
|
||||
name: "{{ (venv_build_host != inventory_hostname) | ternary(venv_install_distro_package_list, (venv_build_base_distro_package_list + venv_build_distro_package_list + venv_install_distro_package_list) | unique) }}"
|
||||
name: "{{ (venv_wheel_build_enable | bool) | ternary(venv_install_distro_package_list, (venv_build_base_distro_package_list + venv_build_distro_package_list + venv_install_distro_package_list) | unique) }}"
|
||||
state: "{{ venv_distro_package_state }}"
|
||||
update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}"
|
||||
cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(venv_distro_cache_valid_time, omit) }}"
|
||||
@ -77,7 +77,7 @@
|
||||
copy:
|
||||
dest: "{{ venv_install_destination_path }}/constraints.txt"
|
||||
content: |
|
||||
{% if (venv_build_host != inventory_hostname) and
|
||||
{% if (venv_wheel_build_enable | bool) and
|
||||
(_constraints_file_slurp is defined) and
|
||||
(_constraints_file_slurp.content is defined) %}
|
||||
{{ _constraints_file_slurp.content | b64decode }}
|
||||
|
@ -17,7 +17,7 @@
|
||||
delegate_to: "{{ venv_build_host }}"
|
||||
become: "{{ venv_build_host == 'localhost' }}"
|
||||
when:
|
||||
- venv_build_host != inventory_hostname
|
||||
- venv_wheel_build_enable | bool
|
||||
block:
|
||||
- name: Install distro packages for wheel build
|
||||
package:
|
||||
|
Loading…
x
Reference in New Issue
Block a user