-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·68 lines (59 loc) · 1.55 KB
/
setup.py
File metadata and controls
executable file
·68 lines (59 loc) · 1.55 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
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
#!/usr/bin/env python
"""wavefunction: a python package for computing wavefunctions and energy
spectrum for arbitrary one and two-dimensional quantum systems.
"""
DOCLINES = __doc__.split('\n')
CLASSIFIERS = """\
Programming Language :: Python
Topic :: Engineering
Operating System :: POSIX
Operating System :: Unix
"""
import os
import sys
import shutil
import re
import subprocess
import warnings
from distutils.core import setup, Extension
import numpy as np
MAJOR = 1
MINOR = 0
MICRO = 0
ISRELEASED = False
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
try:
REVISION = 0 + len(os.popen("git rev-list --all").readlines())
except:
REVISION = 0
def write_version_py(filename='wavefunction/version.py'):
if os.path.exists(filename):
os.remove(filename)
cnt = """\
# THIS FILE IS AUTOMATICALLY GENERATED BY WAVEFUNCTION SETUP.PY
version = '%(version)s'
revision = %(revision)s
release = %(isrelease)s
"""
a = open(filename, 'w')
try:
a.write(cnt % {'version': VERSION,
'revision': REVISION,
'isrelease': str(ISRELEASED)})
finally:
a.close()
write_version_py()
setup(
name="wavefunction",
version=VERSION,
packages=['wavefunction'],
include_dirs=[np.get_include()],
author="Robert Johansson",
author_email="jrjohansson@gmail.com",
license="LGPL",
description=DOCLINES[0],
long_description="\n".join(DOCLINES[2:]),
keywords="compute wavefunctions and energy spectra",
url="http://github.com/jrjohansson",
platforms=["Linux", "Unix"],
)