disable LTO because become poor performance
This commit is contained in:
parent
9b765a55e6
commit
d5411b36b7
4 changed files with 13 additions and 15 deletions
|
@ -4,7 +4,7 @@ CHANGES
|
|||
2.1.x
|
||||
-----
|
||||
|
||||
- xxxx
|
||||
- disable LTO because become poor performance
|
||||
|
||||
2.1.3 (2018-09-26)
|
||||
------------------
|
||||
|
|
14
Makefile
14
Makefile
|
@ -19,17 +19,7 @@ install: clean
|
|||
build-manylinux1-wheel:
|
||||
docker pull quay.io/pypa/manylinux1_i686
|
||||
docker pull quay.io/pypa/manylinux1_x86_64
|
||||
docker run --rm -ti -v `pwd`:/project \
|
||||
-e CFLAGS="-mtune=generic -pipe -fPIC -flto" \
|
||||
-e LDFLAGS="$(LDFLAGS) -flto" \
|
||||
-w /project \
|
||||
quay.io/pypa/manylinux1_i686 \
|
||||
bash dockerfiles/buildwheel.sh
|
||||
docker run --rm -ti -v `pwd`:/project \
|
||||
-e CFLAGS="-mtune=generic -pipe -fPIC -flto" \
|
||||
-e LDFLAGS="$(LDFLAGS) -flto" \
|
||||
-w /project \
|
||||
quay.io/pypa/manylinux1_x86_64 \
|
||||
bash dockerfiles/buildwheel.sh
|
||||
docker run --rm -ti -v `pwd`:/project -w /project quay.io/pypa/manylinux1_i686 bash dockerfiles/buildwheel.sh
|
||||
docker run --rm -ti -v `pwd`:/project -w /project quay.io/pypa/manylinux1_x86_64 bash dockerfiles/buildwheel.sh
|
||||
|
||||
build: clean pip test sdist build-manylinux1-wheel
|
||||
|
|
|
@ -3,3 +3,5 @@ Cython==0.28.5
|
|||
nose==1.3.7
|
||||
tox==3.4.0
|
||||
wheel==0.31.1
|
||||
#autopep8==1.4
|
||||
#pylint==2.1.1
|
||||
|
|
10
setup.py
10
setup.py
|
@ -26,7 +26,8 @@ uchardet_dir = 'src/ext/uchardet/src'
|
|||
if have_cython:
|
||||
pyx_sources = glob.glob(cchardet_dir + '*.pyx')
|
||||
sys.stderr.write('cythonize: %r\n' % (pyx_sources,))
|
||||
cython_compiler.compile(pyx_sources, options=cython_compiler.CompilationOptions(cplus=True))
|
||||
cython_compiler.compile(
|
||||
pyx_sources, options=cython_compiler.CompilationOptions(cplus=True))
|
||||
|
||||
cchardet_sources = glob.glob(cchardet_dir + '*.cpp')
|
||||
sources = cchardet_sources
|
||||
|
@ -89,6 +90,8 @@ cfg_vars = sysconfig.get_config_vars()
|
|||
for key, value in cfg_vars.items():
|
||||
if type(value) == str:
|
||||
cfg_vars[key] = value.replace("-Wstrict-prototypes", "")
|
||||
# O3を指定したところで速度が向上するかは疑問である
|
||||
# cfg_vars[key] = value.replace("-O2", "-O3")
|
||||
|
||||
cchardet_module = Extension(
|
||||
'cchardet._cchardet',
|
||||
|
@ -97,12 +100,15 @@ cchardet_module = Extension(
|
|||
language='c++',
|
||||
)
|
||||
|
||||
|
||||
def read(f):
|
||||
return open(os.path.join(os.path.dirname(__file__), f)).read().strip()
|
||||
|
||||
|
||||
with codecs.open(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'src', 'cchardet', 'version.py'), 'r', 'latin1') as fp:
|
||||
try:
|
||||
version = re.findall(r"^__version__ = '([^']+)'\r?$", fp.read(), re.M)[0]
|
||||
version = re.findall(
|
||||
r"^__version__ = '([^']+)'\r?$", fp.read(), re.M)[0]
|
||||
except IndexError:
|
||||
raise RuntimeError('Unable to determine version.')
|
||||
|
||||
|
|
Loading…
Reference in a new issue