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
 install:
8
 install:
9
   - python setup.py develop
9
   - python setup.py develop
10
   - pip install -e ."[test]"
10
   - pip install -e ."[test]"
11
-  - pip install typing
12
 
11
 
13
 script: 
12
 script: 
14
   - pytest --cov=hapic tests
13
   - pytest --cov=hapic tests

+ 6 - 0
setup.py View File

3
 from setuptools import setup
3
 from setuptools import setup
4
 from setuptools import find_packages
4
 from setuptools import find_packages
5
 from os import path
5
 from os import path
6
+import sys
6
 
7
 
7
 here = path.abspath(path.dirname(__file__))
8
 here = path.abspath(path.dirname(__file__))
8
 
9
 
23
     'requests',
24
     'requests',
24
 ] + tests_require
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
 setup(
32
 setup(
27
     name='hapic',
33
     name='hapic',
28
 
34