aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/markdown_py (renamed from bin/markdown)0
-rwxr-xr-xsetup.py14
2 files changed, 10 insertions, 4 deletions
diff --git a/bin/markdown b/bin/markdown_py
index 8d04cc9..8d04cc9 100755
--- a/bin/markdown
+++ b/bin/markdown_py
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',