forked from theorchard/openpyxl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·86 lines (72 loc) · 2.46 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
#!/usr/bin/env python
"""Setup script for packaging openpyxl.
Requires setuptools.
To build the setuptools egg use
python setup.py bdist_egg
and either upload it to the PyPI with:
python setup.py upload
or upload to your own server and register the release with PyPI:
python setup.py register
A source distribution (.zip) can be built with
python setup.py sdist --format=zip
That uses the manifest.in file for data files rather than searching for
them here.
"""
import sys
import os
import warnings
if sys.version_info < (2, 6):
raise Exception("Python >= 2.6 is required.")
elif sys.version_info[:2] == (3, 2):
warnings.warn("Python 3.2 is no longer officially supported")
from setuptools import setup, Extension, find_packages
import re
here = os.path.abspath(os.path.dirname(__file__))
try:
with open(os.path.join(here, 'README.rst')) as f:
README = f.read()
except IOError:
README = ''
__author__ = 'See AUTHORS'
__license__ = 'MIT/Expat'
__author_email__ = '[email protected]'
__maintainer_email__ = '[email protected]'
__url__ = 'http://openpyxl.readthedocs.org'
def get_version():
f = open(os.path.join(here, 'openpyxl', '__init__.py'))
version_file = f.read()
f.close()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
setup(name='openpyxl',
packages=find_packages(),
# metadata
version=get_version(),
description="A Python library to read/write Excel 2007 xlsx/xlsm files",
long_description=README,
author=__author__,
author_email=__author_email__,
url=__url__,
license=__license__,
requires=[
'python (>=2.6.0)',
],
install_requires=[
'jdcal',
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],
)