Setup.py adding options (aka setup.py --enable-feature )?

An example of exactly what you want is the sqlalchemy s cextensions which are there specifically for the same purpose - faster C implementation. In order to see how SA implemented it you need to look at 2 files.

An example of exactly what you want is the sqlalchemy's cextensions, which are there specifically for the same purpose - faster C implementation. In order to see how SA implemented it you need to look at 2 files: 1) setup.py. As you can see from the extract below, they handle the cases with setuptools and distutils: try: from setuptools import setup, Extension, Feature except ImportError: from distutils.

Core import setup, Extension Feature = None Later there is a check if Feature: and the extension is configured properly for each case using variable extra, which is later added to the setup() function. 2) base. Py: here look at how BaseRowProxy is defined: try: from sqlalchemy.

Cresultproxy import BaseRowProxy except ImportError: class BaseRowProxy(object): #.... So basically once C extensions are installed (using --with-cextensions flag during setup), the C implementation will be used. Otherwise, pure Python implementation of the class/function is used.

The docs for distutils include a section on extending the standard functionality. The relevant suggestion seems to be to subclass the relevant classes from the distutils.command. * modules (such as build_py or install) and tell setup to use your new versions (through the cmdclass argument, which is a dictionary mapping commands to classes which are to be used to execute them).

See the source of any of the command classes (e.g. The install command) to get a good idea of what one has to do to add a new option.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions