Files
MINGW-packages/mingw-w64-python2-unittest2/d091f0086b03.patch
J. Peter Mugaas 4d9ec2ac59 A bundle of python packages I was working on. These are checked in together since they depend upon eachother. (#4129)
contextlib2
linecache2
traceback2
unittest2
python-extras
fixtures
pyrsistent
subunit
testscenerios
testtools
2018-07-31 11:29:12 +03:00

46 lines
1.2 KiB
Diff

# HG changeset patch
# User Robert Collins <rbtcollins@hp.com>
# Date 1435721660 -43200
# Node ID d091f0086b03f4610d41f45c8813c9402c209ccc
# Parent 9badd4cde9ab5f70eff42777a00c038192a5541f
Use PEP-426 markers to avoid installing argparse.
diff --git a/README.txt b/README.txt
--- a/README.txt
+++ b/README.txt
@@ -169,6 +169,8 @@ CHANGELOG
- Use traceback2 consistently to get consistent output across all Pythons.
+- Use PEP-426 markers to avoid installing argparse on 2.7+ Pythons.
+
2015-06-20 - 1.1.0
------------------
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -57,7 +57,7 @@ KEYWORDS = "unittest testing tests".spli
# Both install and setup requires - because we read VERSION from within the
# package, and the package also exports all the APIs.
# six for compat helpers
-REQUIRES = ['argparse', 'six>=1.4', 'traceback2'],
+REQUIRES = ['six>=1.4', 'traceback2']
params = dict(
name=NAME,
@@ -71,7 +71,10 @@ params = dict(
classifiers=CLASSIFIERS,
keywords=KEYWORDS,
install_requires=REQUIRES,
- setup_requires=REQUIRES,
+ setup_requires=['argparse'] + REQUIRES,
+ extras_require={
+ ':python_version<="2.6"': ['argparse'],
+ }
)