All Samples(13) | Call(0) | Derive(6) | Import(7)
Distribution with support for features, tests, and package data
This is an enhanced version of 'distutils.dist.Distribution' that
effectively adds the following new optional keyword arguments to 'setup()':
'install_requires' -- a string or sequence of strings specifying project
versions that the distribution requires when installed, in the format
used by 'pkg_resources.require()'. They will be installed
automatically when the package is installed. If you wish to use
packages that are not available in PyPI, or want to give your users an
alternate download location, you can add a 'find_links' option to the
'[easy_install]' section of your project's 'setup.cfg' file, and then
setuptools will scan the listed web pages for links that satisfy the
requirements.
'extras_require' -- a dictionary mapping names of optional "extras" to the
additional requirement(s) that using those extras incurs. For example,
this::
extras_require = dict(reST = ["docutils>=0.3", "reSTedit"])
indicates that the distribution can optionally provide an extra
capability called "reST", but it can only be used if docutils and
reSTedit are installed. If the user installs your package using
EasyInstall and requests one of your extras, the corresponding
additional requirements will be installed if needed.
'features' -- a dictionary mapping option names to 'setuptools.Feature'
objects. Features are a portion of the distribution that can be
included or excluded based on user options, inter-feature dependencies,
and availability on the current system. Excluded features are omitted
from all setup commands, including source and binary distributions, so
you can create multiple distributions from the same source tree.
Feature names should be valid Python identifiers, except that they may
contain the '-' (minus) sign. Features can be included or excluded
via the command line options '--with-X' and '--without-X', where 'X' is
the name of the feature. Whether a feature is included by default, and
whether you are allowed to control this from the command line, is
determined by the Feature object. See the 'Feature' class for more
information.
'test_suite' -- the name of a test suite to run for the 'test' command.
If the user runs 'python setup.py test', the package will be installed,
and the named test suite will be run. The format is the same as
would be used on a 'unittest.py' command line. That is, it is the
dotted name of an object to import and call to generate a test suite.
'package_data' -- a dictionary mapping package names to lists of filenames
or globs to use to find data files contained in the named packages.
If the dictionary has filenames or globs listed under '""' (the empty
string), those names will be searched for in every package, in addition
to any names for the specific package. Data files found using these
names/globs will be installed along with the package, in the same
location as the package. Note that globs are allowed to reference
the contents of non-package subdirectories, as long as you use '/' as
a path separator. (Globs are automatically converted to
platform-specific paths at runtime.)
In addition to these new keywords, this class also has several new methods
for manipulating the distribution's contents. For example, the 'include()'
and 'exclude()' methods can be thought of as in-place add and subtract
commands that add or remove packages, modules, extensions, and so on from
the distribution. They are used by the feature subsystem to configure the
distribution for the included and excluded features.src/p/y/PyTAPS-1.0rc2/setup.py PyTAPS(Download)
ez_setup.use_setuptools() from setuptools import setup, Command, Extension, Feature from setuptools import Distribution as _Distribution from distutils.errors import DistutilsOptionError from distutils.command.build_ext import build_ext
class Distribution(_Distribution):
global_options = _Distribution.global_options + [
('iMesh-path=', None, 'root directory for iMesh interface'),
('iGeom-path=', None, 'root directory for iGeom interface'),
('iRel-path=', None, 'root directory for iRel interface'),
]
test_suites = []
src/p/y/pypentago-HEAD/src/setup.py pypentago(Download)
import imp import optparse from setuptools import setup, Extension, Distribution, Feature from distutils import sysconfig VERSION = '0.1.0'
class FixedDistribution(Distribution):
def _include_misc(self, name, value):
if name == 'entry_points':
old = getattr(self, name)
for (group, entries) in value.iteritems():
self.entry_points.setdefault(group, list()).extend(entries)
else:
src/s/m/smisk-HEAD/setup.py smisk(Download)
import sys, os, time, platform, re, subprocess from setuptools import Extension as _Extension, Distribution, Command from pkg_resources import parse_version from distutils import log from subprocess import Popen, PIPE
class SmiskDistribution(Distribution):
def __init__(self, attrs=None):
Distribution.__init__(self, attrs)
self.cmdclass = {
'build': build,
'build_ext': build_ext,
'sdist': sdist,
src/s/m/smisk-1.1.6/setup.py smisk(Download)
import sys, os, time, platform, re, subprocess from setuptools import Extension as _Extension, Distribution, Command from pkg_resources import parse_version from distutils import log from subprocess import Popen, PIPE
class SmiskDistribution(Distribution):
def __init__(self, attrs=None):
Distribution.__init__(self, attrs)
self.cmdclass = {
'build': build,
'build_ext': build_ext,
'sdist': sdist,
src/j/a/jaraco.windows-1.9.1/setup.py jaraco.windows(Download)
import os import functools from setuptools import setup, find_packages, Distribution __author__ = 'Jason R. Coombs <jaraco@jaraco.com>' class VersionCallableDistribution(Distribution):
src/f/l/flickrapi-1.4.2/_setup.py flickrapi(Download)
__author__ = 'Sybren A. Stuvel' from setuptools import setup, Distribution import os import sys
class OurDistribution(Distribution):
'''Distribution that also generates the flickrapi.html'''
def run_command(self, command):
'''Builds the documentation if needed, then passes control to
the superclass' run_command(...) method.
'''
src/m/u/multiblend-1.4/setup.py multiblend(Download)
# -*- encoding: utf-8 -*- import ez_setup ez_setup.use_setuptools(version='0.6c9') from setuptools import setup, Distribution import os