Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
OBITools
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
25
Issues
25
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
OBITools
OBITools
Commits
ee1063ed
Commit
ee1063ed
authored
Apr 16, 2015
by
Eric Coissac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
parent
6bd5407a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
185 changed files
with
5008 additions
and
0 deletions
+5008
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/__init__.py
+277
-0
__main__.py
distutils.ext/obidistutils/serenity/pip/__main__.py
+7
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/_vendor/__init__.py
+8
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/_vendor/_markerlib/__init__.py
+16
-0
markers.py
distutils.ext/obidistutils/serenity/pip/_vendor/_markerlib/markers.py
+119
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/_vendor/colorama/__init__.py
+7
-0
ansi.py
distutils.ext/obidistutils/serenity/pip/_vendor/colorama/ansi.py
+50
-0
ansitowin32.py
distutils.ext/obidistutils/serenity/pip/_vendor/colorama/ansitowin32.py
+190
-0
initialise.py
distutils.ext/obidistutils/serenity/pip/_vendor/colorama/initialise.py
+56
-0
win32.py
distutils.ext/obidistutils/serenity/pip/_vendor/colorama/win32.py
+137
-0
winterm.py
distutils.ext/obidistutils/serenity/pip/_vendor/colorama/winterm.py
+120
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/__init__.py
+23
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/_backport/__init__.py
+6
-0
misc.py
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/_backport/misc.py
+41
-0
shutil.py
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/_backport/shutil.py
+0
-0
sysconfig.cfg
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/_backport/sysconfig.cfg
+84
-0
sysconfig.py
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/_backport/sysconfig.py
+0
-0
tarfile.py
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/_backport/tarfile.py
+0
-0
compat.py
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/compat.py
+0
-0
database.py
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/database.py
+0
-0
index.py
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/index.py
+0
-0
locators.py
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/locators.py
+0
-0
manifest.py
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/manifest.py
+0
-0
markers.py
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/markers.py
+190
-0
metadata.py
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/metadata.py
+0
-0
resources.py
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/resources.py
+317
-0
scripts.py
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/scripts.py
+0
-0
t32.exe
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/t32.exe
+0
-0
t64.exe
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/t64.exe
+0
-0
util.py
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/util.py
+0
-0
version.py
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/version.py
+0
-0
w32.exe
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/w32.exe
+0
-0
w64.exe
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/w64.exe
+0
-0
wheel.py
distutils.ext/obidistutils/serenity/pip/_vendor/distlib/wheel.py
+0
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/__init__.py
+23
-0
constants.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/constants.py
+0
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/filters/__init__.py
+0
-0
_base.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/filters/_base.py
+12
-0
alphabeticalattributes.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/filters/alphabeticalattributes.py
+20
-0
inject_meta_charset.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/filters/inject_meta_charset.py
+65
-0
lint.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/filters/lint.py
+93
-0
optionaltags.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/filters/optionaltags.py
+0
-0
sanitizer.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/filters/sanitizer.py
+12
-0
whitespace.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/filters/whitespace.py
+38
-0
html5parser.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/html5parser.py
+0
-0
ihatexml.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/ihatexml.py
+0
-0
inputstream.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/inputstream.py
+0
-0
sanitizer.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/sanitizer.py
+0
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/serializer/__init__.py
+16
-0
htmlserializer.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/serializer/htmlserializer.py
+0
-0
tokenizer.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/tokenizer.py
+0
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/treeadapters/__init__.py
+0
-0
sax.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/treeadapters/sax.py
+44
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/treebuilders/__init__.py
+76
-0
_base.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/treebuilders/_base.py
+0
-0
dom.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/treebuilders/dom.py
+227
-0
etree.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/treebuilders/etree.py
+0
-0
etree_lxml.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/treebuilders/etree_lxml.py
+0
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/treewalkers/__init__.py
+57
-0
_base.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/treewalkers/_base.py
+200
-0
dom.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/treewalkers/dom.py
+46
-0
etree.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/treewalkers/etree.py
+138
-0
genshistream.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/treewalkers/genshistream.py
+69
-0
lxmletree.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/treewalkers/lxmletree.py
+208
-0
pulldom.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/treewalkers/pulldom.py
+63
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/trie/__init__.py
+12
-0
_base.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/trie/_base.py
+37
-0
datrie.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/trie/datrie.py
+44
-0
py.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/trie/py.py
+67
-0
utils.py
distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/utils.py
+82
-0
pkg_resources.py
distutils.ext/obidistutils/serenity/pip/_vendor/pkg_resources.py
+0
-0
re-vendor.py
distutils.ext/obidistutils/serenity/pip/_vendor/re-vendor.py
+34
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/__init__.py
+77
-0
adapters.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/adapters.py
+0
-0
api.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/api.py
+120
-0
auth.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/auth.py
+193
-0
cacert.pem
distutils.ext/obidistutils/serenity/pip/_vendor/requests/cacert.pem
+0
-0
certs.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/certs.py
+24
-0
compat.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/compat.py
+115
-0
cookies.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/cookies.py
+0
-0
exceptions.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/exceptions.py
+75
-0
hooks.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/hooks.py
+45
-0
models.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/models.py
+0
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/__init__.py
+3
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/__init__.py
+32
-0
big5freq.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/big5freq.py
+0
-0
big5prober.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/big5prober.py
+42
-0
chardetect.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/chardetect.py
+46
-0
chardistribution.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/chardistribution.py
+231
-0
charsetgroupprober.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/charsetgroupprober.py
+106
-0
charsetprober.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/charsetprober.py
+62
-0
codingstatemachine.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/codingstatemachine.py
+61
-0
compat.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/compat.py
+34
-0
constants.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/constants.py
+39
-0
cp949prober.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/cp949prober.py
+44
-0
escprober.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/escprober.py
+86
-0
escsm.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/escsm.py
+242
-0
eucjpprober.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/eucjpprober.py
+0
-0
euckrfreq.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/euckrfreq.py
+0
-0
euckrprober.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/euckrprober.py
+0
-0
euctwfreq.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/euctwfreq.py
+0
-0
euctwprober.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/euctwprober.py
+0
-0
gb2312freq.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/gb2312freq.py
+0
-0
gb2312prober.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/gb2312prober.py
+0
-0
hebrewprober.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/hebrewprober.py
+0
-0
jisfreq.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/jisfreq.py
+0
-0
jpcntx.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/jpcntx.py
+0
-0
langbulgarianmodel.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/langbulgarianmodel.py
+0
-0
langcyrillicmodel.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/langcyrillicmodel.py
+0
-0
langgreekmodel.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/langgreekmodel.py
+0
-0
langhebrewmodel.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/langhebrewmodel.py
+0
-0
langhungarianmodel.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/langhungarianmodel.py
+0
-0
langthaimodel.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/langthaimodel.py
+0
-0
latin1prober.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/latin1prober.py
+0
-0
mbcharsetprober.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/mbcharsetprober.py
+0
-0
mbcsgroupprober.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/mbcsgroupprober.py
+0
-0
mbcssm.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/mbcssm.py
+0
-0
sbcharsetprober.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/sbcharsetprober.py
+0
-0
sbcsgroupprober.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/sbcsgroupprober.py
+0
-0
sjisprober.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/sjisprober.py
+0
-0
universaldetector.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/universaldetector.py
+0
-0
utf8prober.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/chardet/utf8prober.py
+0
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/__init__.py
+0
-0
_collections.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/_collections.py
+0
-0
connection.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/connection.py
+0
-0
connectionpool.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/connectionpool.py
+0
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/contrib/__init__.py
+0
-0
ntlmpool.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.py
+0
-0
pyopenssl.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py
+0
-0
exceptions.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/exceptions.py
+0
-0
fields.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/fields.py
+0
-0
filepost.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/filepost.py
+0
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/packages/__init__.py
+0
-0
ordered_dict.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py
+0
-0
six.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/packages/six.py
+0
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py
+0
-0
_implementation.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py
+0
-0
poolmanager.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/poolmanager.py
+0
-0
request.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/request.py
+0
-0
response.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/response.py
+0
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/util/__init__.py
+0
-0
connection.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/util/connection.py
+0
-0
request.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/util/request.py
+0
-0
response.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/util/response.py
+0
-0
ssl_.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/util/ssl_.py
+0
-0
timeout.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/util/timeout.py
+0
-0
url.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/packages/urllib3/util/url.py
+0
-0
sessions.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/sessions.py
+0
-0
status_codes.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/status_codes.py
+0
-0
structures.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/structures.py
+0
-0
utils.py
distutils.ext/obidistutils/serenity/pip/_vendor/requests/utils.py
+0
-0
six.py
distutils.ext/obidistutils/serenity/pip/_vendor/six.py
+0
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/backwardcompat/__init__.py
+0
-0
basecommand.py
distutils.ext/obidistutils/serenity/pip/basecommand.py
+0
-0
baseparser.py
distutils.ext/obidistutils/serenity/pip/baseparser.py
+0
-0
cmdoptions.py
distutils.ext/obidistutils/serenity/pip/cmdoptions.py
+0
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/commands/__init__.py
+0
-0
bundle.py
distutils.ext/obidistutils/serenity/pip/commands/bundle.py
+0
-0
completion.py
distutils.ext/obidistutils/serenity/pip/commands/completion.py
+0
-0
freeze.py
distutils.ext/obidistutils/serenity/pip/commands/freeze.py
+0
-0
help.py
distutils.ext/obidistutils/serenity/pip/commands/help.py
+0
-0
install.py
distutils.ext/obidistutils/serenity/pip/commands/install.py
+0
-0
list.py
distutils.ext/obidistutils/serenity/pip/commands/list.py
+0
-0
search.py
distutils.ext/obidistutils/serenity/pip/commands/search.py
+0
-0
show.py
distutils.ext/obidistutils/serenity/pip/commands/show.py
+0
-0
uninstall.py
distutils.ext/obidistutils/serenity/pip/commands/uninstall.py
+0
-0
unzip.py
distutils.ext/obidistutils/serenity/pip/commands/unzip.py
+0
-0
wheel.py
distutils.ext/obidistutils/serenity/pip/commands/wheel.py
+0
-0
zip.py
distutils.ext/obidistutils/serenity/pip/commands/zip.py
+0
-0
download.py
distutils.ext/obidistutils/serenity/pip/download.py
+0
-0
exceptions.py
distutils.ext/obidistutils/serenity/pip/exceptions.py
+0
-0
index.py
distutils.ext/obidistutils/serenity/pip/index.py
+0
-0
locations.py
distutils.ext/obidistutils/serenity/pip/locations.py
+0
-0
log.py
distutils.ext/obidistutils/serenity/pip/log.py
+0
-0
pep425tags.py
distutils.ext/obidistutils/serenity/pip/pep425tags.py
+0
-0
req.py
distutils.ext/obidistutils/serenity/pip/req.py
+0
-0
runner.py
distutils.ext/obidistutils/serenity/pip/runner.py
+0
-0
status_codes.py
distutils.ext/obidistutils/serenity/pip/status_codes.py
+0
-0
util.py
distutils.ext/obidistutils/serenity/pip/util.py
+0
-0
__init__.py
distutils.ext/obidistutils/serenity/pip/vcs/__init__.py
+0
-0
bazaar.py
distutils.ext/obidistutils/serenity/pip/vcs/bazaar.py
+0
-0
git.py
distutils.ext/obidistutils/serenity/pip/vcs/git.py
+0
-0
mercurial.py
distutils.ext/obidistutils/serenity/pip/vcs/mercurial.py
+0
-0
subversion.py
distutils.ext/obidistutils/serenity/pip/vcs/subversion.py
+0
-0
wheel.py
distutils.ext/obidistutils/serenity/pip/wheel.py
+0
-0
No files found.
distutils.ext/obidistutils/serenity/pip/__init__.py
0 → 100644
View file @
ee1063ed
#!/usr/bin/env python
import
os
import
optparse
import
sys
import
re
from
pip.exceptions
import
InstallationError
,
CommandError
,
PipError
from
pip.log
import
logger
from
pip.util
import
get_installed_distributions
,
get_prog
from
pip.vcs
import
git
,
mercurial
,
subversion
,
bazaar
# noqa
from
pip.baseparser
import
ConfigOptionParser
,
UpdatingDefaultsHelpFormatter
from
pip.commands
import
commands
,
get_summaries
,
get_similar_commands
# This fixes a peculiarity when importing via __import__ - as we are
# initialising the pip module, "from pip import cmdoptions" is recursive
# and appears not to work properly in that situation.
import
pip.cmdoptions
cmdoptions
=
pip
.
cmdoptions
# The version as used in the setup.py and the docs conf.py
__version__
=
"1.5.6"
def
autocomplete
():
"""Command and option completion for the main option parser (and options)
and its subcommands (and options).
Enable by sourcing one of the completion shell scripts (bash or zsh).
"""
# Don't complete if user hasn't sourced bash_completion file.
if
'PIP_AUTO_COMPLETE'
not
in
os
.
environ
:
return
cwords
=
os
.
environ
[
'COMP_WORDS'
]
.
split
()[
1
:]
cword
=
int
(
os
.
environ
[
'COMP_CWORD'
])
try
:
current
=
cwords
[
cword
-
1
]
except
IndexError
:
current
=
''
subcommands
=
[
cmd
for
cmd
,
summary
in
get_summaries
()]
options
=
[]
# subcommand
try
:
subcommand_name
=
[
w
for
w
in
cwords
if
w
in
subcommands
][
0
]
except
IndexError
:
subcommand_name
=
None
parser
=
create_main_parser
()
# subcommand options
if
subcommand_name
:
# special case: 'help' subcommand has no options
if
subcommand_name
==
'help'
:
sys
.
exit
(
1
)
# special case: list locally installed dists for uninstall command
if
subcommand_name
==
'uninstall'
and
not
current
.
startswith
(
'-'
):
installed
=
[]
lc
=
current
.
lower
()
for
dist
in
get_installed_distributions
(
local_only
=
True
):
if
dist
.
key
.
startswith
(
lc
)
and
dist
.
key
not
in
cwords
[
1
:]:
installed
.
append
(
dist
.
key
)
# if there are no dists installed, fall back to option completion
if
installed
:
for
dist
in
installed
:
print
(
dist
)
sys
.
exit
(
1
)
subcommand
=
commands
[
subcommand_name
]()
options
+=
[(
opt
.
get_opt_string
(),
opt
.
nargs
)
for
opt
in
subcommand
.
parser
.
option_list_all
if
opt
.
help
!=
optparse
.
SUPPRESS_HELP
]
# filter out previously specified options from available options
prev_opts
=
[
x
.
split
(
'='
)[
0
]
for
x
in
cwords
[
1
:
cword
-
1
]]
options
=
[(
x
,
v
)
for
(
x
,
v
)
in
options
if
x
not
in
prev_opts
]
# filter options by current input
options
=
[(
k
,
v
)
for
k
,
v
in
options
if
k
.
startswith
(
current
)]
for
option
in
options
:
opt_label
=
option
[
0
]
# append '=' to options which require args
if
option
[
1
]:
opt_label
+=
'='
print
(
opt_label
)
else
:
# show main parser options only when necessary
if
current
.
startswith
(
'-'
)
or
current
.
startswith
(
'--'
):
opts
=
[
i
.
option_list
for
i
in
parser
.
option_groups
]
opts
.
append
(
parser
.
option_list
)
opts
=
(
o
for
it
in
opts
for
o
in
it
)
subcommands
+=
[
i
.
get_opt_string
()
for
i
in
opts
if
i
.
help
!=
optparse
.
SUPPRESS_HELP
]
print
(
' '
.
join
([
x
for
x
in
subcommands
if
x
.
startswith
(
current
)]))
sys
.
exit
(
1
)
def
create_main_parser
():
parser_kw
=
{
'usage'
:
'
\n
%
prog <command> [options]'
,
'add_help_option'
:
False
,
'formatter'
:
UpdatingDefaultsHelpFormatter
(),
'name'
:
'global'
,
'prog'
:
get_prog
(),
}
parser
=
ConfigOptionParser
(
**
parser_kw
)
parser
.
disable_interspersed_args
()
pip_pkg_dir
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
parser
.
version
=
'pip
%
s from
%
s (python
%
s)'
%
(
__version__
,
pip_pkg_dir
,
sys
.
version
[:
3
])
# add the general options
gen_opts
=
cmdoptions
.
make_option_group
(
cmdoptions
.
general_group
,
parser
)
parser
.
add_option_group
(
gen_opts
)
parser
.
main
=
True
# so the help formatter knows
# create command listing for description
command_summaries
=
get_summaries
()
description
=
[
''
]
+
[
'
%-27
s
%
s'
%
(
i
,
j
)
for
i
,
j
in
command_summaries
]
parser
.
description
=
'
\n
'
.
join
(
description
)
return
parser
def
parseopts
(
args
):
parser
=
create_main_parser
()
# Note: parser calls disable_interspersed_args(), so the result of this call
# is to split the initial args into the general options before the
# subcommand and everything else.
# For example:
# args: ['--timeout=5', 'install', '--user', 'INITools']
# general_options: ['--timeout==5']
# args_else: ['install', '--user', 'INITools']
general_options
,
args_else
=
parser
.
parse_args
(
args
)
# --version
if
general_options
.
version
:
sys
.
stdout
.
write
(
parser
.
version
)
sys
.
stdout
.
write
(
os
.
linesep
)
sys
.
exit
()
# pip || pip help -> print_help()
if
not
args_else
or
(
args_else
[
0
]
==
'help'
and
len
(
args_else
)
==
1
):
parser
.
print_help
()
sys
.
exit
()
# the subcommand name
cmd_name
=
args_else
[
0
]
.
lower
()
#all the args without the subcommand
cmd_args
=
args
[:]
cmd_args
.
remove
(
args_else
[
0
]
.
lower
())
if
cmd_name
not
in
commands
:
guess
=
get_similar_commands
(
cmd_name
)
msg
=
[
'unknown command "
%
s"'
%
cmd_name
]
if
guess
:
msg
.
append
(
'maybe you meant "
%
s"'
%
guess
)
raise
CommandError
(
' - '
.
join
(
msg
))
return
cmd_name
,
cmd_args
def
main
(
initial_args
=
None
):
if
initial_args
is
None
:
initial_args
=
sys
.
argv
[
1
:]
autocomplete
()
try
:
cmd_name
,
cmd_args
=
parseopts
(
initial_args
)
except
PipError
:
e
=
sys
.
exc_info
()[
1
]
sys
.
stderr
.
write
(
"ERROR:
%
s"
%
e
)
sys
.
stderr
.
write
(
os
.
linesep
)
sys
.
exit
(
1
)
command
=
commands
[
cmd_name
]()
return
command
.
main
(
cmd_args
)
def
bootstrap
():
"""
Bootstrapping function to be called from install-pip.py script.
"""
pkgs
=
[
'pip'
]
try
:
import
setuptools
except
ImportError
:
pkgs
.
append
(
'setuptools'
)
return
main
([
'install'
,
'--upgrade'
]
+
pkgs
+
sys
.
argv
[
1
:])
############################################################
## Writing freeze files
class
FrozenRequirement
(
object
):
def
__init__
(
self
,
name
,
req
,
editable
,
comments
=
()):
self
.
name
=
name
self
.
req
=
req
self
.
editable
=
editable
self
.
comments
=
comments
_rev_re
=
re
.
compile
(
r'-r(\d+)$'
)
_date_re
=
re
.
compile
(
r'-(20\d\d\d\d\d\d)$'
)
@classmethod
def
from_dist
(
cls
,
dist
,
dependency_links
,
find_tags
=
False
):
location
=
os
.
path
.
normcase
(
os
.
path
.
abspath
(
dist
.
location
))
comments
=
[]
from
pip.vcs
import
vcs
,
get_src_requirement
if
vcs
.
get_backend_name
(
location
):
editable
=
True
try
:
req
=
get_src_requirement
(
dist
,
location
,
find_tags
)
except
InstallationError
:
ex
=
sys
.
exc_info
()[
1
]
logger
.
warn
(
"Error when trying to get requirement for VCS system
%
s, falling back to uneditable format"
%
ex
)
req
=
None
if
req
is
None
:
logger
.
warn
(
'Could not determine repository location of
%
s'
%
location
)
comments
.
append
(
'## !! Could not determine repository location'
)
req
=
dist
.
as_requirement
()
editable
=
False
else
:
editable
=
False
req
=
dist
.
as_requirement
()
specs
=
req
.
specs
assert
len
(
specs
)
==
1
and
specs
[
0
][
0
]
==
'=='
version
=
specs
[
0
][
1
]
ver_match
=
cls
.
_rev_re
.
search
(
version
)
date_match
=
cls
.
_date_re
.
search
(
version
)
if
ver_match
or
date_match
:
svn_backend
=
vcs
.
get_backend
(
'svn'
)
if
svn_backend
:
svn_location
=
svn_backend
(
)
.
get_location
(
dist
,
dependency_links
)
if
not
svn_location
:
logger
.
warn
(
'Warning: cannot find svn location for
%
s'
%
req
)
comments
.
append
(
'## FIXME: could not find svn URL in dependency_links for this package:'
)
else
:
comments
.
append
(
'# Installing as editable to satisfy requirement
%
s:'
%
req
)
if
ver_match
:
rev
=
ver_match
.
group
(
1
)
else
:
rev
=
'{
%
s}'
%
date_match
.
group
(
1
)
editable
=
True
req
=
'
%
s@
%
s#egg=
%
s'
%
(
svn_location
,
rev
,
cls
.
egg_name
(
dist
))
return
cls
(
dist
.
project_name
,
req
,
editable
,
comments
)
@staticmethod
def
egg_name
(
dist
):
name
=
dist
.
egg_name
()
match
=
re
.
search
(
r'-py\d\.\d$'
,
name
)
if
match
:
name
=
name
[:
match
.
start
()]
return
name
def
__str__
(
self
):
req
=
self
.
req
if
self
.
editable
:
req
=
'-e
%
s'
%
req
return
'
\n
'
.
join
(
list
(
self
.
comments
)
+
[
str
(
req
)])
+
'
\n
'
if
__name__
==
'__main__'
:
exit
=
main
()
if
exit
:
sys
.
exit
(
exit
)
distutils.ext/obidistutils/serenity/pip/__main__.py
0 → 100644
View file @
ee1063ed
import
sys
from
.runner
import
run
if
__name__
==
'__main__'
:
exit
=
run
()
if
exit
:
sys
.
exit
(
exit
)
distutils.ext/obidistutils/serenity/pip/_vendor/__init__.py
0 → 100644
View file @
ee1063ed
"""
pip._vendor is for vendoring dependencies of pip to prevent needing pip to
depend on something external.
Files inside of pip._vendor should be considered immutable and should only be
updated to versions from upstream.
"""
from
__future__
import
absolute_import
distutils.ext/obidistutils/serenity/pip/_vendor/_markerlib/__init__.py
0 → 100644
View file @
ee1063ed
try
:
import
ast
from
pip._vendor._markerlib.markers
import
default_environment
,
compile
,
interpret
except
ImportError
:
if
'ast'
in
globals
():
raise
def
default_environment
():
return
{}
def
compile
(
marker
):
def
marker_fn
(
environment
=
None
,
override
=
None
):
# 'empty markers are True' heuristic won't install extra deps.
return
not
marker
.
strip
()
marker_fn
.
__doc__
=
marker
return
marker_fn
def
interpret
(
marker
,
environment
=
None
,
override
=
None
):
return
compile
(
marker
)()
distutils.ext/obidistutils/serenity/pip/_vendor/_markerlib/markers.py
0 → 100644
View file @
ee1063ed
# -*- coding: utf-8 -*-
"""Interpret PEP 345 environment markers.
EXPR [in|==|!=|not in] EXPR [or|and] ...
where EXPR belongs to any of those:
python_version = '
%
s.
%
s'
%
(sys.version_info[0], sys.version_info[1])
python_full_version = sys.version.split()[0]
os.name = os.name
sys.platform = sys.platform
platform.version = platform.version()
platform.machine = platform.machine()
platform.python_implementation = platform.python_implementation()
a free string, like '2.6', or 'win32'
"""
__all__
=
[
'default_environment'
,
'compile'
,
'interpret'
]
import
ast
import
os
import
platform
import
sys
import
weakref
_builtin_compile
=
compile
try
:
from
platform
import
python_implementation
except
ImportError
:
if
os
.
name
==
"java"
:
# Jython 2.5 has ast module, but not platform.python_implementation() function.
def
python_implementation
():
return
"Jython"
else
:
raise
# restricted set of variables
_VARS
=
{
'sys.platform'
:
sys
.
platform
,
'python_version'
:
'
%
s.
%
s'
%
sys
.
version_info
[:
2
],
# FIXME parsing sys.platform is not reliable, but there is no other
# way to get e.g. 2.7.2+, and the PEP is defined with sys.version
'python_full_version'
:
sys
.
version
.
split
(
' '
,
1
)[
0
],
'os.name'
:
os
.
name
,
'platform.version'
:
platform
.
version
(),
'platform.machine'
:
platform
.
machine
(),
'platform.python_implementation'
:
python_implementation
(),
'extra'
:
None
# wheel extension
}
for
var
in
list
(
_VARS
.
keys
()):
if
'.'
in
var
:
_VARS
[
var
.
replace
(
'.'
,
'_'
)]
=
_VARS
[
var
]
def
default_environment
():
"""Return copy of default PEP 385 globals dictionary."""
return
dict
(
_VARS
)
class
ASTWhitelist
(
ast
.
NodeTransformer
):
def
__init__
(
self
,
statement
):
self
.
statement
=
statement
# for error messages
ALLOWED
=
(
ast
.
Compare
,
ast
.
BoolOp
,
ast
.
Attribute
,
ast
.
Name
,
ast
.
Load
,
ast
.
Str
)
# Bool operations
ALLOWED
+=
(
ast
.
And
,
ast
.
Or
)
# Comparison operations
ALLOWED
+=
(
ast
.
Eq
,
ast
.
Gt
,
ast
.
GtE
,
ast
.
In
,
ast
.
Is
,
ast
.
IsNot
,
ast
.
Lt
,
ast
.
LtE
,
ast
.
NotEq
,
ast
.
NotIn
)
def
visit
(
self
,
node
):
"""Ensure statement only contains allowed nodes."""
if
not
isinstance
(
node
,
self
.
ALLOWED
):
raise
SyntaxError
(
'Not allowed in environment markers.
\n
%
s
\n
%
s'
%
(
self
.
statement
,
(
' '
*
node
.
col_offset
)
+
'^'
))
return
ast
.
NodeTransformer
.
visit
(
self
,
node
)
def
visit_Attribute
(
self
,
node
):
"""Flatten one level of attribute access."""
new_node
=
ast
.
Name
(
"
%
s.
%
s"
%
(
node
.
value
.
id
,
node
.
attr
),
node
.
ctx
)
return
ast
.
copy_location
(
new_node
,
node
)
def
parse_marker
(
marker
):
tree
=
ast
.
parse
(
marker
,
mode
=
'eval'
)
new_tree
=
ASTWhitelist
(
marker
)
.
generic_visit
(
tree
)
return
new_tree
def
compile_marker
(
parsed_marker
):
return
_builtin_compile
(
parsed_marker
,
'<environment marker>'
,
'eval'
,
dont_inherit
=
True
)
_cache
=
weakref
.
WeakValueDictionary
()
def
compile
(
marker
):
"""Return compiled marker as a function accepting an environment dict."""
try
:
return
_cache
[
marker
]
except
KeyError
:
pass
if
not
marker
.
strip
():
def
marker_fn
(
environment
=
None
,
override
=
None
):
""""""
return
True
else
:
compiled_marker
=
compile_marker
(
parse_marker
(
marker
))
def
marker_fn
(
environment
=
None
,
override
=
None
):
"""override updates environment"""
if
override
is
None
:
override
=
{}
if
environment
is
None
:
environment
=
default_environment
()
environment
.
update
(
override
)
return
eval
(
compiled_marker
,
environment
)
marker_fn
.
__doc__
=
marker
_cache
[
marker
]
=
marker_fn
return
_cache
[
marker
]
def
interpret
(
marker
,
environment
=
None
):
return
compile
(
marker
)(
environment
)
distutils.ext/obidistutils/serenity/pip/_vendor/colorama/__init__.py
0 → 100644
View file @
ee1063ed
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
from
.initialise
import
init
,
deinit
,
reinit
from
.ansi
import
Fore
,
Back
,
Style
from
.ansitowin32
import
AnsiToWin32
__version__
=
'0.3.1'
distutils.ext/obidistutils/serenity/pip/_vendor/colorama/ansi.py
0 → 100644
View file @
ee1063ed
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
'''
This module generates ANSI character codes to printing colors to terminals.
See: http://en.wikipedia.org/wiki/ANSI_escape_code
'''
CSI
=
'
\033
['
def
code_to_chars
(
code
):
return
CSI
+
str
(
code
)
+
'm'
class
AnsiCodes
(
object
):
def
__init__
(
self
,
codes
):
for
name
in
dir
(
codes
):
if
not
name
.
startswith
(
'_'
):
value
=
getattr
(
codes
,
name
)
setattr
(
self
,
name
,
code_to_chars
(
value
))
class
AnsiFore
:
BLACK
=
30
RED
=
31
GREEN
=
32
YELLOW
=
33
BLUE
=
34
MAGENTA
=
35
CYAN
=
36
WHITE
=
37
RESET
=
39
class
AnsiBack
:
BLACK
=
40
RED
=
41
GREEN
=
42
YELLOW
=
43
BLUE
=
44
MAGENTA
=
45
CYAN
=
46
WHITE
=
47
RESET
=
49
class
AnsiStyle
:
BRIGHT
=
1
DIM
=
2
NORMAL
=
22
RESET_ALL
=
0
Fore
=
AnsiCodes
(
AnsiFore
)
Back
=
AnsiCodes
(
AnsiBack
)
Style
=
AnsiCodes
(
AnsiStyle
)
distutils.ext/obidistutils/serenity/pip/_vendor/colorama/ansitowin32.py
0 → 100644
View file @
ee1063ed
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import
re
import
sys
from
.ansi
import
AnsiFore
,
AnsiBack
,
AnsiStyle
,
Style
from
.winterm
import
WinTerm
,
WinColor
,
WinStyle
from
.win32
import
windll
winterm
=
None
if
windll
is
not
None
:
winterm
=
WinTerm
()
def
is_a_tty
(
stream
):
return
hasattr
(
stream
,
'isatty'
)
and
stream
.
isatty
()
class
StreamWrapper
(
object
):
'''
Wraps a stream (such as stdout), acting as a transparent proxy for all
attribute access apart from method 'write()', which is delegated to our
Converter instance.
'''
def
__init__
(
self
,
wrapped
,
converter
):
# double-underscore everything to prevent clashes with names of
# attributes on the wrapped stream object.
self
.
__wrapped
=
wrapped
self
.
__convertor
=
converter
def
__getattr__
(
self
,
name
):
return
getattr
(
self
.
__wrapped
,
name
)
def
write
(
self
,
text
):
self
.
__convertor
.
write
(
text
)
class
AnsiToWin32
(
object
):
'''
Implements a 'write()' method which, on Windows, will strip ANSI character
sequences from the text, and if outputting to a tty, will convert them into
win32 function calls.
'''
ANSI_RE
=
re
.
compile
(
'
\033
\
[((?:
\
d|;)*)([a-zA-Z])'
)
def
__init__
(
self
,
wrapped
,
convert
=
None
,
strip
=
None
,
autoreset
=
False
):
# The wrapped stream (normally sys.stdout or sys.stderr)
self
.
wrapped
=
wrapped
# should we reset colors to defaults after every .write()
self
.
autoreset
=
autoreset
# create the proxy wrapping our output stream
self
.
stream
=
StreamWrapper
(
wrapped
,
self
)
on_windows
=
sys
.
platform
.
startswith
(
'win'
)
# should we strip ANSI sequences from our output?
if
strip
is
None
:
strip
=
on_windows
self
.
strip
=
strip
# should we should convert ANSI sequences into win32 calls?
if
convert
is
None
:
convert
=
on_windows
and
is_a_tty
(
wrapped
)
self
.
convert
=
convert
# dict of ansi codes to win32 functions and parameters
self
.
win32_calls
=
self
.
get_win32_calls
()
# are we wrapping stderr?
self
.
on_stderr
=
self
.
wrapped
is
sys
.
stderr
def
should_wrap
(
self
):
'''
True if this class is actually needed. If false, then the output
stream will not be affected, nor will win32 calls be issued, so
wrapping stdout is not actually required. This will generally be
False on non-Windows platforms, unless optional functionality like
autoreset has been requested using kwargs to init()
'''
return
self
.
convert
or
self
.
strip
or
self
.
autoreset
def
get_win32_calls
(
self
):
if
self
.
convert
and
winterm
:
return
{
AnsiStyle
.
RESET_ALL
:
(
winterm
.
reset_all
,
),
AnsiStyle
.
BRIGHT
:
(
winterm
.
style
,
WinStyle
.
BRIGHT
),
AnsiStyle
.
DIM
:
(
winterm
.
style
,
WinStyle
.
NORMAL
),
AnsiStyle
.
NORMAL
:
(
winterm
.
style
,
WinStyle
.
NORMAL
),
AnsiFore
.
BLACK
:
(
winterm
.
fore
,
WinColor
.
BLACK
),
AnsiFore
.
RED
:
(
winterm
.
fore
,
WinColor
.
RED
),
AnsiFore
.
GREEN
:
(
winterm
.
fore
,
WinColor
.
GREEN
),
AnsiFore
.
YELLOW
:
(
winterm
.
fore
,
WinColor
.
YELLOW
),
AnsiFore
.
BLUE
:
(
winterm
.
fore
,
WinColor
.
BLUE
),
AnsiFore
.
MAGENTA
:
(
winterm
.
fore
,
WinColor
.
MAGENTA
),
AnsiFore
.
CYAN
:
(
winterm
.
fore
,
WinColor
.
CYAN
),
AnsiFore
.
WHITE
:
(
winterm
.
fore
,
WinColor
.
GREY
),
AnsiFore
.
RESET
:
(
winterm
.
fore
,
),
AnsiBack
.
BLACK
:
(
winterm
.
back
,
WinColor
.
BLACK
),
AnsiBack
.
RED
:
(
winterm
.
back
,
WinColor
.
RED
),
AnsiBack
.
GREEN
:
(
winterm
.
back
,
WinColor
.
GREEN
),
AnsiBack
.
YELLOW
:
(
winterm
.
back
,
WinColor
.
YELLOW
),
AnsiBack
.
BLUE
:
(
winterm
.
back
,
WinColor
.
BLUE
),
AnsiBack
.
MAGENTA
:
(
winterm
.
back
,
WinColor
.
MAGENTA
),