Commit 2c7ce340 authored by Jason Madden's avatar Jason Madden

Use python_requires and extras_require for version-specific deps

Fixes #93.
Fixes #92

Example:

```
$ pip install .
Processing /.../ZEO
ZEO requires Python '>=2.7.9,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*' but the running Python is 3.3.6`
```
parent ee15798b
...@@ -6,7 +6,7 @@ Changelog ...@@ -6,7 +6,7 @@ Changelog
- All classes are new-style classes on Python 2 (they were already - All classes are new-style classes on Python 2 (they were already
new-style on Python 3). This improves performance on PyPy. See new-style on Python 3). This improves performance on PyPy. See
`issue 86 <<https://github.com/zopefoundation/ZEO/pull/86>`_. `issue 86 <https://github.com/zopefoundation/ZEO/pull/86>`_.
- Fixed removing UNIX socket files under Python 2 with ZConfig 3.2.0. - Fixed removing UNIX socket files under Python 2 with ZConfig 3.2.0.
See `issue 90 <https://github.com/zopefoundation/ZEO/issues/90>`_. See `issue 90 <https://github.com/zopefoundation/ZEO/issues/90>`_.
......
...@@ -3,7 +3,11 @@ include *.txt ...@@ -3,7 +3,11 @@ include *.txt
include *.py include *.py
include buildout.cfg include buildout.cfg
include tox.ini include tox.ini
include .travis.yml
include COPYING
include log.ini
recursive-include src * recursive-include src *
recursive-include doc *.txt
global-exclude *.pyc global-exclude *.pyc
[bdist_wheel]
universal = 1
...@@ -15,15 +15,6 @@ version = '5.1.1.dev0' ...@@ -15,15 +15,6 @@ version = '5.1.1.dev0'
from setuptools import setup, find_packages from setuptools import setup, find_packages
import os import os
import sys
if sys.version_info < (2, 7, 9):
print("This version of ZEO requires Python 2.7.9 or higher")
sys.exit(1)
if (3, 0) < sys.version_info < (3, 4):
print("This version of ZEO requires Python 3.4 or higher")
sys.exit(1)
install_requires = [ install_requires = [
'ZODB >= 5.1.1', 'ZODB >= 5.1.1',
...@@ -34,12 +25,15 @@ install_requires = [ ...@@ -34,12 +25,15 @@ install_requires = [
'ZConfig', 'ZConfig',
'zdaemon', 'zdaemon',
'zope.interface', 'zope.interface',
] ]
tests_require = ['zope.testing', 'manuel', 'random2', 'mock', 'msgpack-python']
if sys.version_info[:2] < (3, ): tests_require = [
install_requires.extend(('futures', 'trollius')) 'zope.testing',
'manuel',
'random2',
'mock',
'msgpack-python',
]
classifiers = """ classifiers = """
Intended Audience :: Developers Intended Audience :: Developers
...@@ -113,35 +107,44 @@ long_description = ( ...@@ -113,35 +107,44 @@ long_description = (
open('README.rst').read() open('README.rst').read()
+ '\n' + + '\n' +
open('CHANGES.rst').read() open('CHANGES.rst').read()
) )
setup(name="ZEO", setup(name="ZEO",
version=version, version=version,
description = long_description.split('\n', 2)[1], description=long_description.split('\n', 2)[1],
long_description = long_description, long_description=long_description,
url = 'https://pypi.python.org/pypi/ZEO', url='https://github.com/zopefoundation/ZEO',
author="Zope Foundation and Contributors", author="Zope Foundation and Contributors",
author_email="zodb@googlegroups.com", author_email="zodb@googlegroups.com",
keywords=['database', 'zodb'], keywords=['database', 'zodb'],
packages = find_packages('src'), packages=find_packages('src'),
package_dir = {'': 'src'}, package_dir={'': 'src'},
license = "ZPL 2.1", license="ZPL 2.1",
platforms = ["any"], platforms=["any"],
classifiers = classifiers, classifiers=classifiers,
test_suite="__main__.alltests", # to support "setup.py test" test_suite="__main__.alltests", # to support "setup.py test"
tests_require = tests_require, tests_require=tests_require,
extras_require = dict( extras_require={
test=tests_require, 'test': tests_require,
uvloop=['uvloop >=0.5.1'], 'uvloop': [
msgpack=['msgpack-python'], 'uvloop >=0.5.1'
), ],
install_requires = install_requires, 'msgpack': [
zip_safe = False, 'msgpack-python'
entry_points = """ ],
':python_version == "2.7"': [
'futures',
'trollius',
],
},
install_requires=install_requires,
zip_safe=False,
entry_points="""
[console_scripts] [console_scripts]
zeopack = ZEO.scripts.zeopack:main zeopack = ZEO.scripts.zeopack:main
runzeo = ZEO.runzeo:main runzeo = ZEO.runzeo:main
zeoctl = ZEO.zeoctl:main zeoctl = ZEO.zeoctl:main
zeo-nagios = ZEO.nagios:main zeo-nagios = ZEO.nagios:main
""", """,
include_package_data = True, include_package_data=True,
) python_requires='>=2.7.9,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*',
)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment