-
Notifications
You must be signed in to change notification settings - Fork 13
/
setup.py
72 lines (58 loc) · 1.85 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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
# These requirements should not be updated to versions more
# recent than required by Kwant:
# https://gitlab.kwant-project.org/kwant/kwant/blob/master/setup.py#L584
# because we want to remain interoperable
install_requires = [
'numpy>=1.16.2',
'scipy>=1.1',
'sympy>=1.3.0',
'tinyarray>=1.2.2',
]
extras_require = {
'kwant': ['kwant'],
}
tests_require = [
'pytest',
]
setup_requires = [
'pytest-runner',
]
python_version = '3.7'
# Loads version.py module without importing the whole package.
def get_version_and_cmdclass(package_path):
import os
from importlib.util import module_from_spec, spec_from_file_location
spec = spec_from_file_location('version',
os.path.join(package_path, '_version.py'))
module = module_from_spec(spec)
spec.loader.exec_module(module)
return module.__version__, module.cmdclass
version, cmdclass = get_version_and_cmdclass('qsymm')
with open("README.md") as f:
long_description = f.read()
setup(
name='qsymm',
description='Symmetry finder and symmetric Hamiltonian generator',
long_description=long_description,
long_description_content_type="text/markdown",
url='https://gitlab.kwant-project.org/qt/qsymm',
author='Qsymm authors',
license='BSD',
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'Intended Audience :: Science/Research',
'Programming Language :: Python :: ' + python_version,
],
packages=find_packages('.'),
install_requires=install_requires,
extras_require=extras_require,
tests_require=tests_require,
setup_requires=setup_requires,
python_requires='>=' + python_version,
version=version,
cmdclass=cmdclass,
)