Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dependencies only if Python version doesn't already have them #141

Merged
merged 1 commit into from
Mar 15, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 26 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
import sys

from setuptools import setup, find_packages

install_requires=[
'Pillow>=2.2.2',
'Jinja2>=2.7,<2.8',
]

tests_require=[
'cssutils>=0.9,<1.0',
]

PY_MAJOR, PY_MINOR = sys.version_info[:2]

# as of Python >= 2.7 and >= 3.2, the argparse module is maintained
# within the Python standard library.
if (PY_MAJOR == 2 and PY_MINOR < 7) or (PY_MAJOR == 3 and PY_MINOR < 2):
install_requires.append('argparse>=1.1')

# mock is now part of the Python standard library, available as
# unittest.mock in Python 3.3 onwards.
if (PY_MAJOR == 2) or (PY_MAJOR == 3 and PY_MINOR < 3):
tests_require.append('mock>=1.0')


setup(
name='glue',
version='0.9.3',
Expand All @@ -16,15 +40,8 @@
keywords = "glue sprites css cocos2d",
packages = find_packages(),
platforms='any',
install_requires=[
'Pillow>=2.2.2',
'Jinja2>=2.7,<2.8',
'argparse>=1.1'
],
tests_require=[
'cssutils>=0.9,<1.0',
'mock>=1.0'
],
install_requires=install_requires,
tests_require=tests_require,
test_suite='tests',
classifiers=[
'Development Status :: 4 - Beta',
Expand Down