Skip to content

Commit d3b0c0f

Browse files
committed
Merge branch 'improve-wheel-build' of github.com:xmlsec/python-xmlsec into improve-wheel-build
2 parents 93458a1 + 621ebaa commit d3b0c0f

File tree

1 file changed

+35
-34
lines changed

1 file changed

+35
-34
lines changed

build_support/lib_xmlsec_dependency_builder.py

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import multiprocessing
22
import os
3-
from pathlib import Path
43
import platform
54
import subprocess
65
import sys
76
import tarfile
87
import zipfile
98
from dataclasses import dataclass
109
from distutils.errors import DistutilsError
10+
from pathlib import Path
1111
from urllib.parse import urljoin
1212
from urllib.request import urlcleanup
1313

@@ -361,40 +361,41 @@ def _build_libxslt(self, env, prefix_arg, host_arg):
361361
subprocess.check_call(['make', f'-j{multiprocessing.cpu_count() + 1}'], cwd=str(libxslt_dir), env=env)
362362
subprocess.check_call(['make', f'-j{multiprocessing.cpu_count() + 1}', 'install'], cwd=str(libxslt_dir), env=env)
363363

364+
364365
def _build_xmlsec1(self, env, prefix_arg, host_arg):
365-
self.info('Building xmlsec1')
366-
xmlsec1_dir = next(self.build_libs_dir.glob('xmlsec1-*'))
367-
subprocess.check_call(
368-
[
369-
'./configure',
370-
prefix_arg,
371-
'--disable-shared',
372-
'--disable-gost',
373-
'--enable-md5',
374-
'--enable-ripemd160',
375-
'--disable-crypto-dl',
376-
'--enable-static=yes',
377-
'--enable-shared=no',
378-
'--enable-static-linking=yes',
379-
'--with-default-crypto=openssl',
380-
f'--with-openssl={self.prefix_dir}',
381-
f'--with-libxml={self.prefix_dir}',
382-
f'--with-libxslt={self.prefix_dir}',
383-
*host_arg,
384-
],
385-
cwd=str(xmlsec1_dir),
386-
env=env,
387-
)
388-
include_flags = [
389-
f'-I{self.prefix_dir / "include"}',
390-
f'-I{self.prefix_dir / "include" / "libxml"}',
391-
]
392-
subprocess.check_call(
393-
['make', f'-j{multiprocessing.cpu_count() + 1}', *include_flags],
394-
cwd=str(xmlsec1_dir),
395-
env=env,
396-
)
397-
subprocess.check_call(['make', f'-j{multiprocessing.cpu_count() + 1}', 'install'], cwd=str(xmlsec1_dir), env=env)
366+
self.info('Building xmlsec1')
367+
xmlsec1_dir = next(self.build_libs_dir.glob('xmlsec1-*'))
368+
subprocess.check_call(
369+
[
370+
'./configure',
371+
prefix_arg,
372+
'--disable-shared',
373+
'--disable-gost',
374+
'--enable-md5',
375+
'--enable-ripemd160',
376+
'--disable-crypto-dl',
377+
'--enable-static=yes',
378+
'--enable-shared=no',
379+
'--enable-static-linking=yes',
380+
'--with-default-crypto=openssl',
381+
f'--with-openssl={self.prefix_dir}',
382+
f'--with-libxml={self.prefix_dir}',
383+
f'--with-libxslt={self.prefix_dir}',
384+
*host_arg,
385+
],
386+
cwd=str(xmlsec1_dir),
387+
env=env,
388+
)
389+
include_flags = [
390+
f'-I{self.prefix_dir / "include"}',
391+
f'-I{self.prefix_dir / "include" / "libxml"}',
392+
]
393+
subprocess.check_call(
394+
['make', f'-j{multiprocessing.cpu_count() + 1}', *include_flags],
395+
cwd=str(xmlsec1_dir),
396+
env=env,
397+
)
398+
subprocess.check_call(['make', f'-j{multiprocessing.cpu_count() + 1}', 'install'], cwd=str(xmlsec1_dir), env=env)
398399

399400

400401
__all__ = ('CrossCompileInfo', 'LibXmlsecDependencyBuilder')

0 commit comments

Comments
 (0)