Skip to content

Commit

Permalink
Making argparse dependency optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandr Rudakov committed Jan 28, 2014
1 parent 58491e4 commit c29cbe8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ http://sphinx-argparse.readthedocs.org/en/latest/

Changelog:

------------------------------
0.1.7

Argparse is not required anymore separate module as of python 2.7 (Mike Gleen)

------------------------------
0.1.6

Expand Down
14 changes: 10 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
from distutils.version import StrictVersion
import os
from setuptools import setup
# from tests import PyTest
import sys

deps = ["sphinx"]

# argparse was added to python stdlib since 2.7
if StrictVersion(sys.version.split(' ')[0]) < StrictVersion('2.7.0'):
deps.append('argparse')

setup(
name='sphinx-argparse',
version='0.1.6',
version='0.1.7',
packages=[
'sphinxarg',
],
Expand All @@ -15,7 +23,5 @@
author_email='ribozz@gmail.com',
description='Sphinx extension that automatically document argparse commands and options',
long_description='',
install_requires=[
"argparse", "sphinx"
],
install_requires=deps,
)

0 comments on commit c29cbe8

Please sign in to comment.