diff options
author | Paul Hopkins <paul.hopkins@ligo.org> | 2016-07-08 13:47:25 +0100 |
---|---|---|
committer | Paul Hopkins <paul.hopkins@ligo.org> | 2016-07-08 13:47:25 +0100 |
commit | 49e8e4b590e964a370c4c683113d0ba199c549ac (patch) | |
tree | 768b5002aebb6a2e3e0c9b13f8c60118390edbe3 /var | |
parent | a2be05f24bd3c3e378dcdf4c336fb9c6c0058672 (diff) | |
download | spack-49e8e4b590e964a370c4c683113d0ba199c549ac.tar.gz spack-49e8e4b590e964a370c4c683113d0ba199c549ac.tar.bz2 spack-49e8e4b590e964a370c4c683113d0ba199c549ac.tar.xz spack-49e8e4b590e964a370c4c683113d0ba199c549ac.zip |
Add comments explaining UCS4 and prevent variant being used on Python 3.3 and above
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/python/package.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 4ef9ec5b4f..6018eeb6f8 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -54,6 +54,13 @@ class Python(Package): extendable = True variant('ucs4', default=False, description='Enable UCS4 (wide) unicode strings') + # From https://docs.python.org/2/c-api/unicode.html: Python's default + # builds use a 16-bit type for Py_UNICODE and store Unicode values + # internally as UCS2. It is also possible to build a UCS4 version of Python + # (most recent Linux distributions come with UCS4 builds of Python). These + # builds then use a 32-bit type for Py_UNICODE and store Unicode data + # internally as UCS4. Note that UCS2 and UCS4 Python builds are not binary + # compatible. depends_on("openssl") depends_on("bzip2") @@ -95,6 +102,9 @@ class Python(Package): config_args.append('--enable-unicode=ucs4') elif spec.satisfies('@3.0:3.2'): config_args.append('--with-wide-unicode') + elif spec.satisfies('@3.3:'): + # https://docs.python.org/3.3/whatsnew/3.3.html + raise ValueError('+ucs4 variant not compatible with Python 3.3 and beyond') # NOQA: ignore=E501 if spec.satisfies('@3:'): config_args.append('--without-ensurepip') |