Files
deb-python-functools32/setup.py
Nicolas Mussat 438927ed7b Fix thread module import on Python 2.7
The Python 2.7 `thread` module has been renamed to `_thread` in
Python3. This package was importing the `_thread` anyway, and was thus
fallbacking to the `dummy_thread32` module everytime, which is far from
failproof (eg. `lru_cache` decorator used in a WSGI app started on uWSGI
with threads enabled and high concurrency raises exceptions).

This fix loads the `thread` module accordingly, without trying to load
Python3 `_thread` module since setup.py prevents installation on Python 3 explicitly.

This package targets Python 2.7 only, as documented
2015-07-08 14:52:20 +02:00

32 lines
833 B
Python
Executable File

#!/usr/bin/python
import sys
from distutils.core import setup
def main():
if not (3,) > sys.version_info >= (2, 7):
sys.stderr.write('This backport is for Python 2.7 only.\n')
sys.exit(1)
setup(
name='functools32',
version='3.2.3-2',
description='Backport of the functools module from Python 3.2.3 for use on 2.7 and PyPy.',
long_description="""
This is a backport of the functools standard library module from
Python 3.2.3 for use on Python 2.7 and PyPy. It includes
new features `lru_cache` (Least-recently-used cache decorator).""",
license='PSF license',
maintainer='ENDOH takanao',
maintainer_email='djmchl@gmail.com',
url='https://github.com/MiCHiLU/python-functools32',
packages=['functools32'],
)
if __name__ == '__main__':
main()