forked from QuTech-Delft/qtt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
83 lines (68 loc) · 2.73 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import os
import platform
import re
from pathlib import Path
from setuptools import find_packages, setup
def readme():
with open('README.md', encoding='utf-8') as f:
return f.read()
def get_version(verbose=1, filename='src/qtt/version.py'):
""" Extract version information from source code """
with open(filename) as f:
ln = f.readline()
m = re.search('.* ''(.*)''', ln)
version = (m.group(1)).strip('\'')
if verbose:
print('get_version: %s' % version)
return version
def get_package_data(root_dir):
""" Gather directories under root_dir with files in it """
package_data = []
for root_dir, dirs, files in os.walk(root_dir):
if len(files) > 0:
package_data.append(f'{os.path.join(Path(*Path(root_dir).parts[2:]), "*")}')
return package_data
tests_require = ['coverage', 'jupyter', 'mypy', 'types-redis', 'types-python-dateutil', 'pytest']
install_requires = [
'apscheduler', 'attrs', 'dulwich', 'IPython', 'jupyter', 'lmfit', 'matplotlib',
'numdifftools', 'numpy>=1.23', 'opencv-python', 'pandas', 'PyQt5', 'pyqtgraph<0.13.0', 'pyvisa', 'pyzmqrpc', 'qcodes>=0.30.0',
'qcodes-contrib-drivers', 'qilib==0.3.9', 'qiskit-terra>=0.22', 'qtpy', 'qupulse', 'redis', 'scipy', 'scikit-image',
'shapely', 'sympy', 'imageio', 'rich'
] + tests_require
if platform.system() == 'Windows':
install_requires.append('pywin32')
rtd_requires = [
'sphinx', 'sphinx_rtd_theme', 'nbsphinx', 'sphinx-automodapi', 'sphinx_copybutton'
]
extras_require = {"rtd": rtd_requires}
setup(name='qttpte',
version=get_version(),
use_2to3=False,
author='Pieter Eendebak',
author_email='[email protected]',
maintainer='Pieter Eendebak',
maintainer_email='[email protected]',
description='Python-based framework for analysis and tuning of quantum dots',
long_description=readme(),
long_description_content_type='text/markdown',
url='https://qutech.nl',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Scientific/Engineering'
],
license='MIT',
package_dir={'': 'src'},
packages=find_packages(where='./src', exclude=["*tests*"]),
package_data={'qtt': get_package_data('src/qtt/exampledata')},
data_files=[],
install_requires=install_requires,
tests_require=tests_require,
extras_require=extras_require,
zip_safe=False,
)