-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
34 lines (30 loc) · 1.05 KB
/
setup.py
File metadata and controls
34 lines (30 loc) · 1.05 KB
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
from setuptools import setup, find_packages
import os
def read_requirements(fname):
with open('requirements.txt') as file:
lines=file.readlines()
requirements = [line.strip() for line in lines]
return requirements
def get_version():
topdir = os.path.abspath(os.path.join(__file__, '..'))
with open(os.path.join(topdir, 'compol', '__init__.py'), 'r') as f:
for line in f.readlines():
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
raise ValueError("Version string not found")
VERSION = get_version()
NAME = 'compol'
AUTHOR = 'Chong Sun'
DESCRIPTION = "Complex polarization analysis of many-body localization"
AUTHOR_EMAIL = 'sunchong137@gmail.com'
REQUIREMENTS = read_requirements('requirements.txt')
setup(
name=NAME,
version=VERSION,
description=DESCRIPTION,
author_email=AUTHOR_EMAIL,
install_requires=REQUIREMENTS,
packages=find_packages(exclude=['*test*', '*examples*']),
include_package_data=True,
)