Selaa lähdekoodia

Enable testing python3.4 on travis.

Gary van der Merwe 10 vuotta sitten
vanhempi
commit
67f2b6ff51
2 muutettua tiedostoa jossa 8 lisäystä ja 3 poistoa
  1. 2 1
      .travis.yml
  2. 6 2
      setup.py

+ 2 - 1
.travis.yml

@@ -1,10 +1,11 @@
 language: python
-# Workaround to make 2.7 use system site packages, and 2.6 not use system
+# Workaround to make 2.7 use system site packages, and 2.6 and 3.4 not use system
 # site packages.
 # https://github.com/travis-ci/travis-ci/issues/2219#issuecomment-41804942
 python:
 - "2.6"
 - "2.7_with_system_site_packages"
+- "3.4"
 script: PYTHONHASHSEED=random python setup.py test
 install:
   - sudo apt-get update

+ 6 - 2
setup.py

@@ -17,7 +17,6 @@ import sys
 if sys.platform == 'win32':
     include_dirs.append('dulwich')
 
-
 class DulwichDistribution(Distribution):
 
     def is_pure(self):
@@ -47,7 +46,12 @@ 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[0] == 2:
+    tests_require = ['fastimport', 'mock', 'gevent', 'geventhttpclient']
+else:
+    # fastimport, gevent, geventhttpclient are not available for PY3
+    # mock only used for test_swift, which requires gevent/geventhttpclient
+    tests_require = []
 if sys.version_info < (2, 7):
     tests_require.append('unittest2')