All Samples(92) | Call(52) | Derive(0) | Import(40)
A subset of the distribution that can be excluded if unneeded/wanted
Features are created using these keyword arguments:
'description' -- a short, human readable description of the feature, to
be used in error messages, and option help messages.
'standard' -- if true, the feature is included by default if it is
available on the current system. Otherwise, the feature is only
included if requested via a command line '--with-X' option, or if
another included feature requires it. The default setting is 'False'.
'available' -- if true, the feature is available for installation on the
current system. The default setting is 'True'.
'optional' -- if true, the feature's inclusion can be controlled from the
command line, using the '--with-X' or '--without-X' options. If
false, the feature's inclusion status is determined automatically,
based on 'availabile', 'standard', and whether any other feature
requires it. The default setting is 'True'.
'require_features' -- a string or sequence of strings naming features
that should also be included if this feature is included. Defaults to
empty list. May also contain 'Require' objects that should be
added/removed from the distribution.
'remove' -- a string or list of strings naming packages to be removed
from the distribution if this feature is *not* included. If the
feature *is* included, this argument is ignored. This argument exists
to support removing features that "crosscut" a distribution, such as
defining a 'tests' feature that removes all the 'tests' subpackages
provided by other features. The default for this argument is an empty
list. (Note: the named package(s) or modules must exist in the base
distribution when the 'setup()' function is initially called.)
other keywords -- any other keyword arguments are saved, and passed to
the distribution's 'include()' and 'exclude()' methods when the
feature is included or excluded, respectively. So, for example, you
could pass 'packages=["a","b"]' to cause packages 'a' and 'b' to be
added or removed from the distribution as appropriate.
A feature must include at least one 'requires', 'remove', or other
keyword argument. Otherwise, it can't affect the distribution in any way.
Note also that you can subclass 'Feature' to create your own specialized
feature types that modify the distribution in other ways when included or
excluded. See the docstrings for the various methods here for more detail.
Aside from the methods, the only feature attributes that distributions look
at are 'description' and 'optional'.src/d/i/distribute-0.6.14/setuptools/tests/__init__.py distribute(Download)
"""Tests for the 'setuptools' package""" from unittest import TestSuite, TestCase, makeSuite, defaultTestLoader import distutils.core, distutils.cmd from distutils.errors import DistutilsOptionError, DistutilsPlatformError from distutils.errors import DistutilsSetupError import setuptools, setuptools.dist from setuptools import Feature
def setUp(self):
self.req = Require('Distutils','1.0.3','distutils')
self.dist = makeSetup(
features={
'foo': Feature("foo",standard=True,require_features=['baz',self.req]),
'bar': Feature("bar", standard=True, packages=['pkg.bar'],
py_modules=['bar_et'], remove=['bar.ext'],
),
'baz': Feature(
"baz", optional=False, packages=['pkg.baz'],
scripts = ['scripts/baz_it'],
libraries=[('libfoo','foo/foofoo.c')]
),
'dwim': Feature("DWIM", available=False, remove='bazish'),
src/s/e/setuptools-0.6c11/setuptools/tests/__init__.py setuptools(Download)
"""Tests for the 'setuptools' package""" from unittest import TestSuite, TestCase, makeSuite, defaultTestLoader import distutils.core, distutils.cmd from distutils.errors import DistutilsOptionError, DistutilsPlatformError from distutils.errors import DistutilsSetupError import setuptools, setuptools.dist from setuptools import Feature
def setUp(self):
self.req = Require('Distutils','1.0.3','distutils')
self.dist = makeSetup(
features={
'foo': Feature("foo",standard=True,require_features=['baz',self.req]),
'bar': Feature("bar", standard=True, packages=['pkg.bar'],
py_modules=['bar_et'], remove=['bar.ext'],
),
'baz': Feature(
"baz", optional=False, packages=['pkg.baz'],
scripts = ['scripts/baz_it'],
libraries=[('libfoo','foo/foofoo.c')]
),
'dwim': Feature("DWIM", available=False, remove='bazish'),
src/r/e/reporter-lib-HEAD/packages/sqlalchemy/setup.py reporter-lib(Download)
)
try:
from setuptools import setup, Extension, Feature
except ImportError:
from distutils.core import setup, Extension
Feature = None
src/p/o/polinax-HEAD/libs/external_libs/Genshi-0.5.1/setup.py polinax(Download)
from glob import glob
import os
try:
from setuptools import setup, Extension, Feature
except ImportError:
from distutils.core import setup, Extension
Feature = None
src/p/y/PyQueryBuilder-HEAD/setup.py PyQueryBuilder(Download)
#!/usr/bin/env python import os import sys from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages, Feature
src/s/q/sqlalchemy-HEAD/setup.py sqlalchemy(Download)
)
try:
from setuptools import setup, Extension, Feature
except ImportError:
from distutils.core import setup, Extension
Feature = None
src/s/q/SQLAlchemy-0.6.4/setup.py SQLAlchemy(Download)
)
try:
from setuptools import setup, Extension, Feature
except ImportError:
from distutils.core import setup, Extension
Feature = None
src/e/l/Elements-0.2.0/setup.py Elements(Download)
from distutils.cmd import Command
from distutils.command.build_ext import build_ext
try:
from setuptools import setup, Extension, Feature
except ImportError:
from distutils.core import setup, Extension
Feature = None
src/m/o/mongodb-object-HEAD/setup.py mongodb-object(Download)
from ez_setup import use_setuptools use_setuptools() from setuptools import setup from setuptools import Feature from distutils.cmd import Command from distutils.command.build_ext import build_ext from distutils.errors import CCompilerError
src/p/y/pymongo-bongo-0.1.3/setup.py pymongo-bongo(Download)
use_setuptools() from setuptools import setup from setuptools import Feature from distutils.cmd import Command from distutils.command.build_ext import build_ext from distutils.errors import CCompilerError
Previous 1 | 2 | 3 | 4