File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -63,14 +63,15 @@ const certbot = {
63
63
plugin . version = plugin . version . replace ( / { { certbot-v e r s i o n } } / g, CERTBOT_VERSION_REPLACEMENT ) ;
64
64
plugin . dependencies = plugin . dependencies . replace ( / { { certbot-v e r s i o n } } / g, CERTBOT_VERSION_REPLACEMENT ) ;
65
65
66
- const opts = { } ;
66
+ // SETUPTOOLS_USE_DISTUTILS is required for certbot plugins to install correctly
67
+ // in new versions of Python
68
+ let env = Object . assign ( { } , process . env , { SETUPTOOLS_USE_DISTUTILS : 'stdlib' } ) ;
67
69
if ( typeof plugin . env === 'object' ) {
68
- // include process.env in opts
69
- opts . env = Object . assign ( { } , process . env , plugin . env ) ;
70
+ env = Object . assign ( env , plugin . env ) ;
70
71
}
71
72
72
73
const cmd = `. /opt/certbot/bin/activate && pip install --no-cache-dir ${ plugin . dependencies } ${ plugin . package_name } ${ plugin . version } && deactivate` ;
73
- return utils . exec ( cmd , opts )
74
+ return utils . exec ( cmd , { env } )
74
75
. then ( ( result ) => {
75
76
logger . complete ( `Installed ${ pluginKey } ` ) ;
76
77
return result ;
Original file line number Diff line number Diff line change 477
477
"version" : " ~=0.2.1" ,
478
478
"dependencies" : " PyYAML==5.3.1" ,
479
479
"credentials" : " dns_powerdns_api_url = https://api.mypowerdns.example.org\n dns_powerdns_api_key = AbCbASsd!@34" ,
480
- "full_plugin_name" : " dns-powerdns" ,
481
- "env" : {
482
- "SETUPTOOLS_USE_DISTUTILS" : " stdlib"
483
- }
480
+ "full_plugin_name" : " dns-powerdns"
484
481
},
485
482
"regru" : {
486
483
"name" : " reg.ru" ,
You can’t perform that action at this time.
0 commit comments