mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-07-12 04:39:37 +00:00
Set SETUPTOOLS_USE_DISTUTILS for all plugin installs, seems like they all need it.
This commit is contained in:
@ -63,14 +63,15 @@ const certbot = {
|
|||||||
plugin.version = plugin.version.replace(/{{certbot-version}}/g, CERTBOT_VERSION_REPLACEMENT);
|
plugin.version = plugin.version.replace(/{{certbot-version}}/g, CERTBOT_VERSION_REPLACEMENT);
|
||||||
plugin.dependencies = plugin.dependencies.replace(/{{certbot-version}}/g, CERTBOT_VERSION_REPLACEMENT);
|
plugin.dependencies = plugin.dependencies.replace(/{{certbot-version}}/g, CERTBOT_VERSION_REPLACEMENT);
|
||||||
|
|
||||||
const opts = {};
|
// SETUPTOOLS_USE_DISTUTILS is required for certbot plugins to install correctly
|
||||||
|
// in new versions of Python
|
||||||
|
let env = Object.assign({}, process.env, {SETUPTOOLS_USE_DISTUTILS: 'stdlib'});
|
||||||
if (typeof plugin.env === 'object') {
|
if (typeof plugin.env === 'object') {
|
||||||
// include process.env in opts
|
env = Object.assign(env, plugin.env);
|
||||||
opts.env = Object.assign({}, process.env, plugin.env);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const cmd = `. /opt/certbot/bin/activate && pip install --no-cache-dir ${plugin.dependencies} ${plugin.package_name}${plugin.version} && deactivate`;
|
const cmd = `. /opt/certbot/bin/activate && pip install --no-cache-dir ${plugin.dependencies} ${plugin.package_name}${plugin.version} && deactivate`;
|
||||||
return utils.exec(cmd, opts)
|
return utils.exec(cmd, {env})
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
logger.complete(`Installed ${pluginKey}`);
|
logger.complete(`Installed ${pluginKey}`);
|
||||||
return result;
|
return result;
|
||||||
|
@ -477,10 +477,7 @@
|
|||||||
"version": "~=0.2.1",
|
"version": "~=0.2.1",
|
||||||
"dependencies": "PyYAML==5.3.1",
|
"dependencies": "PyYAML==5.3.1",
|
||||||
"credentials": "dns_powerdns_api_url = https://api.mypowerdns.example.org\ndns_powerdns_api_key = AbCbASsd!@34",
|
"credentials": "dns_powerdns_api_url = https://api.mypowerdns.example.org\ndns_powerdns_api_key = AbCbASsd!@34",
|
||||||
"full_plugin_name": "dns-powerdns",
|
"full_plugin_name": "dns-powerdns"
|
||||||
"env": {
|
|
||||||
"SETUPTOOLS_USE_DISTUTILS": "stdlib"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"regru": {
|
"regru": {
|
||||||
"name": "reg.ru",
|
"name": "reg.ru",
|
||||||
|
Reference in New Issue
Block a user