summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2019-11-24 13:38:02 -0800
committerGeorg Brandl <georg@python.org>2019-11-25 18:12:14 +0100
commited97a09b19cb256c6d0081bfb2f96f9d54e6c404 (patch)
tree222080738f18f85146b01fb21b764e589118bea2 /setup.py
parentd53573705c3354dc8fabbb9fef85ffecc817f356 (diff)
downloadpygments-git-ed97a09b19cb256c6d0081bfb2f96f9d54e6c404.tar.gz
Assume setuptools is available
On modern Python installations, setuptools should always be available and should always be preferred. Can remove the fallback to distutils. Replace the pygmentize script with a __main__.py in the package.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py30
1 files changed, 4 insertions, 26 deletions
diff --git a/setup.py b/setup.py
index 62f810d3..904c9de1 100755
--- a/setup.py
+++ b/setup.py
@@ -21,31 +21,7 @@ are:
:license: BSD, see LICENSE for details.
"""
-try:
- from setuptools import setup, find_packages
- have_setuptools = True
-except ImportError:
- from distutils.core import setup
- def find_packages(*args, **kwargs):
- return [
- 'pygments',
- 'pygments.lexers',
- 'pygments.formatters',
- 'pygments.styles',
- 'pygments.filters',
- ]
- have_setuptools = False
-
-if have_setuptools:
- add_keywords = dict(
- entry_points = {
- 'console_scripts': ['pygmentize = pygments.cmdline:main'],
- },
- )
-else:
- add_keywords = dict(
- scripts = ['pygmentize'],
- )
+from setuptools import setup, find_packages
setup(
name = 'Pygments',
@@ -58,6 +34,9 @@ setup(
long_description = __doc__,
keywords = 'syntax highlighting',
packages = find_packages(),
+ entry_points = {
+ 'console_scripts': ['pygmentize = pygments.cmdline:main'],
+ },
platforms = 'any',
zip_safe = False,
include_package_data = True,
@@ -82,5 +61,4 @@ setup(
'Topic :: Text Processing :: Filters',
'Topic :: Utilities',
],
- **add_keywords
)