فهرست منبع

Add unittest2 to tests_require on python2.6

Gary van der Merwe 10 سال پیش
والد
کامیت
cede8a5a0f
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      setup.py

+ 4 - 1
setup.py

@@ -47,6 +47,9 @@ if sys.platform == 'darwin' and os.path.exists('/usr/bin/xcodebuild'):
         if l.startswith('Xcode') and int(l.split()[1].split('.')[0]) >= 4:
             os.environ['ARCHFLAGS'] = ''
 
+tests_require = ['fastimport', 'mock', 'gevent', 'geventhttpclient']
+if sys.version_info < (2, 7):
+    tests_require.append('unittest2')
 
 setup(name='dulwich',
       description='Python Git Library',
@@ -85,7 +88,7 @@ setup(name='dulwich',
               include_dirs=include_dirs),
       ],
       test_suite='dulwich.tests.test_suite',
-      tests_require=['fastimport', 'mock', 'gevent', 'geventhttpclient'],
+      tests_require=tests_require,
       distclass=DulwichDistribution,
       include_package_data=True,
       use_2to3=True,