-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.py
executable file
·91 lines (79 loc) · 2.78 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
84
85
86
87
88
89
90
91
#!/usr/bin/env python
# Copyright (C) 2007 CAMP
# Please see the accompanying LICENSE file for further information.
from distutils.core import setup
from glob import glob
from os.path import join
import os
import sys
long_description = """\
ASE is a python package providing an open source Atomic Simulation
Environment in the python scripting language."""
if sys.version_info < (2, 3, 0, 'final', 0):
raise SystemExit, 'Python 2.3 or later is required!'
packages = ['ase',
'ase.cluster',
'ase.cluster.data',
'ase.io',
'ase.md',
'ase.dft',
'ase.gui',
'ase.gui.languages',
'ase.data',
'ase.test',
'ase.test.abinit',
'ase.test.castep',
'ase.test.cmr',
'ase.test.elk',
'ase.test.fio',
'ase.test.fleur',
'ase.test.jacapo',
'ase.test.nwchem',
'ase.test.vasp',
'ase.tasks',
'ase.utils',
'ase.lattice',
'ase.lattice.spacegroup',
'ase.examples',
'ase.optimize',
'ase.optimize.test',
'ase.visualize',
'ase.visualize.vtk',
'ase.transport',
'ase.calculators',
'ase.calculators.jacapo']
package_dir={'ase': 'ase'}
package_data={'ase': ['lattice/spacegroup/spacegroup.dat',
'gui/po/ag.pot',
'gui/po/makefile',
'gui/po/??_??/LC_MESSAGES/ag.po']}
# Compile makes sense only when building
if 'build' in sys.argv or 'build_ext' in sys.argv or 'install' in sys.argv:
msgfmt = 'msgfmt'
# Compile translation files (requires gettext)
status = os.system(msgfmt + ' -V')
if status == 0:
for pofile in glob('ase/gui/po/??_??/LC_MESSAGES/ag.po'):
mofile = os.path.join(os.path.split(pofile)[0], 'ag.mo')
os.system(msgfmt + ' -cv %s --output-file=%s' % (pofile, mofile))
package_data['ase'].append('gui/po/??_??/LC_MESSAGES/ag.mo')
# Get the current version number:
execfile('ase/svnversion_io.py') # write ase/svnversion.py and get svnversion
execfile('ase/version.py') # get version_base
if svnversion:
version = version_base + '.' + svnversion
else:
version = version_base
setup(name = 'python-ase',
version=version,
description='Atomic Simulation Environment',
url='https://wiki.fysik.dtu.dk/ase',
maintainer='CAMd',
maintainer_email='camd@fysik.dtu.dk',
license='LGPLv2.1+',
platforms=['linux'],
packages=packages,
package_dir=package_dir,
package_data=package_data,
scripts=['tools/ag', 'tools/ase', 'tools/ASE2ase.py', 'tools/testase.py'],
long_description=long_description)