Author: Armin Rigo <[email protected]>
Branch:
Changeset: r76504:96c123f0695a
Date: 2015-03-22 18:12 +0100
http://bitbucket.org/pypy/pypy/changeset/96c123f0695a/
Log: Don't freeze in the pypy binary the version numbers of the libexpat1
library as found during translation.
diff --git a/pypy/module/pyexpat/__init__.py b/pypy/module/pyexpat/__init__.py
--- a/pypy/module/pyexpat/__init__.py
+++ b/pypy/module/pyexpat/__init__.py
@@ -39,8 +39,6 @@
'error': 'space.fromcache(interp_pyexpat.Cache).w_error',
'__version__': 'space.wrap("85819")',
- 'EXPAT_VERSION': 'interp_pyexpat.get_expat_version(space)',
- 'version_info': 'interp_pyexpat.get_expat_version_info(space)',
}
submodules = {
@@ -53,3 +51,10 @@
'XML_PARAM_ENTITY_PARSING_ALWAYS']:
interpleveldefs[name] = 'space.wrap(interp_pyexpat.%s)' % (name,)
+ def setup_after_space_initialization(self):
+ from pypy.module.pyexpat import interp_pyexpat
+ space = self.space
+ w_ver = interp_pyexpat.get_expat_version(space)
+ space.setattr(self, space.wrap("EXPAT_VERSION"), w_ver)
+ w_ver = interp_pyexpat.get_expat_version_info(space)
+ space.setattr(self, space.wrap("version_info"), w_ver)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit