Skip to content

Commit a41297c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent f96249b commit a41297c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

setup.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ def prepare_static_build(self, build_platform):
405405

406406
cross_compiling = False
407407
import platform
408+
408409
if build_platform == 'darwin':
409410
arch = self.plat_name.rsplit('-', 1)[1]
410411
if arch != platform.machine() and arch in ('x86_64', 'arm64'):
@@ -422,17 +423,17 @@ def prepare_static_build(self, build_platform):
422423
self.info('Building OpenSSL')
423424
openssl_dir = next(self.build_libs_dir.glob('openssl-*'))
424425
openssl_config_cmd = [prefix_arg, 'no-shared', '-fPIC', '--libdir=lib']
425-
if platform.machine() == "riscv64":
426+
if platform.machine() == 'riscv64':
426427
# add `no-asm` flag for openssl while build for riscv64
427428

428-
# on openssl 3.5.2, When building for riscv64, ASM code is used by default.
429+
# on openssl 3.5.2, When building for riscv64, ASM code is used by default.
429430
# However, this version of the assembly code will report during the build:
430431

431432
# relocation truncated to fit: R_RISCV_JAL against symbol `AES_set_encrypt_key' defined in .text section in /project/build/tmp/prefix/lib/libcrypto.a(libcrypto-lib-aes-riscv64.o)
432-
433+
433434
# This [line](https://github.com/openssl/openssl/blob/0893a62353583343eb712adef6debdfbe597c227/crypto/aes/asm/aes-riscv64.pl#L1069) of code cannot be completed normally because the jump address of the static link library used by xmlsec is too large.
434-
# may be we can consider filing a related issue with OpenSSL later.
435-
# However, for now, for convenience, we can simply disable ASM for riscv64.
435+
# may be we can consider filing a related issue with OpenSSL later.
436+
# However, for now, for convenience, we can simply disable ASM for riscv64.
436437
# This will result in some performance degradation, but this is acceptable.
437438
openssl_config_cmd.append('no-asm')
438439
if cross_compiling:

0 commit comments

Comments
 (0)