diff --git a/REFERENCE.md b/REFERENCE.md index f3a382e5..fbfb0a48 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -82,6 +82,7 @@ The following parameters are available in the `python` class: * [`manage_dev_package`](#-python--manage_dev_package) * [`manage_venv_package`](#-python--manage_venv_package) * [`manage_pip_package`](#-python--manage_pip_package) +* [`manage_setuptools`](#-python--manage_setuptools) * [`venv`](#-python--venv) * [`gunicorn_package_name`](#-python--gunicorn_package_name) * [`python_pips`](#-python--python_pips) @@ -217,6 +218,14 @@ manage the state for package pip Default value: `$python::params::manage_pip_package` +##### `manage_setuptools` + +Data type: `Boolean` + +if true, install python-setuptools + +Default value: `$facts['os']['family'] ? { 'Archlinux' => true, default => false` + ##### `venv` Data type: `Python::Package::Ensure` diff --git a/manifests/init.pp b/manifests/init.pp index b457edbd..24bf08e4 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -22,6 +22,7 @@ # @param manage_dev_package manage the state of the python development package # @param manage_venv_package manage the state for package venv # @param manage_pip_package manage the state for package pip +# @param manage_setuptools if true, install python-setuptools # # @example install python from system python # class { 'python': @@ -61,6 +62,7 @@ Stdlib::Absolutepath $anaconda_install_path = '/opt/python', Boolean $manage_scl = true, Optional[Python::Umask] $umask = undef, + Boolean $manage_setuptools = $facts['os']['family'] ? { 'Archlinux' => true, default => false, }, ) inherits python::params { $exec_prefix = $provider ? { 'scl' => "/usr/bin/scl enable ${version} -- ", diff --git a/manifests/install.pp b/manifests/install.pp index c3db3d80..e2a70868 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -24,6 +24,12 @@ 'Suse' => "${python}-devel", } + if $python::manage_setuptools { + package { 'python-setuptools': + ensure => 'installed', + } + } + if $python::manage_python_package { package { 'python': ensure => $python::ensure,