|
9 | 9 | display_option_names = Distribution.display_option_names + ['help', 'help-commands'] |
10 | 10 | query_only = any('--' + opt in sys.argv for opt in display_option_names) or len(sys.argv) < 2 or sys.argv[1] == 'egg_info' |
11 | 11 |
|
12 | | -# Use setuptools for querying the package, normal builds use distutils |
13 | | -if query_only or 'sdist' in sys.argv: |
14 | | - try: |
15 | | - from setuptools import setup, Extension |
16 | | - except ImportError: |
17 | | - from distutils.core import setup |
18 | | - from distutils.extension import Extension |
19 | | -else: |
| 12 | +try: |
| 13 | + from setuptools import setup, Extension |
| 14 | + requires = {"install_requires": ["numpy"]} |
| 15 | +except: |
20 | 16 | from distutils.core import setup |
21 | 17 | from distutils.extension import Extension |
| 18 | + requires = {"requires": ["numpy"]} |
22 | 19 |
|
23 | 20 | lib_talib_name = 'ta_lib' # the underlying C library's name |
24 | 21 |
|
|
117 | 114 | "Programming Language :: Python :: 3.4", |
118 | 115 | "Programming Language :: Python :: 3.5", |
119 | 116 | "Programming Language :: Python :: 3.6", |
| 117 | + "Programming Language :: Python :: 3.7", |
120 | 118 | "Programming Language :: Cython", |
121 | 119 | "Topic :: Office/Business :: Financial", |
122 | 120 | "Topic :: Scientific/Engineering :: Mathematics", |
|
127 | 125 | packages = ['talib'], |
128 | 126 | ext_modules = ext_modules, |
129 | 127 | cmdclass = cmdclass, |
130 | | - install_requires = ['numpy'], |
| 128 | + **requires |
131 | 129 | ) |
0 commit comments