summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsetup.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 6a863b9e..cc8589f0 100755
--- a/setup.py
+++ b/setup.py
@@ -29,6 +29,7 @@
try:
from setuptools import setup, find_packages
+ have_setuptools = True
except ImportError:
from distutils.core import setup
def find_packages():
@@ -39,12 +40,24 @@ except ImportError:
'pygments.styles',
'pygments.filters',
]
+ have_setuptools = False
try:
from distutils.command.build_py import build_py_2to3 as build_py
except ImportError:
from distutils.command.build_py import build_py
+if have_setuptools:
+ add_keywords = dict(
+ entry_points = {
+ 'console_scripts': ['pygmentize = pygments.cmdline:main'],
+ },
+ )
+else:
+ add_keywords = dict(
+ scripts = ['pygmentize'],
+ )
+
setup(
name = 'Pygments',
version = '1.2.2',
@@ -56,7 +69,6 @@ setup(
long_description = __doc__,
keywords = 'syntax highlighting',
packages = find_packages(),
- scripts = ['pygmentize'],
platforms = 'any',
zip_safe = False,
include_package_data = True,
@@ -72,4 +84,5 @@ setup(
'Operating System :: OS Independent',
],
cmdclass = {'build_py': build_py},
+ **add_keywords
)