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 = {
6363 plugin . version = plugin . version . replace ( / { { certbot-v e r s i o n } } / g, CERTBOT_VERSION_REPLACEMENT ) ;
6464 plugin . dependencies = plugin . dependencies . replace ( / { { certbot-v e r s i o n } } / g, CERTBOT_VERSION_REPLACEMENT ) ;
6565
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' } ) ;
6769 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 ) ;
7071 }
7172
7273 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 } )
7475 . then ( ( result ) => {
7576 logger . complete ( `Installed ${ pluginKey } ` ) ;
7677 return result ;
Original file line number Diff line number Diff line change 477477 "version" : " ~=0.2.1" ,
478478 "dependencies" : " PyYAML==5.3.1" ,
479479 "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"
484481 },
485482 "regru" : {
486483 "name" : " reg.ru" ,
You can’t perform that action at this time.
0 commit comments