summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2010-07-01 13:30:16 -0400
committerWaylan Limberg <waylan@gmail.com>2010-07-01 13:30:16 -0400
commitd833be68cb7279241996e0f3e9ae3d1162308145 (patch)
treefe498c571015882b8a9db35e655c7376bd6d8f2e /setup.py
parent3d2cdeeddc77f3c226ad59eef95f9070835c60ab (diff)
downloadpython-markdown-d833be68cb7279241996e0f3e9ae3d1162308145.tar.gz
Fixed Ticket 63. Changed name of commandline script (again) to 'markdown_py' because 'markdown' conflicts with the perl implementation. 'markdown_py' will at least still work with tab completion when the user types 'markdown'.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index 42939d3..6c5ed29 100755
--- a/setup.py
+++ b/setup.py
@@ -6,17 +6,23 @@ from distutils.command.install_scripts import install_scripts
version = '2.0.3'
+# The command line script name. Currently set to "markdown_py" so as not to
+# conflict with the perl implimentation (which uses "markdown"). We can't use
+# "markdown.py" as the default config on some systems will cause the script to
+# try to import itself rather than the library which raised an error.
+SCRIPT_NAME = 'markdown_py'
+
class md_install_scripts(install_scripts):
- """ Customized install_scripts. Create markdown.bat for win32. """
+ """ Customized install_scripts. Create markdown_py.bat for win32. """
def run(self):
install_scripts.run(self)
if sys.platform == 'win32':
try:
script_dir = os.path.join(sys.prefix, 'Scripts')
- script_path = os.path.join(script_dir, 'markdown')
+ script_path = os.path.join(script_dir, SCRIPT_NAME)
bat_str = '@"%s" "%s" %%*' % (sys.executable, script_path)
- bat_path = os.path.join(self.install_dir, 'markdown.bat')
+ bat_path = os.path.join(self.install_dir, '%s.bat' %SCRIPT_NAME)
f = file(bat_path, 'w')
f.write(bat_str)
f.close()
@@ -36,7 +42,7 @@ data = dict(
maintainer_email = 'waylan [at] gmail.com',
license = 'BSD License',
packages = ['markdown', 'markdown.extensions'],
- scripts = ['bin/markdown'],
+ scripts = ['bin/%s' % SCRIPT_NAME],
cmdclass = {'install_scripts': md_install_scripts},
classifiers = ['Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: BSD License',