@@ -35,7 +35,7 @@ def handle_starttag(self, tag, attrs):
3535def make_request (url , github_token = None , json_response = False ):
3636 headers = {'User-Agent' : 'https://github.com/xmlsec/python-xmlsec' }
3737 if github_token :
38- headers ['authorization' ] = " Bearer " + github_token
38+ headers ['authorization' ] = ' Bearer ' + github_token
3939 request = Request (url , headers = headers )
4040 with contextlib .closing (urlopen (request )) as r :
4141 charset = r .headers .get_content_charset () or 'utf-8'
@@ -74,9 +74,9 @@ def latest_release_json_from_github_api(repo):
7474 api_url = f'https://api.github.com/repos/{ repo } /releases/latest'
7575
7676 # if we are running in CI, pass along the GH_TOKEN, so we don't get rate limited
77- token = os .environ .get (" GH_TOKEN" )
77+ token = os .environ .get (' GH_TOKEN' )
7878 if token :
79- log .info (" Using GitHub token to avoid rate limiting" )
79+ log .info (' Using GitHub token to avoid rate limiting' )
8080 return make_request (api_url , token , json_response = True )
8181
8282
@@ -114,7 +114,7 @@ def __init__(self, host, arch, compiler):
114114
115115 @property
116116 def triplet (self ):
117- return f" { self .host } -{ self .arch } -{ self .compiler } "
117+ return f' { self .host } -{ self .arch } -{ self .compiler } '
118118
119119
120120class build_ext (build_ext_orig ):
@@ -309,9 +309,7 @@ def prepare_static_build(self, build_platform):
309309 self .info ('{:10}: {}' .format ('zlib' , f'PYXMLSEC_ZLIB_VERSION unset, downloading latest from { url } ' ))
310310 else :
311311 url = f'https://zlib.net/fossils/zlib-{ self .zlib_version } .tar.gz'
312- self .info (
313- '{:10}: {}' .format ('zlib' , f'PYXMLSEC_ZLIB_VERSION={ self .zlib_version } , downloading from { url } ' )
314- )
312+ self .info ('{:10}: {}' .format ('zlib' , f'PYXMLSEC_ZLIB_VERSION={ self .zlib_version } , downloading from { url } ' ))
315313 urlretrieve (url , str (zlib_tar ))
316314
317315 # fetch libiconv
@@ -325,9 +323,7 @@ def prepare_static_build(self, build_platform):
325323 else :
326324 url = f'https://ftp.gnu.org/pub/gnu/libiconv/libiconv-{ self .libiconv_version } .tar.gz'
327325 self .info (
328- '{:10}: {}' .format (
329- 'zlib' , f'PYXMLSEC_LIBICONV_VERSION={ self .libiconv_version } , downloading from { url } '
330- )
326+ '{:10}: {}' .format ('zlib' , f'PYXMLSEC_LIBICONV_VERSION={ self .libiconv_version } , downloading from { url } ' )
331327 )
332328 urlretrieve (url , str (libiconv_tar ))
333329
@@ -342,9 +338,7 @@ def prepare_static_build(self, build_platform):
342338 version_prefix , _ = self .libxml2_version .rsplit ('.' , 1 )
343339 url = f'https://download.gnome.org/sources/libxml2/{ version_prefix } /libxml2-{ self .libxml2_version } .tar.xz'
344340 self .info (
345- '{:10}: {}' .format (
346- 'libxml2' , f'PYXMLSEC_LIBXML2_VERSION={ self .libxml2_version } , downloading from { url } '
347- )
341+ '{:10}: {}' .format ('libxml2' , f'PYXMLSEC_LIBXML2_VERSION={ self .libxml2_version } , downloading from { url } ' )
348342 )
349343 libxml2_tar = self .libs_dir / 'libxml2.tar.xz'
350344 urlretrieve (url , str (libxml2_tar ))
@@ -360,9 +354,7 @@ def prepare_static_build(self, build_platform):
360354 version_prefix , _ = self .libxslt_version .rsplit ('.' , 1 )
361355 url = f'https://download.gnome.org/sources/libxslt/{ version_prefix } /libxslt-{ self .libxslt_version } .tar.xz'
362356 self .info (
363- '{:10}: {}' .format (
364- 'libxslt' , f'PYXMLSEC_LIBXSLT_VERSION={ self .libxslt_version } , downloading from { url } '
365- )
357+ '{:10}: {}' .format ('libxslt' , f'PYXMLSEC_LIBXSLT_VERSION={ self .libxslt_version } , downloading from { url } ' )
366358 )
367359 libxslt_tar = self .libs_dir / 'libxslt.tar.gz'
368360 urlretrieve (url , str (libxslt_tar ))
@@ -377,9 +369,7 @@ def prepare_static_build(self, build_platform):
377369 else :
378370 url = f'https://github.com/lsh123/xmlsec/releases/download/{ self .xmlsec1_version } /xmlsec1-{ self .xmlsec1_version } .tar.gz'
379371 self .info (
380- '{:10}: {}' .format (
381- 'xmlsec1' , f'PYXMLSEC_XMLSEC1_VERSION={ self .xmlsec1_version } , downloading from { url } '
382- )
372+ '{:10}: {}' .format ('xmlsec1' , f'PYXMLSEC_XMLSEC1_VERSION={ self .xmlsec1_version } , downloading from { url } ' )
383373 )
384374 xmlsec1_tar = self .libs_dir / 'xmlsec1.tar.gz'
385375 urlretrieve (url , str (xmlsec1_tar ))
@@ -415,7 +405,7 @@ def prepare_static_build(self, build_platform):
415405 cross_compiling = CrossCompileInfo ('darwin64' , arch , 'cc' )
416406 major_version , _ = tuple (map (int , platform .mac_ver ()[0 ].split ('.' )[:2 ]))
417407 if major_version >= 11 and 'MACOSX_DEPLOYMENT_TARGET' not in env :
418- env ['MACOSX_DEPLOYMENT_TARGET' ] = " 11.0"
408+ env ['MACOSX_DEPLOYMENT_TARGET' ] = ' 11.0'
419409
420410 env ['CFLAGS' ] = ' ' .join (cflags )
421411 env ['LDFLAGS' ] = ' ' .join (ldflags )
@@ -430,9 +420,7 @@ def prepare_static_build(self, build_platform):
430420 openssl_config_cmd .insert (0 , './config' )
431421 subprocess .check_call (openssl_config_cmd , cwd = str (openssl_dir ), env = env )
432422 subprocess .check_call (['make' , f'-j{ multiprocessing .cpu_count () + 1 } ' ], cwd = str (openssl_dir ), env = env )
433- subprocess .check_call (
434- ['make' , f'-j{ multiprocessing .cpu_count () + 1 } ' , 'install_sw' ], cwd = str (openssl_dir ), env = env
435- )
423+ subprocess .check_call (['make' , f'-j{ multiprocessing .cpu_count () + 1 } ' , 'install_sw' ], cwd = str (openssl_dir ), env = env )
436424
437425 self .info ('Building zlib' )
438426 zlib_dir = next (self .build_libs_dir .glob ('zlib-*' ))
@@ -594,7 +582,7 @@ def prepare_static_build(self, build_platform):
594582 python_requires = '>=3.9' ,
595583 setup_requires = setup_reqs ,
596584 install_requires = ['lxml>=3.8' ],
597- author = " Bulat Gaifullin" ,
585+ author = ' Bulat Gaifullin' ,
598586599587 maintainer = 'Oleg Hoefling' ,
600588 maintainer_email = '[email protected] ' ,
0 commit comments