diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2017-07-19 18:16:00 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2017-07-19 18:16:00 +0200 |
commit | 5ad1e76173f3ccfbe6b0eac0e8a6c4a801cf1fea (patch) | |
tree | 39dde63c7b2fcf3342f9fb5bf9ea8ec1174f9937 /setupinfo.py | |
parent | 8ab51504249204e8bb3516b41d859c9c8adaab38 (diff) | |
download | python-lxml-5ad1e76173f3ccfbe6b0eac0e8a6c4a801cf1fea.tar.gz |
compile _elementpath.py module to speed it up (~25% faster)
Diffstat (limited to 'setupinfo.py')
-rw-r--r-- | setupinfo.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/setupinfo.py b/setupinfo.py index 64040326..af785211 100644 --- a/setupinfo.py +++ b/setupinfo.py @@ -11,6 +11,7 @@ except ImportError: CYTHON_INSTALLED = False EXT_MODULES = ["lxml.etree", "lxml.objectify"] +COMPILED_MODULES = ["_elementpath.py"] PACKAGE_PATH = "src%slxml%s" % (os.path.sep, os.path.sep) INCLUDE_PACKAGE_PATH = PACKAGE_PATH + 'includes' @@ -161,7 +162,9 @@ def ext_modules(static_include_dirs, static_library_dirs, if CYTHON_INSTALLED and source_extension == '.pyx': # build .c files right now and convert Extension() objects from Cython.Build import cythonize - result = cythonize(result, **cythonize_options) + result = cythonize( + result + [PACKAGE_PATH + module for module in COMPILED_MODULES], + **cythonize_options) return result |