All Samples(145) | Call(103) | Derive(0) | Import(42)
Return a current distribution object for a Requirement or string
def get_distribution(dist):
"""Return a current distribution object for a Requirement or string"""
if isinstance(dist,basestring): dist = Requirement.parse(dist)
if isinstance(dist,Requirement): dist = get_provider(dist)
if not isinstance(dist,Distribution):
raise TypeError("Expected string, Requirement, or Distribution", dist)
return dist
from setuptools.package_index import PackageIndex
from setuptools.package_index import URL_SCHEME
from setuptools.command import bdist_egg, egg_info
from pkg_resources import yield_lines, normalize_path, resource_string, \
ensure_directory, get_distribution, find_distributions, \
Environment, Requirement, Distribution, \
PathMetadata, EggMetadata, WorkingSet, \
src/t/g/tglinker-0.5/tglinker.py tglinker(Download)
import logging import os, os.path import stat import sys from pkg_resources import get_distribution, Environment, resource_filename
def genlinks(pkgname, pkgver, pkgs):
dist = '%s==%s' % (pkgname, pkgver)
try:
pkg = get_distribution(dist)
except:
logging.critical('%s is not a valid package specifier. Aborting.' % (dist))
sys.exit(1)
src/z/3/z3c.autoinclude-0.3.3/src/z3c/autoinclude/dependency.py z3c.autoinclude(Download)
import os from zope.dottedname.resolve import resolve from pkg_resources import resource_exists from pkg_resources import get_provider from pkg_resources import get_distribution from z3c.autoinclude.utils import DistributionManager from z3c.autoinclude.utils import ZCMLInfo
"""
if zcml_filenames is None:
zcml_filenames = ['meta.zcml', 'configure.zcml', 'overrides.zcml']
dist = get_distribution(project_name)
include_finder = DependencyFinder(dist)
return include_finder.includableInfo(zcml_filenames)
src/p/a/parlance-HEAD/trunk/parlance/__init__.py parlance(Download)
the Artistic License 2.0, as published by the Perl Foundation.
'''#'''
from pkg_resources import get_distribution, DistributionNotFound
# List of available modules
__all__ = [
]
try:
dist = get_distribution('Parlance')
except DistributionNotFound:
__version__ = None
else: __version__ = 'v' + dist.version
src/p/a/parlance-HEAD/parlance/__init__.py parlance(Download)
the Artistic License 2.0, as published by the Perl Foundation.
'''#'''
from pkg_resources import get_distribution, DistributionNotFound
# List of available modules
__all__ = [
]
try:
dist = get_distribution('Parlance')
except DistributionNotFound:
__version__ = None
else: __version__ = 'v' + dist.version
src/a/r/archgenxml-2.5/src/archgenxml/utils.py archgenxml(Download)
#--------------------------------------------------------------- from pkg_resources import resource_string from pkg_resources import get_distribution import logging import os.path
def version(stripsvn=True):
dist = get_distribution('archgenxml')
ver = dist.version
if stripsvn:
ver = ver[:ver.find('.dev-')+4]
return "Version %s" % ver
src/p/a/Parlance-1.4.1/parlance/__init__.py Parlance(Download)
def __version__():
r'''Tries to get a version number automatically, using setuptools.
Defined first as a function to avoid leaking imported names.
'''#'''
try:
from pkg_resources import get_distribution
dist = get_distribution(__name__)
src/o/r/ordf-0.14/ordf/vocab/opmv.py ordf(Download)
from ordf.namespace import OPMV, ORDF, RDF, RDFS, TIME, FOAF from ordf.utils import get_identifier from ordf.vocab import foaf from pkg_resources import get_distribution from datetime import datetime from socket import gethostname from os import getpid
present.
"""
try:
dist = get_distribution(name)
except DistributionNotFound:
dist = None
cls.__distributions__[name] = dist
src/p/a/Parang-1.4.1/parang/__init__.py Parang(Download)
def __version__():
r'''Tries to get a version number automatically, using setuptools.
Defined first as a function to avoid leaking imported names.
'''#'''
try:
from pkg_resources import get_distribution
dist = get_distribution(__name__)
src/i/g/igwtools-0.3.dev-r412/igwtools/version.py igwtools(Download)
from pkg_resources import get_distribution
distribution = get_distribution('igwtools')
__version__ = distribution.version
1 | 2 | 3 | 4 | 5 Next