Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove fallback to distutils, patching of bdist_egg and use of doctools. #74

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 2 additions & 25 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,11 @@
# history and logs, available at http://genshi.edgewall.org/log/.

import os
try:
from setuptools import setup, Extension
from setuptools.command.bdist_egg import bdist_egg
except ImportError:
from distutils.core import setup, Extension
bdist_egg = None
from setuptools import setup, Extension
from distutils.command.build_ext import build_ext
from distutils.errors import CCompilerError, DistutilsPlatformError
import sys

sys.path.append(os.path.join('doc', 'common'))
try:
from doctools import build_doc, test_doc
except ImportError:
build_doc = test_doc = None

_speedup_available = False

is_pypy = hasattr(sys, 'pypy_version_info')
Expand Down Expand Up @@ -75,19 +64,7 @@ def _unavailable(self, exc):
if _speedup_enabled:
ext_modules.append(Extension('genshi._speedups', ['genshi/_speedups.c']))


# Setuptools need some help figuring out if the egg is "zip_safe" or not
if bdist_egg:
class my_bdist_egg(bdist_egg):
def zip_safe(self):
return not _speedup_available and bdist_egg.zip_safe(self)


cmdclass = {'build_doc': build_doc, 'test_doc': test_doc,
'build_ext': optional_build_ext}
if bdist_egg:
cmdclass['bdist_egg'] = my_bdist_egg

cmdclass = {'build_ext': optional_build_ext}

extra = {}
if sys.version_info >= (3,):
Expand Down
Loading