-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
64 lines (57 loc) · 1.77 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
#!/usr/bin/env python
# import statements
import sys
from distutils.util import get_platform
try:
# First try to load most advanced setuptools setup.
from setuptools import setup
except:
# Fall back if setuptools is not installed.
from distutils.core import setup
platform = get_platform()
# check Python's version
if sys.version_info < (2, 7):
sys.stderr.write('This module requires at least Python 2.7\n')
sys.exit(1)
# check linux platform
if not platform.startswith('linux'):
sys.stderr.write("This module is not available on %s\n" % platform)
sys.exit(1)
classif = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: GPLv3 License',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 2.4',
'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.0',
'Programming Language :: Python :: 3.1',
'Programming Language :: Python :: 3.2',
'Topic :: Software Development :: Libraries :: Python Modules',
]
# Select branch
if sys.version_info >= (3, 0):
package_dir = {'': 'python3'}
else:
package_dir = {'': 'python2'}
# Do setup
setup(
name='elemlib',
version='0.0.1',
description='Library for element operation',
author='Fpemud',
author_email='[email protected]',
license='GPLv3 License',
platforms='Linux',
classifiers=classif,
url='http://github.com/fpemud/elemlib',
download_url='',
py_modules=['elemlib'],
package_dir=package_dir,
)