Commit 8f7bec09 authored by Luke Macken's avatar Luke Macken

Require argparse on Python < 2.7 and < 3.2

parent 31a0fbbf
......@@ -17,6 +17,11 @@ BuildRequires: python-nose
Requires: gdb >= 7.3
%if 0%{?rhel} <= 6
BuildRequires: python-argparse
Requires: python-argparse
%endif
%description
Pyrasite uses the GNU debugger to inject code into a running Python process.
It is comprised of a command-line tool, and a Python API. This package
......
import sys
from setuptools import setup, find_packages
version = '2.0beta9'
......@@ -6,6 +7,14 @@ f = open('README.rst')
long_description = f.read().split('split here')[1]
f.close()
requirements = []
if sys.version_info.major == 3:
if sys.version_info.minor < 2:
requirements.append('argparse')
elif sys.version_info.major == 2:
if sys.version_info.minor < 7:
requirements.append('argparse')
setup(name='pyrasite',
version=version,
description="Inject code into a running Python process",
......@@ -18,7 +27,7 @@ setup(name='pyrasite',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
zip_safe=False,
install_requires=[],
install_requires=requirements,
tests_require=['nose'],
test_suite='nose.collector',
entry_points="""
......
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