Commit ed348171 authored by Jerome Flesch's avatar Jerome Flesch
Browse files

setup.py: Enable explicitely the use of SSE2 instructions on i386 arch.


It makes the test results consistent with amd64 architecture.

Signed-off-by: Jerome Flesch's avatarJerome Flesch <jflesch@openpaper.work>
parent dfdfa2a5
......@@ -71,6 +71,10 @@ output_img = pillowfight.ace(input_img)
$ python3 ./setup.py nosetests
```
Test reference images are made on amd64. They should match also on i386.
On other architectures however, due to slight differences regarding floating
point numbers, results may vary slightly and tests may not pass.
## C library
......
#!/usr/bin/env python
import os
import platform
from setuptools import Extension, setup
if os.name == "nt":
libdep = []
extra_compile_args = []
else:
libdep = ["m"]
if platform.architecture() == ('32bit', 'ELF'):
extra_compile_args = ['-msse2', '-mfpmath=sse']
else:
extra_compile_args = []
setup(
name="pypillowfight",
......@@ -58,7 +64,7 @@ setup(
],
include_dirs=["include"],
libraries=libdep,
extra_compile_args=[],
extra_compile_args=extra_compile_args,
undef_macros=['NDEBUG'],
),
],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment