|
7 | 7 |
|
8 | 8 |
|
9 | 9 | def read(*args):
|
10 |
| - return open(os.path.join(os.path.dirname(__file__), *args), |
11 |
| - encoding='utf8').read() |
| 10 | + return open(os.path.join(os.path.dirname(__file__), *args), encoding='utf8').read() |
12 | 11 |
|
13 | 12 |
|
14 | 13 | def extract_version(version_file):
|
15 |
| - version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", |
16 |
| - version_file, re.M) |
| 14 | + version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M) |
17 | 15 | if version_match:
|
18 | 16 | return version_match.group(1)
|
19 | 17 |
|
20 | 18 | raise RuntimeError("Unable to find version string.")
|
21 | 19 |
|
22 | 20 |
|
23 | 21 | if sys.version_info < (3, 6):
|
24 |
| - sys.stderr.write('ERROR: You need Python 3.6 or later ' |
25 |
| - 'to install this package.\n') |
| 22 | + sys.stderr.write('ERROR: You need Python 3.6 or later to install this package.\n') |
26 | 23 | exit(1)
|
27 | 24 |
|
28 | 25 | extras_require = {'plotting': ['matplotlib'],
|
29 | 26 | 'bloch_sphere_visualization': ['qutip', 'matplotlib'],
|
30 | 27 | 'fancy_progressbar': ['requests'],
|
31 |
| - 'doc': ['jupyter', 'nbsphinx', 'numpydoc', 'sphinx', |
32 |
| - 'sphinx_rtd_theme'], |
| 28 | + 'doc': ['jupyter', 'nbsphinx', 'numpydoc', 'sphinx', 'sphinx_rtd_theme'], |
33 | 29 | 'tests': ['pytest>=4.6', 'pytest-cov', 'codecov']}
|
34 | 30 |
|
35 |
| -extras_require['all'] = [dep for deps in extras_require.values() |
36 |
| - for dep in deps] |
| 31 | +extras_require['all'] = [dep for deps in extras_require.values() for dep in deps] |
37 | 32 |
|
38 | 33 | setup(name='filter_functions',
|
39 | 34 | version=extract_version(read('filter_functions', '__init__.py')),
|
|
0 commit comments