Ticket #3586: 3586.no-speedups.2.patch

File 3586.no-speedups.2.patch, 1.4 KB (added by techtonik, 6 years ago)

no leftovers

  • twisted/python/dist.py

     
    77"""
    88
    99import sys, os
     10from distutils.command import build
    1011from distutils.command import build_scripts, install_data, build_ext, build_py
    1112from distutils.errors import CompileError
    1213from distutils import core
    13 from distutils.core import Extension
     14from distutils.core import Extension, Distribution
    1415
    1516twisted_subprojects = ["conch", "lore", "mail", "names",
    1617                       "news", "pair", "runner", "web",
     
    253254
    254255## Helpers and distutil tweaks
    255256
     257# Global --no-speedups option to install Twisted without extensions - #3586
     258
     259Distribution.global_options.append(('no-speedups', None, 'skip C extensions'))
     260Distribution.no_speedups = 0
     261
     262
    256263class build_py_twisted(build_py.build_py):
    257264    """
    258265    Changes behavior in Python 2.2 to support simultaneous specification of
     
    301308    Allow subclasses to easily detect and customize Extensions to
    302309    build at install-time.
    303310    """
     311    def finalize_options(self):
     312        """
     313        Clean extension list if global --no-speedups option is set.
     314        """
     315        build_ext.build_ext.finalize_options(self)
     316        if self.distribution.no_speedups:
     317            self.extensions = []
    304318
    305319    def prepare_extensions(self):
    306320        """