Olivia5k/doge

doge depends on argparse

bukzor opened this issue · 2 comments

Doge works on python2.6 except that it doesn't necessarily install its dependency, in argparse.

Which is exactly what the README states:

Note that if you are one of the unlucky doges to still run a Python that does not have argparse (<=Python2.6) you will have to install argparse manually from pypi. so old, very update need.

I just couldn't be bothered in working around setting it as a dependency, as it did not work out of the box right away. It's a year ago so I don't really remember why - probably that everything above 2.6 stopped working. 2.6 is enough of an edge case in my mind that I just could not be bothered. If you make a patch that works on all systems and installs argparse np then I am happy to merge it. I myself have no real reason to do it though, but please feel welcome to experiment!

This is how they resolved the same issue in the tox project:


# HG changeset patch
# User Sebastian Wiesner <lunaryorn@googlemail.com>
# Date 1308478366 -7200
# Node ID 0eccb9492f8755340766b05def6d3f78d1127aca
# Parent  23fa56cface787bbc47da85c946cd4a65a150fe9
Do not depend on argparse if installing for Python versions, which include argparse

diff -r 23fa56cface7 -r 0eccb9492f87 setup.py
--- a/setup.py  Mon Jun 06 08:37:45 2011 +0200
+++ b/setup.py  Sun Jun 19 12:12:46 2011 +0200
@@ -27,7 +27,10 @@


 def main():
-    install_requires=['virtualenv>=1.6.1']
+    install_requires=['virtualenv>=1.6.1', 'py>=1.4.0a2']
+    version = sys.version_info[:2]
+    if version < (2,7) or (3,0) <= version <= (3,1):
+        install_requires.append('argparse')
     setup(
         name='tox',
         description='virtualenv-based automation of test activities',
@@ -40,7 +43,7 @@
         author_email='holger@merlinux.eu',
         packages=['tox', ],
         entry_points={'console_scripts': 'tox=tox:cmdline'},
-        install_requires=install_requires+['argparse', 'py>=1.4.0a2', ],
+        install_requires=install_requires,
         zip_safe=True,
         classifiers=[
             'Development Status :: 5 - Production/Stable',