summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan.limberg@icloud.com>2015-03-14 19:30:01 -0400
committerWaylan Limberg <waylan.limberg@icloud.com>2018-01-11 19:04:49 -0500
commit997063da6ae18692eab45e8d695e9dbc5aea3efe (patch)
tree7d79271b4e22ffa8d2f88bb52357738b8ff7c545 /setup.py
parent9ea0e31c20f67ba22e6dda310a9c9cd82e203288 (diff)
downloadpython-markdown-997063da6ae18692eab45e8d695e9dbc5aea3efe.tar.gz
Moved core to core.py
__version__ is now in __init__.py (as is should be) and the core is defined in core.py. Other than version, __init__.py is just a dummy which imports the pieces we make public.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py42
1 files changed, 14 insertions, 28 deletions
diff --git a/setup.py b/setup.py
index fc7ee49..6f0a1e7 100755
--- a/setup.py
+++ b/setup.py
@@ -1,34 +1,20 @@
#!/usr/bin/env python
from setuptools import setup
-import os
-import imp
+from markdown import __version__, __version_info__
-def get_version():
- " Get version & version_info without importing markdown.__init__ "
- path = os.path.join(os.path.dirname(__file__), 'markdown')
- fp, pathname, desc = imp.find_module('__version__', [path])
- try:
- v = imp.load_module('__version__', fp, pathname, desc)
- finally:
- fp.close()
-
- dev_status_map = {
- 'alpha': '3 - Alpha',
- 'beta': '4 - Beta',
- 'rc': '4 - Beta',
- 'final': '5 - Production/Stable'
- }
- if v.version_info[3] == 'alpha' and v.version_info[4] == 0:
- status = '2 - Pre-Alpha'
- else:
- status = dev_status_map[v.version_info[3]]
- return v.version, v.version_info, status
-
-
-version, version_info, DEVSTATUS = get_version()
-
+# Get development Status for classifiers
+dev_status_map = {
+ 'alpha': '3 - Alpha',
+ 'beta': '4 - Beta',
+ 'rc': '4 - Beta',
+ 'final': '5 - Production/Stable'
+}
+if __version_info__[3] == 'alpha' and __version_info__[4] == 0:
+ DEVSTATUS = '2 - Pre-Alpha'
+else:
+ DEVSTATUS = dev_status_map[__version_info__[3]]
# The command line script name. Currently set to "markdown_py" so as not to
# conflict with the perl implimentation (which uses "markdown").
@@ -59,9 +45,9 @@ You may ask for help and discuss various other issues on the
setup(
name='Markdown',
- version=version,
+ version=__version__,
url='https://Python-Markdown.github.io/',
- download_url='http://pypi.python.org/packages/source/M/Markdown/Markdown-%s-py2.py3-none-any.whl' % version,
+ download_url='http://pypi.python.org/packages/source/M/Markdown/Markdown-%s-py2.py3-none-any.whl' % __version__,
description='Python implementation of Markdown.',
long_description=long_description,
author='Manfred Stienstra, Yuri takhteyev and Waylan limberg',