Commit 72e66837 authored by Sajjad Mirza's avatar Sajjad Mirza Committed by Commit Bot

Add library 'six' to //third_party.

Modify scripts that indirectly use it to include the new location into
sys.path so that they are not implicitly using a copy of six that is
installed in the environment.

Bug: 1004616,1047519
Change-Id: I7d5054802a57744933f038ea0b58af8f7f4314a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2043078Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarTibor Goldschwendt <tiborg@chromium.org>
Reviewed-by: default avatarTakuto Ikuta <tikuta@chromium.org>
Reviewed-by: default avatarChris Palmer <palmer@chromium.org>
Commit-Queue: Sajjad Mirza <sajjadm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#740455}
parent a639c719
......@@ -33,6 +33,12 @@ from util import diff_utils
from util import manifest_utils
from util import resource_utils
# `Resources_pb2` module imports `descriptor`, which imports `six`.
sys.path.insert(
1,
os.path.join(
os.path.dirname(__file__), os.pardir, os.pardir, os.pardir,
'third_party', 'six', 'src'))
# Import jinja2 from third_party/jinja2
sys.path.insert(1, os.path.join(build_utils.DIR_SOURCE_ROOT, 'third_party'))
......
......@@ -31,7 +31,14 @@ sys.path.append(os.path.join(os.path.dirname(__file__),
'build', 'android', 'gyp'))
from util import build_utils
sys.path.append(
# six is a dependency of javalang
sys.path.insert(
1,
os.path.join(
os.path.dirname(__file__), os.pardir, os.pardir, os.pardir,
'third_party', 'six', 'src'))
sys.path.insert(
1,
os.path.join(
os.path.dirname(__file__), os.pardir, os.pardir, os.pardir,
'third_party', 'javalang', 'src'))
......
Copyright (c) 2010-2020 Benjamin Peterson
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
sajjadm@chromium.org
tiborg@chromium.org
Name: six
Short Name: six
URL: https://github.com/benjaminp/six
Version: 1.14.0
License: MIT
License File: NOT_SHIPPED
Security Critical: No
Description:
Six is a Python 2 and 3 compatibility library. It provides utility functions for smoothing over the differences between the Python versions with the goal of writing Python code that is compatible on both Python versions.
Local Modifications:
None
Retrieved as 1.14.0.tar.gz with sha512 hash 1604c083841693beac32a67bdab0c01f8bb77f648f5da408c68c7fa61137843371ae75c7c0a0a19172ad77e737b35a2a762e22a3908b90958a65945b476bfb65
*.pyc
build
dist
MANIFEST
documentation/_build
.tox
six.egg-info
os: linux
dist: xenial
language: python
python:
- 2.7
- 3.4
- 3.5
- 3.6
- 3.7
- &mainstream_python 3.8
- nightly
- pypy
- pypy3
install:
- pip install --upgrade --force-reinstall "setuptools; python_version != '3.3'" "setuptools < 40; python_version == '3.3'"
- pip uninstall --yes six || true
- pip install --upgrade --force-reinstall --ignore-installed -e .
- pip install "pytest==4.6.9; python_version != '3.3'" "pytest==2.9.2; python_version == '3.3'" typing
- &py_pkg_list pip list --format=columns || pip list
script:
- py.test
- echo Checking whether installation flow is not broken...
- pip uninstall --yes six || true
- pip install --ignore-installed .
- *py_pkg_list
jobs:
fast_finish: true
include:
- python: 3.3
dist: trusty
- stage: upload new version of python package to PYPI (only for tagged commits)
python: *mainstream_python
install: skip
script: skip
deploy:
provider: pypi
on:
tags: true
all_branches: true
python: *mainstream_python
user: gutworth
distributions: "sdist bdist_wheel"
password:
secure: NPhfQT7XnZb0r0hKGWBwpHPXYpe3diD8aQXaUUq7+Y/iLAk5PhoFCRz+lPqnu7HiQcC2mcdzz3fvvRmj9IR/4EJj/+hkAfUeK4utwhXojSovEyk7VM/sUoT8hK4x++42sqbTvu2UcoSabTMEdFXC/Rhg/HHmOYzRMONJF2l8NGLsOu+t+BM6ruMZbmteGcquedi6JcOOAx7KR8dZ5vY387HwMyZg8yis4Qp7fSSivLzjV5i60ZDE4GzbD0XXywc+dxvl6KnLvJN4ApwnDRgTDsPU7OuEG09od0kVELhxsvwvKh47iBor0vVWCLb+sOgQj+EgMVZNqbghvTdQZMR/D4CADKBHHYZcCS7PuesbXfP4/USzDHPQB1i9bPMo7heRJpOfAt09SC49MJ6F1oEXkDWizN64Q9S3C0ZZvl4oDRcBxOYv17QyCM88ezhokadF2anVz+qEG7QINDrpq0qDGYnvb+1m7iZkGELnbmYPN3vu4Kow2LQkIE2tomv6Hvd/NTCEXHoPBybNE2LhmfrN6tdpkT0DDAg2PCnexcl+usZArHYuA/chX1IuhmxrQCeVVhSiVdxldR3XRjmavYcNhLsYP9upxEGEtQw7zR8vIw+WDlZmR+UN44sjTQCescAznZyxlqBtB6heW5CkrtiMjcmwKplCccsPHwWrkKOSb6w=
cache:
pip: true
after_failure:
- echo "Here's a list of installed Python packages:"
- *py_pkg_list
Changelog for six
=================
This file lists the changes in each six version.
1.14.0
------
- Issue #288, pull request #289: Add `six.assertNotRegex`.
- Issue #317: `six.moves._dummy_thread` now points to the `_thread` module on
Python 3.9+. Python 3.7 and later requires threading and deprecated the
`_dummy_thread` module.
- Issue #308, pull request #314: Remove support for Python 2.6 and Python 3.2.
- Issue #250, issue #165, pull request #251: `six.wraps` now ignores missing
attributes. This follows the Python 3.2+ standard library behavior.
1.13.0
------
- Issue #298, pull request #299: Add `six.moves.dbm_ndbm`.
- Issue #155: Add `six.moves.collections_abc`, which aliases the `collections`
module on Python 2-3.2 and the `collections.abc` on Python 3.3 and greater.
- Pull request #304: Re-add distutils fallback in `setup.py`.
- Pull request #305: On Python 3.7, `with_metaclass` supports classes using PEP
560 features.
1.12.0
------
- Issue #259, pull request #260: `six.add_metaclass` now preserves
`__qualname__` from the original class.
- Pull request #204: Add `six.ensure_binary`, `six.ensure_text`, and
`six.ensure_str`.
1.11.0
------
- Pull request #178: `with_metaclass` now properly proxies `__prepare__` to the
underlying metaclass.
- Pull request #191: Allow `with_metaclass` to work with metaclasses implemented
in C.
- Pull request #203: Add parse_http_list and parse_keqv_list to moved
urllib.request.
- Pull request #172 and issue #171: Add unquote_to_bytes to moved urllib.parse.
- Pull request #167: Add `six.moves.getoutput`.
- Pull request #80: Add `six.moves.urllib_parse.splitvalue`.
- Pull request #75: Add `six.moves.email_mime_image`.
- Pull request #72: Avoid creating reference cycles through tracebacks in
`reraise`.
1.10.0
------
- Issue #122: Improve the performance of `six.int2byte` on Python 3.
- Pull request #55 and issue #99: Don't add the `winreg` module to `six.moves`
on non-Windows platforms.
- Pull request #60 and issue #108: Add `six.moves.getcwd` and
`six.moves.getcwdu`.
- Pull request #64: Add `create_unbound_method` to create unbound methods.
1.9.0
-----
- Issue #106: Support the `flush` parameter to `six.print_`.
- Pull request #48 and issue #15: Add the `python_2_unicode_compatible`
decorator.
- Pull request #57 and issue #50: Add several compatibility methods for unittest
assertions that were renamed between Python 2 and 3.
- Issue #105 and pull request #58: Ensure `six.wraps` respects the *updated* and
*assigned* arguments.
- Issue #102: Add `raise_from` to abstract out Python 3's raise from syntax.
- Issue #97: Optimize `six.iterbytes` on Python 2.
- Issue #98: Fix `six.moves` race condition in multi-threaded code.
- Pull request #51: Add `six.view(keys|values|itmes)`, which provide dictionary
views on Python 2.7+.
- Issue #112: `six.moves.reload_module` now uses the importlib module on
Python 3.4+.
1.8.0
-----
- Issue #90: Add `six.moves.shlex_quote`.
- Issue #59: Add `six.moves.intern`.
- Add `six.urllib.parse.uses_(fragment|netloc|params|query|relative)`.
- Issue #88: Fix add_metaclass when the class has `__slots__` containing
`__weakref__` or `__dict__`.
- Issue #89: Make six use absolute imports.
- Issue #85: Always accept *updated* and *assigned* arguments for `wraps()`.
- Issue #86: In `reraise()`, instantiate the exception if the second argument is
`None`.
- Pull request #45: Add `six.moves.email_mime_nonmultipart`.
- Issue #81: Add `six.urllib.request.splittag` mapping.
- Issue #80: Add `six.urllib.request.splituser` mapping.
1.7.3
-----
- Issue #77: Fix import six on Python 3.4 with a custom loader.
- Issue #74: `six.moves.xmlrpc_server` should map to `SimpleXMLRPCServer` on Python
2 as documented not `xmlrpclib`.
1.7.2
-----
- Issue #72: Fix installing on Python 2.
1.7.1
-----
- Issue #71: Make the six.moves meta path importer handle reloading of the six
module gracefully.
1.7.0
-----
- Pull request #30: Implement six.moves with a PEP 302 meta path hook.
- Pull request #32: Add six.wraps, which is like functools.wraps but always sets
the __wrapped__ attribute.
- Pull request #35: Improve add_metaclass, so that it doesn't end up inserting
another class into the hierarchy.
- Pull request #34: Add import mappings for dummy_thread.
- Pull request #33: Add import mappings for UserDict and UserList.
- Pull request #31: Select the implementations of dictionary iterator routines
at import time for a 20% speed boost.
1.6.1
-----
- Raise an AttributeError for six.moves.X when X is a module not available in
the current interpreter.
1.6.0
-----
- Raise an AttributeError for every attribute of unimportable modules.
- Issue #56: Make the fake modules six.moves puts into sys.modules appear not to
have a __path__ unless they are loaded.
- Pull request #28: Add support for SplitResult.
- Issue #55: Add move mapping for xmlrpc.server.
- Pull request #29: Add move for urllib.parse.splitquery.
1.5.2
-----
- Issue #53: Make the fake modules six.moves puts into sys.modules appear not to
have a __name__ unless they are loaded.
1.5.1
-----
- Issue #51: Hack around the Django autoreloader after recent six.moves changes.
1.5.0
-----
- Removed support for Python 2.4. This is because py.test no longer supports
2.4.
- Fix various import problems including issues #19 and #41. six.moves modules
are now lazy wrappers over the underlying modules instead of the actual
modules themselves.
- Issue #49: Add six.moves mapping for tkinter.ttk.
- Pull request #24: Add __dir__ special method to six.moves modules.
- Issue #47: Fix add_metaclass on classes with a string for the __slots__
variable.
- Issue #44: Fix interpretation of backslashes on Python 2 in the u() function.
- Pull request #21: Add import mapping for urllib's proxy_bypass function.
- Issue #43: Add import mapping for the Python 2 xmlrpclib module.
- Issue #39: Add import mapping for the Python 2 thread module.
- Issue #40: Add import mapping for the Python 2 gdbm module.
- Issue #35: On Python versions less than 2.7, print_ now encodes unicode
strings when outputing to standard streams. (Python 2.7 handles this
automatically.)
1.4.1
-----
- Issue #32: urllib module wrappings don't work when six is not a toplevel file.
1.4.0
-----
- Issue #31: Add six.moves mapping for UserString.
- Pull request #12: Add six.add_metaclass, a decorator for adding a metaclass to
a class.
- Add six.moves.zip_longest and six.moves.filterfalse, which correspond
respectively to itertools.izip_longest and itertools.ifilterfalse on Python 2
and itertools.zip_longest and itertools.filterfalse on Python 3.
- Issue #25: Add the unichr function, which returns a string for a Unicode
codepoint.
- Issue #26: Add byte2int function, which complements int2byte.
- Add a PY2 constant with obvious semantics.
- Add helpers for indexing and iterating over bytes: iterbytes and indexbytes.
- Add create_bound_method() wrapper.
- Issue #23: Allow multiple base classes to be passed to with_metaclass.
- Issue #24: Add six.moves.range alias. This exactly the same as the current
xrange alias.
- Pull request #5: Create six.moves.urllib, which contains abstractions for a
bunch of things which are in urllib in Python 3 and spread out across urllib,
urllib2, and urlparse in Python 2.
1.3.0
-----
- Issue #21: Add methods to access the closure and globals of a function.
- In six.iter(items/keys/values/lists), passed keyword arguments through to the
underlying method.
- Add six.iterlists().
- Issue #20: Fix tests if tkinter is not available.
- Issue #17: Define callable to be builtin callable when it is available again
in Python 3.2+.
- Issue #16: Rename Python 2 exec_'s arguments, so casually calling exec_ with
keyword arguments will raise.
- Issue #14: Put the six.moves package in sys.modules based on the name six is
imported under.
- Fix Jython detection.
- Pull request #4: Add email_mime_multipart, email_mime_text, and
email_mime_base to six.moves.
1.2.0
-----
- Issue #13: Make iterkeys/itervalues/iteritems return iterators on Python 3
instead of iterables.
- Issue #11: Fix maxsize support on Jython.
- Add six.next() as an alias for six.advance_iterator().
- Use the builtin next() function for advance_iterator() where is available
(2.6+), not just Python 3.
- Add the Iterator class for writing portable iterators.
1.1.0
-----
- Add the int2byte function.
- Add compatibility mappings for iterators over the keys, values, and items of a
dictionary.
- Fix six.MAXSIZE on platforms where sizeof(long) != sizeof(Py_ssize_t).
- Issue #3: Add six.moves mappings for filter, map, and zip.
1.0.0
-----
- Issue #2: u() on Python 2.x now resolves unicode escapes.
- Expose an API for adding mappings to six.moves.
1.0 beta 1
----------
- Reworked six into one .py file. This breaks imports. Please tell me if you
are interested in an import compatibility layer.
The primary author and maintainer of six is Benjamin Peterson. He would like to
acknowledge the following people who submitted bug reports, pull requests, and
otherwise worked to improve six:
Marc Abramowitz
immerrr again
Alexander Artemenko
Aymeric Augustin
Lee Ball
Ben Bariteau
Ned Batchelder
Wouter Bolsterlee
Brett Cannon
Jason R. Coombs
Julien Danjou
Ben Darnell
Ben Davis
Jon Dufresne
Tim Graham
Thomas Grainger
Max Grender-Jones
Joshua Harlow
Toshiki Kataoka
Hugo van Kemenade
Anselm Kruis
Ivan Levkivskyi
Alexander Lukanin
James Mills
Jordan Moldow
Berker Peksag
Sridhar Ratnakumar
Erik Rose
Mirko Rossini
Peter Ruibal
Miroslav Shubernetskiy
Eli Schwartz
Anthony Sottile
Jonathan Vanasco
Lucas Wiman
Jingxin Zhu
If you think you belong on this list, please let me know! --Benjamin
Copyright (c) 2010-2020 Benjamin Peterson
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
include CHANGES
include LICENSE
include test_six.py
recursive-include documentation *
prune documentation/_build
.. image:: https://img.shields.io/pypi/v/six.svg
:target: https://pypi.org/project/six/
:alt: six on PyPI
.. image:: https://travis-ci.org/benjaminp/six.svg?branch=master
:target: https://travis-ci.org/benjaminp/six
:alt: six on TravisCI
.. image:: https://readthedocs.org/projects/six/badge/?version=latest
:target: https://six.readthedocs.io/
:alt: six's documentation on Read the Docs
.. image:: https://img.shields.io/badge/license-MIT-green.svg
:target: https://github.com/benjaminp/six/blob/master/LICENSE
:alt: MIT License badge
Six is a Python 2 and 3 compatibility library. It provides utility functions
for smoothing over the differences between the Python versions with the goal of
writing Python code that is compatible on both Python versions. See the
documentation for more information on what is provided.
Six supports Python 2.7 and 3.3+. It is contained in only one Python
file, so it can be easily copied into your project. (The copyright and license
notice must be retained.)
Online documentation is at https://six.readthedocs.io/.
Bugs can be reported to https://github.com/benjaminp/six. The code can also
be found there.
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
-rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/six.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/six.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/six"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/six"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
make -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
# -*- coding: utf-8 -*-
#
# six documentation build configuration file
import os
import sys
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.append(os.path.abspath('.'))
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = "1.0"
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ["sphinx.ext.intersphinx"]
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
# The suffix of source filenames.
source_suffix = ".rst"
# The encoding of source files.
#source_encoding = "utf-8-sig"
# The master toctree document.
master_doc = "index"
# General information about the project.
project = u"six"
copyright = u"2010-2020, Benjamin Peterson"
sys.path.append(os.path.abspath(os.path.join(".", "..")))
from six import __version__ as six_version
sys.path.pop()
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = six_version[:-2]
# The full version, including alpha/beta/rc tags.
release = six_version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ["_build"]
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = "default"
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = ''
# Output file base name for HTML help builder.
htmlhelp_basename = 'sixdoc'
# -- Options for LaTeX output --------------------------------------------------
# The paper size ('letter' or 'a4').
#latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
#latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
("index", "six.tex", u"six Documentation",
u"Benjamin Peterson", "manual"),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Additional stuff for the LaTeX preamble.
#latex_preamble = ''
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
("index", "six", u"six Documentation",
[u"Benjamin Peterson"], 1)
]
# -- Intersphinx ---------------------------------------------------------------
intersphinx_mapping = {"py2" : ("https://docs.python.org/2/", None),
"py3" : ("https://docs.python.org/3/", None)}
This diff is collapsed.
[bdist_wheel]
universal = 1
[flake8]
max-line-length = 100
ignore = F821
[metadata]
license_file = LICENSE
[tool:pytest]
minversion=2.2.0
pep8ignore =
documentation/*.py ALL
test_six.py ALL
flakes-ignore =
documentation/*.py ALL
test_six.py ALL
six.py UndefinedName
# Copyright (c) 2010-2020 Benjamin Peterson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
from __future__ import with_statement
# Six is a dependency of setuptools, so using setuptools creates a
# circular dependency when building a Python stack from source. We
# therefore allow falling back to distutils to install six.
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import six
six_classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Topic :: Software Development :: Libraries",
"Topic :: Utilities",
]
with open("README.rst", "r") as fp:
six_long_description = fp.read()
setup(name="six",
version=six.__version__,
author="Benjamin Peterson",
author_email="benjamin@python.org",
url="https://github.com/benjaminp/six",
tests_require=["pytest"],
py_modules=["six"],
description="Python 2 and 3 compatibility utilities",
long_description=six_long_description,
license="MIT",
classifiers=six_classifiers,
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*",
)
This diff is collapsed.
This diff is collapsed.
[tox]
envlist=py27,py33,py34,py35,py36,py37,py38,pypy,flake8
[testenv]
deps= pytest
commands= python -m pytest -rfsxX {posargs}
[testenv:flake8]
basepython=python
deps=flake8
commands= flake8 six.py
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment