diff doc/hgmanpage.py @ 30450:0acf3fd718f1

setup: add flag to build_ext to control building zstd Downstream packagers will inevitably want to disable building the vendored python-zstandard Python package. Rather than force them to patch setup.py, let's give them a knob to use. distutils Command classes support defining custom options. It requires setting certain class attributes (yes, class attributes: instance attributes don't work because the class type is consulted before it is instantiated). We already have a custom child class of build_ext, so we set these class attributes, implement some scaffolding, and override build_extensions to filter the Extension instance for the zstd extension if the `--no-zstd` argument is specified. Example usage: $ python setup.py build_ext --no-zstd
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 17 Nov 2016 20:09:10 -0800
parents a8ba9a23c893
children eb14ab7db33e
line wrap: on
line diff