forked from jrjohansson/version_information
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·65 lines (57 loc) · 1.64 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
#!/usr/bin/env python
"""Version information:
IPython extension command for displaying version information about selected
Python modules.
"""
DOCLINES = __doc__.split('\n')
CLASSIFIERS = """\
License :: OSI Approved :: BSD License
Programming Language :: Python
Programming Language :: Python :: 3
Operating System :: MacOS
Operating System :: POSIX
Operating System :: Unix
Operating System :: Microsoft :: Windows
"""
import os
from setuptools import setup
NAME = 'version_information2'
MAJOR = 1
MINOR = 1
MICRO = 0
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
PACKAGES = ['version_information']
AUTHOR = 'Brian Lee forking J. Robert Johansson\'s project'
AUTHOR_EMAIL = '[email protected]'
LICENSE = 'CC BY 3.0'
DESCRIPTION = DOCLINES[0]
LONG_DESCRIPTION = '\n'.join(DOCLINES[2:])
URL = 'https://github.com/leebrian/version_information'
DOWNLOAD_URL = 'https://github.com/leebrian/version_information/archive/v_1.1.0.tar.gz'
PLATFORMS = ['Linux', 'Mac OSX', 'Unix', 'Windows']
KEYWORDS = ['debug','ipython_magic_command','version']
INSTALL_REQUIRES = ['ipython']
def write_version_py(filename=NAME+'/version.py'):
cnt = """\
# THIS FILE IS GENERATED FROM SETUP.PY
version = '%(version)s'
"""
with open(filename, 'w') as f:
f.write(cnt % {'version': VERSION})
write_version_py()
setup(
name=NAME,
version=VERSION,
packages=PACKAGES,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
license=LICENSE,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
url=URL,
download_url=DOWNLOAD_URL,
install_requires=INSTALL_REQUIRES,
keywords=KEYWORDS,
platforms=PLATFORMS,
classifiers=CLASSIFIERS
)