Browse Source

dynamic install typing if python 3.4

Bastien Sevajol 6 years ago
parent
commit
d6206b5bf0
2 changed files with 6 additions and 1 deletions
  1. 0 1
      .travis.yml
  2. 6 0
      setup.py

+ 0 - 1
.travis.yml View File

@@ -8,7 +8,6 @@ python:
8 8
 install:
9 9
   - python setup.py develop
10 10
   - pip install -e ."[test]"
11
-  - pip install typing
12 11
 
13 12
 script: 
14 13
   - pytest --cov=hapic tests

+ 6 - 0
setup.py View File

@@ -3,6 +3,7 @@
3 3
 from setuptools import setup
4 4
 from setuptools import find_packages
5 5
 from os import path
6
+import sys
6 7
 
7 8
 here = path.abspath(path.dirname(__file__))
8 9
 
@@ -23,6 +24,11 @@ dev_require = [
23 24
     'requests',
24 25
 ] + tests_require
25 26
 
27
+
28
+# Python 3.4 require
29
+if sys.version_info.major == 3 and sys.version_info.minor == 4:
30
+    install_requires.append('typing')
31
+
26 32
 setup(
27 33
     name='hapic',
28 34