/
usr
/
lib
/
python2.7
/
site-packages
/
setuptools
/
/usr/lib/python2.7/site-packages/setuptools
mkdir
upload
Name
Size
Mode
Actions
command/
-
0755
rm
extern/
-
0755
rm
_vendor/
-
0755
rm
archive_util.py
6592
0644
edit
dl
rm
archive_util.pyc
6142
0644
edit
dl
rm
archive_util.pyo
6142
0644
edit
dl
rm
build_meta.py
5671
0644
edit
dl
rm
build_meta.pyc
6639
0644
edit
dl
rm
build_meta.pyo
6522
0644
edit
dl
rm
config.py
16381
0644
edit
dl
rm
config.pyc
16888
0644
edit
dl
rm
config.pyo
16888
0644
edit
dl
rm
depends.py
5837
0644
edit
dl
rm
depends.pyc
6483
0644
edit
dl
rm
depends.pyo
6483
0644
edit
dl
rm
dep_util.py
935
0644
edit
dl
rm
dep_util.pyc
965
0644
edit
dl
rm
dep_util.pyo
965
0644
edit
dl
rm
dist.py
42514
0644
edit
dl
rm
dist.pyc
41502
0644
edit
dl
rm
dist.pyo
41444
0644
edit
dl
rm
extension.py
1729
0644
edit
dl
rm
extension.pyc
2418
0644
edit
dl
rm
extension.pyo
2418
0644
edit
dl
rm
glibc.py
3146
0644
edit
dl
rm
glibc.pyc
1960
0644
edit
dl
rm
glibc.pyo
1960
0644
edit
dl
rm
glob.py
5207
0644
edit
dl
rm
glob.pyc
4818
0644
edit
dl
rm
glob.pyo
4756
0644
edit
dl
rm
launch.py
787
0644
edit
dl
rm
launch.pyc
1000
0644
edit
dl
rm
launch.pyo
1000
0644
edit
dl
rm
lib2to3_ex.py
2013
0644
edit
dl
rm
lib2to3_ex.pyc
3004
0644
edit
dl
rm
lib2to3_ex.pyo
3004
0644
edit
dl
rm
monkey.py
5789
0644
edit
dl
rm
monkey.pyc
6343
0644
edit
dl
rm
monkey.pyo
6343
0644
edit
dl
rm
msvc.py
40877
0644
edit
dl
rm
msvc.pyc
40352
0644
edit
dl
rm
msvc.pyo
40352
0644
edit
dl
rm
namespaces.py
3199
0644
edit
dl
rm
namespaces.pyc
5033
0644
edit
dl
rm
namespaces.pyo
5033
0644
edit
dl
rm
package_index.py
40153
0644
edit
dl
rm
package_index.pyc
39743
0644
edit
dl
rm
package_index.pyo
39743
0644
edit
dl
rm
pep425tags.py
10882
0644
edit
dl
rm
pep425tags.pyc
9334
0644
edit
dl
rm
pep425tags.pyo
9334
0644
edit
dl
rm
py27compat.py
536
0644
edit
dl
rm
py27compat.pyc
1045
0644
edit
dl
rm
py27compat.pyo
1045
0644
edit
dl
rm
py31compat.py
1192
0644
edit
dl
rm
py31compat.pyc
1898
0644
edit
dl
rm
py31compat.pyo
1898
0644
edit
dl
rm
py33compat.py
1182
0644
edit
dl
rm
py33compat.pyc
1720
0644
edit
dl
rm
py33compat.pyo
1720
0644
edit
dl
rm
py36compat.py
2891
0644
edit
dl
rm
py36compat.pyc
2862
0644
edit
dl
rm
py36compat.pyo
2862
0644
edit
dl
rm
sandbox.py
14276
0644
edit
dl
rm
sandbox.pyc
18900
0644
edit
dl
rm
sandbox.pyo
18900
0644
edit
dl
rm
script (dev).tmpl
201
0644
edit
dl
rm
script.tmpl
138
0644
edit
dl
rm
site-patch.py
2307
0644
edit
dl
rm
site-patch.pyc
1739
0644
edit
dl
rm
site-patch.pyo
1739
0644
edit
dl
rm
ssl_support.py
8492
0644
edit
dl
rm
ssl_support.pyc
8516
0644
edit
dl
rm
ssl_support.pyo
8516
0644
edit
dl
rm
unicode_utils.py
996
0644
edit
dl
rm
unicode_utils.pyc
1472
0644
edit
dl
rm
unicode_utils.pyo
1472
0644
edit
dl
rm
version.py
144
0644
edit
dl
rm
version.pyc
322
0644
edit
dl
rm
version.pyo
322
0644
edit
dl
rm
wheel.py
7230
0644
edit
dl
rm
wheel.pyc
7343
0644
edit
dl
rm
wheel.pyo
7309
0644
edit
dl
rm
windows_support.py
714
0644
edit
dl
rm
windows_support.pyc
1274
0644
edit
dl
rm
windows_support.pyo
1274
0644
edit
dl
rm
__init__.py
5700
0644
edit
dl
rm
__init__.pyc
7625
0644
edit
dl
rm
__init__.pyo
7625
0644
edit
dl
rm
Edit:
/usr/lib/python2.7/site-packages/setuptools/__init__.py
(5700B)
"""Extensions to the 'distutils' for large or complex distributions""" import os import functools import distutils.core import distutils.filelist from distutils.util import convert_path from fnmatch import fnmatchcase from setuptools.extern.six.moves import filter, map import setuptools.version from setuptools.extension import Extension from setuptools.dist import Distribution, Feature from setuptools.depends import Require from . import monkey __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages', ] __version__ = setuptools.version.__version__ bootstrap_install_from = None # If we run 2to3 on .py files, should we also convert docstrings? # Default: yes; assume that we can detect doctests reliably run_2to3_on_doctests = True # Standard package names for fixer packages lib2to3_fixer_packages = ['lib2to3.fixes'] class PackageFinder(object): """ Generate a list of all Python packages found within a directory """ @classmethod def find(cls, where='.', exclude=(), include=('*',)): """Return a list all Python packages found within directory 'where' 'where' is the root directory which will be searched for packages. It should be supplied as a "cross-platform" (i.e. URL-style) path; it will be converted to the appropriate local path syntax. 'exclude' is a sequence of package names to exclude; '*' can be used as a wildcard in the names, such that 'foo.*' will exclude all subpackages of 'foo' (but not 'foo' itself). 'include' is a sequence of package names to include. If it's specified, only the named packages will be included. If it's not specified, all found packages will be included. 'include' can contain shell style wildcard patterns just like 'exclude'. """ return list(cls._find_packages_iter( convert_path(where), cls._build_filter('ez_setup', '*__pycache__', *exclude), cls._build_filter(*include))) @classmethod def _find_packages_iter(cls, where, exclude, include): """ All the packages found in 'where' that pass the 'include' filter, but not the 'exclude' filter. """ for root, dirs, files in os.walk(where, followlinks=True): # Copy dirs to iterate over it, then empty dirs. all_dirs = dirs[:] dirs[:] = [] for dir in all_dirs: full_path = os.path.join(root, dir) rel_path = os.path.relpath(full_path, where) package = rel_path.replace(os.path.sep, '.') # Skip directory trees that are not valid packages if ('.' in dir or not cls._looks_like_package(full_path)): continue # Should this package be included? if include(package) and not exclude(package): yield package # Keep searching subdirectories, as there may be more packages # down there, even if the parent was excluded. dirs.append(dir) @staticmethod def _looks_like_package(path): """Does a directory look like a package?""" return os.path.isfile(os.path.join(path, '__init__.py')) @staticmethod def _build_filter(*patterns): """ Given a list of patterns, return a callable that will be true only if the input matches at least one of the patterns. """ return lambda name: any(fnmatchcase(name, pat=pat) for pat in patterns) class PEP420PackageFinder(PackageFinder): @staticmethod def _looks_like_package(path): return True find_packages = PackageFinder.find def _install_setup_requires(attrs): # Note: do not use `setuptools.Distribution` directly, as # our PEP 517 backend patch `distutils.core.Distribution`. dist = distutils.core.Distribution(dict( (k, v) for k, v in attrs.items() if k in ('dependency_links', 'setup_requires') )) # Honor setup.cfg's options. dist.parse_config_files(ignore_option_errors=True) if dist.setup_requires: dist.fetch_build_eggs(dist.setup_requires) def setup(**attrs): # Make sure we have any requirements needed to interpret 'attrs'. _install_setup_requires(attrs) return distutils.core.setup(**attrs) setup.__doc__ = distutils.core.setup.__doc__ _Command = monkey.get_unpatched(distutils.core.Command) class Command(_Command): __doc__ = _Command.__doc__ command_consumes_arguments = False def __init__(self, dist, **kw): """ Construct the command for dist, updating vars(self) with any keyword parameters. """ _Command.__init__(self, dist) vars(self).update(kw) def reinitialize_command(self, command, reinit_subcommands=0, **kw): cmd = _Command.reinitialize_command(self, command, reinit_subcommands) vars(cmd).update(kw) return cmd def _find_all_simple(path): """ Find all files under 'path' """ results = ( os.path.join(base, file) for base, dirs, files in os.walk(path, followlinks=True) for file in files ) return filter(os.path.isfile, results) def findall(dir=os.curdir): """ Find all files under 'dir' and return the list of full filenames. Unless dir is '.', return full filenames with dir prepended. """ files = _find_all_simple(dir) if dir == os.curdir: make_rel = functools.partial(os.path.relpath, start=dir) files = map(make_rel, files) return list(files) monkey.patch_all()
Save
cmd:
run