From ece5f3a325891bdbc664e3130c4758a20683c0ea Mon Sep 17 00:00:00 2001 From: Alex Gr?nholm Date: Tue, 12 Nov 2013 20:32:46 +0200 Subject: Fixed Jython compatibility by making the ProcessPoolExecutor import optional Added metadata for wheel support --- CHANGES | 7 +++++++ concurrent/futures/__init__.py | 7 ++++++- setup.cfg | 7 +++++++ setup.py | 5 +++-- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 81df636..1e75eaa 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,10 @@ +2.1.5 +===== + +- Fixed Jython compatibility +- Added metadata for wheel support + + 2.1.4 ===== diff --git a/concurrent/futures/__init__.py b/concurrent/futures/__init__.py index b5231f8..fef5281 100644 --- a/concurrent/futures/__init__.py +++ b/concurrent/futures/__init__.py @@ -14,5 +14,10 @@ from concurrent.futures._base import (FIRST_COMPLETED, Executor, wait, as_completed) -from concurrent.futures.process import ProcessPoolExecutor from concurrent.futures.thread import ThreadPoolExecutor + +# Jython doesn't have multiprocessing +try: + from concurrent.futures.process import ProcessPoolExecutor +except ImportError: + pass diff --git a/setup.cfg b/setup.cfg index 0a9f4f5..320967a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,13 @@ +[wheel] +universal = 1 + [build_sphinx] source-dir = docs build-dir = build/sphinx [upload_docs] upload-dir = build/sphinx/html + +[metadata] +requires-dist = + multiprocessing; python_version == '2.5' and platform.python_implementation != 'Jython' diff --git a/setup.py b/setup.py index c08461e..16ea890 100755 --- a/setup.py +++ b/setup.py @@ -1,17 +1,18 @@ #!/usr/bin/env python import sys +import os extras = {} try: from setuptools import setup extras['zip_safe'] = False - if sys.version_info < (2, 6): + if sys.version_info < (2, 6) and os.name != 'java': extras['install_requires'] = ['multiprocessing'] except ImportError: from distutils.core import setup setup(name='futures', - version='2.1.4', + version='2.1.5', description='Backport of the concurrent.futures package from Python 3.2', author='Brian Quinlan', author_email='brian@sweetapp.com', -- cgit v1.2.1