Compare commits
1 Commits
upstream
...
debian/2.7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13d3a4882c |
41
debian/2to3-2.7.1
vendored
Normal file
41
debian/2to3-2.7.1
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.4.
|
||||
.TH 2TO3-2.7 "1" "January 2012" "2to3-2.7 2.7" "User Commands"
|
||||
.SH NAME
|
||||
2to3-2.7 \- Python2 to Python3 converter
|
||||
.SH SYNOPSIS
|
||||
.B 2to3
|
||||
[\fIoptions\fR] \fIfile|dir \fR...
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
show this help message and exit
|
||||
.TP
|
||||
\fB\-d\fR, \fB\-\-doctests_only\fR
|
||||
Fix up doctests only
|
||||
.TP
|
||||
\fB\-f\fR FIX, \fB\-\-fix\fR=\fIFIX\fR
|
||||
Each FIX specifies a transformation; default: all
|
||||
.TP
|
||||
\fB\-j\fR PROCESSES, \fB\-\-processes\fR=\fIPROCESSES\fR
|
||||
Run 2to3 concurrently
|
||||
.TP
|
||||
\fB\-x\fR NOFIX, \fB\-\-nofix\fR=\fINOFIX\fR
|
||||
Prevent a transformation from being run
|
||||
.TP
|
||||
\fB\-l\fR, \fB\-\-list\-fixes\fR
|
||||
List available transformations
|
||||
.TP
|
||||
\fB\-p\fR, \fB\-\-print\-function\fR
|
||||
Modify the grammar so that print() is a function
|
||||
.TP
|
||||
\fB\-v\fR, \fB\-\-verbose\fR
|
||||
More verbose logging
|
||||
.TP
|
||||
\fB\-\-no\-diffs\fR
|
||||
Don't show diffs of the refactoring
|
||||
.TP
|
||||
\fB\-w\fR, \fB\-\-write\fR
|
||||
Write back modified files
|
||||
.TP
|
||||
\fB\-n\fR, \fB\-\-nobackups\fR
|
||||
Don't write backups for modified files
|
||||
8997
debian/FAQ.html
vendored
Normal file
8997
debian/FAQ.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
58
debian/PVER-dbg.README.Debian.in
vendored
Normal file
58
debian/PVER-dbg.README.Debian.in
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
Contents of the @PVER@-dbg package
|
||||
-------------------------------------
|
||||
|
||||
For debugging python and extension modules, you may want to add the contents
|
||||
of /usr/share/doc/@PVER@/gdbinit (found in the @PVER@-dev package) to your
|
||||
~/.gdbinit file.
|
||||
|
||||
@PVER@-dbg contains two sets of packages:
|
||||
|
||||
- debugging symbols for the standard @PVER@ build. When this package
|
||||
is installed, gdb will automatically load up the debugging symbols
|
||||
from it when debugging @PVER@ or one of the included extension
|
||||
modules.
|
||||
|
||||
- a separate @PVER@-dbg binary, configured --with-pydebug, enabling the
|
||||
additional debugging code to help debug memory management problems.
|
||||
|
||||
For the latter, all extension modules have to be recompiled to
|
||||
correctly load with an pydebug enabled build.
|
||||
|
||||
|
||||
Debian and Ubuntu specific changes to the debug interpreter
|
||||
-----------------------------------------------------------
|
||||
The python2.4 and python2.5 packages in Ubuntu feisty are modified to
|
||||
first look for extension modules under a different name.
|
||||
|
||||
normal build: foo.so
|
||||
debug build: foo_d.so foo.so
|
||||
|
||||
This naming schema allows installation of the extension modules into
|
||||
the same path (The naming is directly taken from the Windows builds
|
||||
which already uses this naming scheme).
|
||||
|
||||
See https://wiki.ubuntu.com/PyDbgBuilds for more information.
|
||||
|
||||
|
||||
Using the python-dbg builds
|
||||
---------------------------
|
||||
|
||||
* Call the python-dbg or the pythonX.Y-dbg binaries instead of the
|
||||
python or pythonX.Y binaries.
|
||||
|
||||
* Debugging a third party extension requires the availabilty of the
|
||||
extension built for the debug interpreter. For an extension `foo'
|
||||
make sure that the `python-foo-dbg' package is installed, or else
|
||||
the interpreter falls back to the extension for the normal build.
|
||||
The error on fallback is expected.
|
||||
|
||||
* Properties of the debug build are described in
|
||||
/usr/share/doc/@PVER@/SpecialBuilds.txt.gz.
|
||||
The debug interpreter is built with Py_DEBUG defined.
|
||||
|
||||
* From SpecialBuilds.txt: This is what is generally meant by "a debug
|
||||
build" of Python. Py_DEBUG implies LLTRACE, Py_REF_DEBUG,
|
||||
Py_TRACE_REFS, and PYMALLOC_DEBUG (if WITH_PYMALLOC is enabled).
|
||||
In addition, C assert()s are enabled (via the C way: by not defining
|
||||
NDEBUG), and some routines do additional sanity checks inside
|
||||
"#ifdef Py_DEBUG" blocks.
|
||||
13
debian/PVER-dbg.overrides.in
vendored
Normal file
13
debian/PVER-dbg.overrides.in
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
@PVER@-dbg binary: package-name-doesnt-match-sonames
|
||||
@PVER@-dbg binary: non-dev-pkg-with-shlib-symlink
|
||||
|
||||
# no, it's not unusual
|
||||
@PVER@-dbg binary: unusual-interpreter
|
||||
|
||||
# just the gdb debug file
|
||||
@PVER@-dbg binary: python-script-but-no-python-dep
|
||||
|
||||
# pointless lintian ...
|
||||
@PVER@-dbg binary: hardening-no-fortify-functions
|
||||
|
||||
@PVER@-dbg binary: command-with-path-in-maintainer-script
|
||||
19
debian/PVER-dbg.postinst.in
vendored
Normal file
19
debian/PVER-dbg.postinst.in
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" = configure ]; then
|
||||
files=$(dpkg -L lib@PVER@-dbg@HOST_QUAL@ | sed -n '/^\/usr\/lib\/@PVER@\/.*\.py$/p')
|
||||
if [ -n "$files" ]; then
|
||||
/usr/bin/@PVER@ -E -S /usr/lib/@PVER@/py_compile.py $files
|
||||
if grep -sq '^byte-compile[^#]*optimize' /etc/python/debian_config; then
|
||||
/usr/bin/@PVER@ -E -S -O /usr/lib/@PVER@/py_compile.py $files
|
||||
fi
|
||||
else
|
||||
echo >&2 "@PVER@-dbg: can't get files for byte-compilation"
|
||||
fi
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
28
debian/PVER-dbg.prerm.in
vendored
Normal file
28
debian/PVER-dbg.prerm.in
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
remove)
|
||||
rm -f /usr/lib/debug/usr/bin/@PVER@-gdb.py[co]
|
||||
rm -f /usr/lib/debug/usr/lib/lib@PVER@.so.1.0-gdb.py[co]
|
||||
dpkg -L lib@PVER@-dbg@HOST_QUAL@ \
|
||||
| awk '/\.py$/ {print $0"c\n" $0"o"}' \
|
||||
| xargs -r rm -f >&2
|
||||
;;
|
||||
upgrade)
|
||||
dpkg -L lib@PVER@-dbg@HOST_QUAL@ \
|
||||
| awk '/\.py$/ {print $0"c\n" $0"o"}' \
|
||||
| xargs -r rm -f >&2
|
||||
;;
|
||||
deconfigure)
|
||||
;;
|
||||
failed-upgrade)
|
||||
;;
|
||||
*)
|
||||
echo "prerm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
13
debian/PVER-doc.doc-base.PVER-api.in
vendored
Normal file
13
debian/PVER-doc.doc-base.PVER-api.in
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
Document: @PVER@-api
|
||||
Title: Python/C API Reference Manual (v@VER@)
|
||||
Author: Guido van Rossum
|
||||
Abstract: This manual documents the API used by C (or C++) programmers who
|
||||
want to write extension modules or embed Python. It is a
|
||||
companion to *Extending and Embedding the Python Interpreter*,
|
||||
which describes the general principles of extension writing but
|
||||
does not document the API functions in detail.
|
||||
Section: Programming/Python
|
||||
|
||||
Format: HTML
|
||||
Index: /usr/share/doc/@PVER@/html/c-api/index.html
|
||||
Files: /usr/share/doc/@PVER@/html/c-api/*.html
|
||||
13
debian/PVER-doc.doc-base.PVER-dist.in
vendored
Normal file
13
debian/PVER-doc.doc-base.PVER-dist.in
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
Document: @PVER@-dist
|
||||
Title: Distributing Python Modules (v@VER@)
|
||||
Author: Greg Ward
|
||||
Abstract: This document describes the Python Distribution Utilities
|
||||
(``Distutils'') from the module developer's point-of-view, describing
|
||||
how to use the Distutils to make Python modules and extensions easily
|
||||
available to a wider audience with very little overhead for
|
||||
build/release/install mechanics.
|
||||
Section: Programming/Python
|
||||
|
||||
Format: HTML
|
||||
Index: /usr/share/doc/@PVER@/html/distutils/index.html
|
||||
Files: /usr/share/doc/@PVER@/html/distutils/*.html
|
||||
16
debian/PVER-doc.doc-base.PVER-ext.in
vendored
Normal file
16
debian/PVER-doc.doc-base.PVER-ext.in
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
Document: @PVER@-ext
|
||||
Title: Extending and Embedding the Python Interpreter (v@VER@)
|
||||
Author: Guido van Rossum
|
||||
Abstract: This document describes how to write modules in C or C++ to extend
|
||||
the Python interpreter with new modules. Those modules can define
|
||||
new functions but also new object types and their methods. The
|
||||
document also describes how to embed the Python interpreter in
|
||||
another application, for use as an extension language. Finally,
|
||||
it shows how to compile and link extension modules so that they
|
||||
can be loaded dynamically (at run time) into the interpreter, if
|
||||
the underlying operating system supports this feature.
|
||||
Section: Programming/Python
|
||||
|
||||
Format: HTML
|
||||
Index: /usr/share/doc/@PVER@/html/extending/index.html
|
||||
Files: /usr/share/doc/@PVER@/html/extending/*.html
|
||||
12
debian/PVER-doc.doc-base.PVER-inst.in
vendored
Normal file
12
debian/PVER-doc.doc-base.PVER-inst.in
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
Document: @PVER@-inst
|
||||
Title: Installing Python Modules (v@VER@)
|
||||
Author: Greg Ward
|
||||
Abstract: This document describes the Python Distribution Utilities
|
||||
(``Distutils'') from the end-user's point-of-view, describing how to
|
||||
extend the capabilities of a standard Python installation by building
|
||||
and installing third-party Python modules and extensions.
|
||||
Section: Programming/Python
|
||||
|
||||
Format: HTML
|
||||
Index: /usr/share/doc/@PVER@/html/install/index.html
|
||||
Files: /usr/share/doc/@PVER@/html/install/*.html
|
||||
15
debian/PVER-doc.doc-base.PVER-lib.in
vendored
Normal file
15
debian/PVER-doc.doc-base.PVER-lib.in
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
Document: @PVER@-lib
|
||||
Title: Python Library Reference (v@VER@)
|
||||
Author: Guido van Rossum
|
||||
Abstract: This library reference manual documents Python's standard library,
|
||||
as well as many optional library modules (which may or may not be
|
||||
available, depending on whether the underlying platform supports
|
||||
them and on the configuration choices made at compile time). It
|
||||
also documents the standard types of the language and its built-in
|
||||
functions and exceptions, many of which are not or incompletely
|
||||
documented in the Reference Manual.
|
||||
Section: Programming/Python
|
||||
|
||||
Format: HTML
|
||||
Index: /usr/share/doc/@PVER@/html/library/index.html
|
||||
Files: /usr/share/doc/@PVER@/html/library/*.html
|
||||
10
debian/PVER-doc.doc-base.PVER-new.in
vendored
Normal file
10
debian/PVER-doc.doc-base.PVER-new.in
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
Document: @PVER@-new
|
||||
Title: What's new in Python @VER@
|
||||
Author: A.M. Kuchling
|
||||
Abstract: This documents lists new features and changes worth mentioning
|
||||
in Python @VER@.
|
||||
Section: Programming/Python
|
||||
|
||||
Format: HTML
|
||||
Index: /usr/share/doc/@PVER@/html/whatsnew/@VER@.html
|
||||
Files: /usr/share/doc/@PVER@/html/whatsnew/@VER@.html
|
||||
18
debian/PVER-doc.doc-base.PVER-ref.in
vendored
Normal file
18
debian/PVER-doc.doc-base.PVER-ref.in
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
Document: @PVER@-ref
|
||||
Title: Python Reference Manual (v@VER@)
|
||||
Author: Guido van Rossum
|
||||
Abstract: This reference manual describes the syntax and "core semantics" of
|
||||
the language. It is terse, but attempts to be exact and complete.
|
||||
The semantics of non-essential built-in object types and of the
|
||||
built-in functions and modules are described in the *Python
|
||||
Library Reference*. For an informal introduction to the language,
|
||||
see the *Python Tutorial*. For C or C++ programmers, two
|
||||
additional manuals exist: *Extending and Embedding the Python
|
||||
Interpreter* describes the high-level picture of how to write a
|
||||
Python extension module, and the *Python/C API Reference Manual*
|
||||
describes the interfaces available to C/C++ programmers in detail.
|
||||
Section: Programming/Python
|
||||
|
||||
Format: HTML
|
||||
Index: /usr/share/doc/@PVER@/html/reference/index.html
|
||||
Files: /usr/share/doc/@PVER@/html/reference/*.html
|
||||
13
debian/PVER-doc.doc-base.PVER-tut.in
vendored
Normal file
13
debian/PVER-doc.doc-base.PVER-tut.in
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
Document: @PVER@-tut
|
||||
Title: Python Tutorial (v@VER@)
|
||||
Author: Guido van Rossum, Fred L. Drake, Jr., editor
|
||||
Abstract: This tutorial introduces the reader informally to the basic
|
||||
concepts and features of the Python language and system. It helps
|
||||
to have a Python interpreter handy for hands-on experience, but
|
||||
all examples are self-contained, so the tutorial can be read
|
||||
off-line as well.
|
||||
Section: Programming/Python
|
||||
|
||||
Format: HTML
|
||||
Index: /usr/share/doc/@PVER@/html/tutorial/index.html
|
||||
Files: /usr/share/doc/@PVER@/html/tutorial/*.html
|
||||
2
debian/PVER-doc.overrides.in
vendored
Normal file
2
debian/PVER-doc.overrides.in
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# this is referenced by the html docs
|
||||
@PVER@-doc binary: extra-license-file
|
||||
2
debian/PVER-examples.overrides.in
vendored
Normal file
2
debian/PVER-examples.overrides.in
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# don't care about permissions of the example files
|
||||
@PVER@-examples binary: executable-not-elf-or-script
|
||||
157
debian/PVER-minimal.README.Debian.in
vendored
Normal file
157
debian/PVER-minimal.README.Debian.in
vendored
Normal file
@@ -0,0 +1,157 @@
|
||||
Contents of the @PVER@-minimal package
|
||||
-----------------------------------------
|
||||
|
||||
@PVER@-minimal consists of a minimum set of modules which may be needed
|
||||
for python scripts used during the boot process. If other packages
|
||||
are needed in these scripts, don't work around the missing module, but
|
||||
file a bug report against this package. The modules in this package
|
||||
are:
|
||||
|
||||
__builtin__ builtin
|
||||
__future__ module
|
||||
_abcoll module
|
||||
_bisect extension
|
||||
_bytesio extension
|
||||
_codecs builtin
|
||||
_collections extension
|
||||
_fileio extension
|
||||
_functools extension
|
||||
_hashlib extensionx
|
||||
_heapq extension
|
||||
_io extension
|
||||
_locale extension
|
||||
_md5 extension
|
||||
_random extension
|
||||
_sha extension
|
||||
_sha256 extension
|
||||
_sha512 extension
|
||||
_socket extension
|
||||
_sre builtin
|
||||
_ssl extensionx
|
||||
_struct extension
|
||||
_symtable builtin
|
||||
_sysconfigdata module
|
||||
_types builtin
|
||||
_warnings builtin
|
||||
_weakref extension
|
||||
_weakrefset module
|
||||
abc module
|
||||
atexit module
|
||||
ConfigParser module
|
||||
StringIO module
|
||||
UserDict module
|
||||
cPickle extension
|
||||
cStringIO extension
|
||||
array extension
|
||||
base64 module
|
||||
binascii extension
|
||||
bisect module
|
||||
cmath extension
|
||||
calendar module
|
||||
codecs module
|
||||
collections module
|
||||
compileall module
|
||||
contextlib module
|
||||
copy module
|
||||
copy_reg module
|
||||
datetime extension
|
||||
dis module
|
||||
encodings package
|
||||
errno builtin
|
||||
exceptions builtin
|
||||
fcntl extension
|
||||
fnmatch module
|
||||
functools module
|
||||
gc builtin
|
||||
genericpath module
|
||||
getopt module
|
||||
glob module
|
||||
grp extension
|
||||
hashlib module
|
||||
heapq module
|
||||
imp builtin
|
||||
inspect module
|
||||
io module
|
||||
itertools extension
|
||||
keyword module
|
||||
linecache module
|
||||
locale module
|
||||
logging package
|
||||
marshal builtin
|
||||
math extension
|
||||
md5 module
|
||||
opcode module
|
||||
operator extension
|
||||
optparse module
|
||||
os module
|
||||
pickle module
|
||||
platform module
|
||||
popen2 module
|
||||
posix builtin
|
||||
posixpath module
|
||||
pkgutil module
|
||||
pwd builtin
|
||||
py_compile module
|
||||
random module
|
||||
re module
|
||||
repr module
|
||||
runpy module
|
||||
select extension
|
||||
sha module
|
||||
shutil module
|
||||
signal builtin
|
||||
socket module
|
||||
spwd extension
|
||||
sre module
|
||||
sre_compile module
|
||||
sre_constants module
|
||||
sre_parse module
|
||||
ssl module
|
||||
stat module
|
||||
string module
|
||||
strop extension
|
||||
struct module
|
||||
subprocess module
|
||||
sys builtin
|
||||
syslog extension
|
||||
sysconfig module
|
||||
tempfile module
|
||||
textwrap module
|
||||
time extension
|
||||
token module
|
||||
thread builtin
|
||||
token module
|
||||
tokenize module
|
||||
traceback module
|
||||
types module
|
||||
unicodedata extension
|
||||
weakref module
|
||||
warnings module
|
||||
zipimport extension
|
||||
zlib extension
|
||||
|
||||
Included are as well the codecs and stringprep modules, and the encodings
|
||||
modules for all encodings except the multibyte encodings and the bz2 codec.
|
||||
|
||||
The following modules are excluded, their import is guarded from the
|
||||
importing module:
|
||||
|
||||
Used in Excluded
|
||||
------------ ------------------------------------
|
||||
os nt ntpath os2 os2emxpath mac macpath
|
||||
riscos riscospath riscosenviron
|
||||
optparse gettext
|
||||
pickle doctest
|
||||
subprocess threading
|
||||
|
||||
This list was derived by looking at the modules in the perl-base package,
|
||||
then adding python specific "core modules".
|
||||
|
||||
TODO's
|
||||
------
|
||||
|
||||
- time.strptime cannot be used. The required _strptime module is not
|
||||
included in the -minimal package yet. _strptime, locale, _locale and
|
||||
calendar have to be added.
|
||||
|
||||
- modules used very often in the testsuite: copy, cPickle, operator.
|
||||
1
debian/PVER-minimal.overrides.in
vendored
Normal file
1
debian/PVER-minimal.overrides.in
vendored
Normal file
@@ -0,0 +1 @@
|
||||
@PVER@-minimal binary: command-with-path-in-maintainer-script
|
||||
78
debian/PVER-minimal.postinst.in
vendored
Normal file
78
debian/PVER-minimal.postinst.in
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ ! -f /etc/@PVER@/sitecustomize.py ]; then
|
||||
cat <<-EOF
|
||||
# Empty sitecustomize.py to avoid a dangling symlink
|
||||
EOF
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
# Create empty directories in /usr/local
|
||||
if [ ! -e /usr/local/lib/@PVER@ ]; then
|
||||
mkdir -p /usr/local/lib/@PVER@ 2> /dev/null || true
|
||||
chmod 2775 /usr/local/lib/@PVER@ 2> /dev/null || true
|
||||
chown root:staff /usr/local/lib/@PVER@ 2> /dev/null || true
|
||||
fi
|
||||
localsite=/usr/local/lib/@PVER@/dist-packages
|
||||
if [ ! -e $localsite ]; then
|
||||
mkdir -p $localsite 2> /dev/null || true
|
||||
chmod 2775 $localsite 2> /dev/null || true
|
||||
chown root:staff $localsite 2> /dev/null || true
|
||||
fi
|
||||
|
||||
if which update-binfmts >/dev/null; then
|
||||
update-binfmts --import @PVER@
|
||||
fi
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$1" = configure ]; then
|
||||
if ls -L /usr/lib/@PVER@/sitecustomize.py >/dev/null 2>&1; then
|
||||
filt='cat'
|
||||
else
|
||||
filt='fgrep -v sitecustomize.py'
|
||||
fi
|
||||
files=$(dpkg -L lib@PVER@-minimal@HOST_QUAL@ \
|
||||
| sed -n '/^\/usr\/lib\/@PVER@\/.*\.py$/p' | $filt)
|
||||
if [ -n "$files" ]; then
|
||||
/usr/bin/@PVER@ -E -S /usr/lib/@PVER@/py_compile.py $files
|
||||
if grep -sq '^byte-compile[^#]*optimize' /etc/python/debian_config; then
|
||||
/usr/bin/@PVER@ -E -S -O /usr/lib/@PVER@/py_compile.py $files
|
||||
fi
|
||||
else
|
||||
echo >&2 "@PVER@-minimal: can't get files for byte-compilation"
|
||||
fi
|
||||
bc=no
|
||||
if [ -z "$2" ] || dpkg --compare-versions "$2" lt 2.7-9 \
|
||||
|| [ -f /var/lib/python/@PVER@_installed ]; then
|
||||
bc=yes
|
||||
fi
|
||||
if grep -sq '^unsupported-versions[^#]*@PVER@' /usr/share/python/debian_defaults
|
||||
then
|
||||
# FIXME: byte compile anyway?
|
||||
bc=no
|
||||
fi
|
||||
if [ "$bc" = yes ]; then
|
||||
# new installation or installation of first version with hook support
|
||||
if [ "$DEBIAN_FRONTEND" != noninteractive ]; then
|
||||
echo "Linking and byte-compiling packages for runtime @PVER@..."
|
||||
fi
|
||||
version=$(dpkg -s @PVER@-minimal | awk '/^Version:/ {print $2}')
|
||||
for hook in /usr/share/python/runtime.d/*.rtinstall; do
|
||||
[ -x $hook ] || continue
|
||||
$hook rtinstall @PVER@ "$2" "$version"
|
||||
done
|
||||
if [ -f /var/lib/python/@PVER@_installed ]; then
|
||||
rm -f /var/lib/python/@PVER@_installed
|
||||
rmdir --ignore-fail-on-non-empty /var/lib/python 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
21
debian/PVER-minimal.postrm.in
vendored
Normal file
21
debian/PVER-minimal.postrm.in
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" = "remove" ]; then
|
||||
|
||||
if [ -f /var/lib/python/@PVER@_installed ]; then
|
||||
rm -f /var/lib/python/@PVER@_installed
|
||||
rmdir --ignore-fail-on-non-empty /var/lib/python 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$1" = "purge" ]; then
|
||||
for d in `find /usr/lib/@PVER@ -depth -type d -empty 2> /dev/null`; do \
|
||||
while rmdir $d 2> /dev/null; do d=`dirname $d`; done; \
|
||||
done
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
39
debian/PVER-minimal.preinst.in
vendored
Normal file
39
debian/PVER-minimal.preinst.in
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
syssite=/usr/lib/@PVER@/site-packages
|
||||
oldsite=/usr/lib/@PVER@/old-site-packages
|
||||
localsite=/usr/local/lib/@PVER@/dist-packages
|
||||
syslink=../../${localsite#/usr/*}
|
||||
|
||||
case "$1" in
|
||||
install)
|
||||
if [ -z "$2" ] && [ -d $syssite ] && [ ! -h $syssite ]; then
|
||||
echo "new installation of @PVER@-minimal; $syssite is a directory"
|
||||
echo "which is expected a symlink to $localsite."
|
||||
echo "please find the package shipping files in $syssite and"
|
||||
echo "file a bug report to ship these in /usr/lib/@PVER@/dist-packages instead"
|
||||
echo "aborting installation of @PVER@-minimal"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# remember newly installed runtime
|
||||
mkdir -p /var/lib/python
|
||||
touch /var/lib/python/@PVER@_installed
|
||||
;;
|
||||
upgrade)
|
||||
;;
|
||||
|
||||
abort-upgrade)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "preinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
36
debian/PVER-minimal.prerm.in
vendored
Normal file
36
debian/PVER-minimal.prerm.in
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
remove)
|
||||
if [ "$DEBIAN_FRONTEND" != noninteractive ]; then
|
||||
echo "Unlinking and removing bytecode for runtime @PVER@"
|
||||
fi
|
||||
for hook in /usr/share/python/runtime.d/*.rtremove; do
|
||||
[ -x $hook ] || continue
|
||||
$hook rtremove @PVER@ || continue
|
||||
done
|
||||
|
||||
if which update-binfmts >/dev/null; then
|
||||
update-binfmts --package @PVER@ --remove @PVER@ /usr/bin/@PVER@
|
||||
fi
|
||||
|
||||
localsite=/usr/local/lib/@PVER@/dist-packages
|
||||
[ -d $localsite ] && rmdir $localsite 2>/dev/null || true
|
||||
[ -d $(dirname $localsite) ] \
|
||||
&& rmdir $(dirname $localsite) 2>/dev/null || true
|
||||
;;
|
||||
upgrade)
|
||||
;;
|
||||
deconfigure)
|
||||
;;
|
||||
failed-upgrade)
|
||||
;;
|
||||
*)
|
||||
echo "prerm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
10
debian/PVER.desktop.in
vendored
Normal file
10
debian/PVER.desktop.in
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Name=Python (v@VER@)
|
||||
Comment=Python Interpreter (v@VER@)
|
||||
Exec=/usr/bin/@PVER@
|
||||
Icon=/usr/share/pixmaps/@PVER@.xpm
|
||||
Terminal=true
|
||||
Type=Application
|
||||
Categories=Development;
|
||||
StartupNotify=true
|
||||
NoDisplay=true
|
||||
16
debian/PVER.overrides.in
vendored
Normal file
16
debian/PVER.overrides.in
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
# idlelib images
|
||||
@PVER@ binary: image-file-in-usr-lib
|
||||
|
||||
# yes, we have to
|
||||
@PVER@ binary: depends-on-python-minimal
|
||||
|
||||
@PVER@ binary: desktop-command-not-in-package
|
||||
@PVER@ binary: menu-command-not-in-package
|
||||
|
||||
# license file referred by the standard library
|
||||
@PVER@ binary: extra-license-file
|
||||
|
||||
# no, not useless
|
||||
@PVER@ binary: manpage-has-useless-whatis-entry
|
||||
|
||||
@PVER@ binary: command-with-path-in-maintainer-script
|
||||
41
debian/PVER.postinst.in
vendored
Normal file
41
debian/PVER.postinst.in
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
files=$(dpkg -L lib@PVER@-stdlib@HOST_QUAL@ | sed -n '/^\/usr\/lib\/@PVER@\/.*\.py$/p')
|
||||
if [ -n "$files" ]; then
|
||||
/usr/bin/@PVER@ -E -S /usr/lib/@PVER@/py_compile.py $files
|
||||
if grep -sq '^byte-compile[^#]*optimize' /etc/python/debian_config; then
|
||||
/usr/bin/@PVER@ -E -S -O /usr/lib/@PVER@/py_compile.py $files
|
||||
fi
|
||||
else
|
||||
echo >&2 "@PVER@: can't get files for byte-compilation"
|
||||
fi
|
||||
|
||||
# Create empty directories in /usr/local
|
||||
if [ ! -e /usr/local/lib/python@VER@ ]; then
|
||||
mkdir -p /usr/local/lib/python@VER@ 2> /dev/null || true
|
||||
chmod 2775 /usr/local/lib/python@VER@ 2> /dev/null || true
|
||||
chown root:staff /usr/local/lib/python@VER@ 2> /dev/null || true
|
||||
fi
|
||||
if [ ! -e /usr/local/lib/python@VER@/site-packages ]; then
|
||||
mkdir -p /usr/local/lib/python@VER@/site-packages 2> /dev/null || true
|
||||
chmod 2775 /usr/local/lib/python@VER@/site-packages 2> /dev/null || true
|
||||
chown root:staff /usr/local/lib/python@VER@/site-packages 2> /dev/null || true
|
||||
fi
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
22
debian/PVER.prerm.in
vendored
Normal file
22
debian/PVER.prerm.in
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
remove|upgrade)
|
||||
;;
|
||||
deconfigure)
|
||||
;;
|
||||
failed-upgrade)
|
||||
;;
|
||||
*)
|
||||
echo "prerm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
rmdir /usr/local/lib/python@VER@/site-packages 2>/dev/null && \
|
||||
rmdir /usr/local/lib/python@VER@ 2>/dev/null || \
|
||||
true
|
||||
|
||||
#DEBHELPER#
|
||||
8
debian/README.Debian.in
vendored
Normal file
8
debian/README.Debian.in
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
The documentation for this package is in /usr/share/doc/@PVER@/.
|
||||
|
||||
A draft of the "Debian Python Policy" can be found in
|
||||
|
||||
/usr/share/doc/python
|
||||
|
||||
Sometime it will be moved to /usr/share/doc/debian-policy in the
|
||||
debian-policy package.
|
||||
95
debian/README.PVER.in
vendored
Normal file
95
debian/README.PVER.in
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
|
||||
Python @VER@ for Debian
|
||||
---------------------
|
||||
|
||||
This is Python @VER@ packaged for Debian.
|
||||
|
||||
This document contains information specific to the Debian packages of
|
||||
Python @VER@.
|
||||
|
||||
|
||||
|
||||
[TODO: This document is not yet up-to-date with the packages.]
|
||||
|
||||
Currently, it features those two main topics:
|
||||
|
||||
1. Release notes for the Debian packages:
|
||||
2. Notes for developers using the Debian Python packages:
|
||||
|
||||
Release notes and documentation from the upstream package are installed
|
||||
in /usr/share/doc/@PVER@/.
|
||||
|
||||
There's a mailing list for discussion of issues related to Python on Debian
|
||||
systems: debian-python@lists.debian.org. The list is not intended for
|
||||
general Python problems, but as a forum for maintainers of Python-related
|
||||
packages and interested third parties.
|
||||
|
||||
|
||||
|
||||
1. Release notes for the Debian packages:
|
||||
|
||||
|
||||
Results of the regression test:
|
||||
------------------------------
|
||||
|
||||
The package does successfully run the regression tests for all included
|
||||
modules. Seven packages are skipped since they are platform-dependent and
|
||||
can't be used with Linux.
|
||||
|
||||
|
||||
2. Notes for developers using the Debian python packages:
|
||||
|
||||
See the draft of the Debian Python policy in /usr/share/doc/python.
|
||||
|
||||
distutils can be found in the @PVER@-dev package. Development files
|
||||
like the python library or Makefiles can be found in the @PVER@-dev
|
||||
package in /usr/lib/@PVER@/config. Therefore, if you need to install
|
||||
a pure python extension, you only need @PVER@. On the other hand, to
|
||||
install a C extension, you need @PVER@-dev.
|
||||
|
||||
a) Locally installed Python add-ons
|
||||
|
||||
/usr/local/lib/@PVER@/site-packages/
|
||||
/usr/local/lib/site-python/ (version-independent modules)
|
||||
|
||||
b) Python add-ons packaged for Debian
|
||||
|
||||
/usr/lib/@PVER@/site-packages/
|
||||
/usr/lib/site-python/ (version-independent modules)
|
||||
|
||||
Note that no package must install files directly into /usr/lib/@PVER@/
|
||||
or /usr/local/lib/@PVER@/. Only the site-packages directory is allowed
|
||||
for third-party extensions.
|
||||
|
||||
Use of the new `package' scheme is strongly encouraged. The `ni' interface
|
||||
is obsolete in python 1.5.
|
||||
|
||||
Header files for extensions go into /usr/include/@PVER@/.
|
||||
|
||||
|
||||
Installing extensions for local use only:
|
||||
----------------------------------------
|
||||
|
||||
Consider using distutils ...
|
||||
|
||||
Most extensions use Python's Makefile.pre.in. Note that Makefile.pre.in
|
||||
by default will install files into /usr/lib/, not into /usr/local/lib/,
|
||||
which is not allowed for local extensions. You'll have to change the
|
||||
Makefile accordingly. Most times, "make prefix=/usr/local install" will
|
||||
work.
|
||||
|
||||
|
||||
Packaging python extensions for Debian:
|
||||
--------------------------------------
|
||||
|
||||
Maintainers of Python extension packages should read
|
||||
|
||||
/usr/share/doc/python/python-policy.txt.gz
|
||||
|
||||
|
||||
|
||||
|
||||
03/09/98
|
||||
Gregor Hoffleit <flight@debian.org>
|
||||
|
||||
Last change: 2001-12-14
|
||||
8
debian/README.Tk
vendored
Normal file
8
debian/README.Tk
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
Tkinter documentation can be found at
|
||||
|
||||
http://www.pythonware.com/library/index.htm
|
||||
|
||||
more specific:
|
||||
|
||||
http://www.pythonware.com/library/tkinter/introduction/index.htm
|
||||
http://www.pythonware.com/library/tkinter/an-introduction-to-tkinter.pdf
|
||||
72
debian/README.dbm
vendored
Normal file
72
debian/README.dbm
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
|
||||
Python and dbm modules on Debian
|
||||
--------------------------------
|
||||
|
||||
This file documents the configuration of the dbm modules for Debian. It
|
||||
gives hints at the preferred use of the dbm modules.
|
||||
|
||||
|
||||
The preferred way to access dbm databases in Python is the anydbm module.
|
||||
dbm databases behave like mappings (dictionaries).
|
||||
|
||||
Since there exist several dbm database formats, we choose the following
|
||||
layout for Python on Debian:
|
||||
|
||||
* creating a new database with anydbm will create a Berkeley DB 2.X Hash
|
||||
database file. This is the standard format used by libdb starting
|
||||
with glibc 2.1.
|
||||
|
||||
* opening an existing database with anydbm will try to guess the format
|
||||
of the file (using whichdb) and then load it using one of the bsddb,
|
||||
bsddb1, gdbm or dbm (only if the python-gdbm package is installed)
|
||||
or dumbdbm modules.
|
||||
|
||||
* The modules use the following database formats:
|
||||
|
||||
- bsddb: Berkeley DB 2.X Hash (as in libc6 >=2.1 or libdb2)
|
||||
- bsddb1: Berkeley DB 1.85 Hash (as in libc6 >=2.1 or libdb2)
|
||||
- gdbm: GNU dbm 1.x or ndbm
|
||||
- dbm: " (nearly the same as the gdbm module for us)
|
||||
- dumbdbm: a hand-crafted format only used in this module
|
||||
|
||||
That means that all usual formats should be readable with anydbm.
|
||||
|
||||
* If you want to create a database in a format different from DB 2.X,
|
||||
you can still directly use the specified module.
|
||||
|
||||
* I.e. bsddb is the preferred module, and DB 2.X is the preferred format.
|
||||
|
||||
* Note that the db1hash and bsddb1 modules are Debian specific. anydbm
|
||||
and whichdb have been modified to support DB 2.X Hash files (see
|
||||
below for details).
|
||||
|
||||
|
||||
|
||||
For experts only:
|
||||
----------------
|
||||
|
||||
Although bsddb employs the new DB 2.X format and uses the new Sleepycat
|
||||
DB 2 library as included with glibc >= 2.1, it's still using the old
|
||||
DB 1.85 API (which is still supported by DB 2).
|
||||
|
||||
A more recent version 1.1 of the BSD DB module (available from
|
||||
http://starship.skyport.net/robind/python/) directly uses the DB 2.X API.
|
||||
It has a richer set of features.
|
||||
|
||||
|
||||
On a glibc 2.1 system, bsddb is linked with -ldb, bsddb1 is linked with
|
||||
-ldb1 and gdbm as well as dbm are linked with -lgdbm.
|
||||
|
||||
On a glibc 2.0 system (e.g. potato for m68k or slink), bsddb will be
|
||||
linked with -ldb2 while bsddb1 will be linked with -ldb (therefore
|
||||
python-base here depends on libdb2).
|
||||
|
||||
|
||||
db1hash and bsddb1 nearly completely identical to dbhash and bsddb. The
|
||||
only difference is that bsddb is linked with the real DB 2 library, while
|
||||
bsddb1 is linked with an library which provides compatibility with legacy
|
||||
DB 1.85 databases.
|
||||
|
||||
|
||||
July 16, 1999
|
||||
Gregor Hoffleit <flight@debian.org>
|
||||
14
debian/README.idle-PVER.in
vendored
Normal file
14
debian/README.idle-PVER.in
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
The Python IDLE package for Debian
|
||||
----------------------------------
|
||||
|
||||
This package contains Python @VER@'s Integrated DeveLopment Environment, IDLE.
|
||||
|
||||
IDLE is included in the Python @VER@ upstream distribution (Tools/idle) and
|
||||
depends on Tkinter (available as @PVER@-tk package).
|
||||
|
||||
I have written a simple man page.
|
||||
|
||||
|
||||
06/16/1999
|
||||
Gregor Hoffleit <flight@debian.org>
|
||||
88
debian/README.maintainers.in
vendored
Normal file
88
debian/README.maintainers.in
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
|
||||
Hints for maintainers of Debian packages of Python extensions
|
||||
-------------------------------------------------------------
|
||||
|
||||
Most of the content of this README can be found in the Debian Python policy.
|
||||
See /usr/share/doc/python/python-policy.txt.gz.
|
||||
|
||||
Documentation Tools
|
||||
-------------------
|
||||
|
||||
If your package ships documentation produced in the Python
|
||||
documentation format, you can generate it at build-time by
|
||||
build-depending on @PVER@-dev, and you will find the
|
||||
templates, tools and scripts in /usr/lib/@PVER@/doc/tools --
|
||||
adjust your build scripts accordingly.
|
||||
|
||||
|
||||
Makefile.pre.in issues
|
||||
----------------------
|
||||
|
||||
Python comes with a `universal Unix Makefile for Python extensions' in
|
||||
/usr/lib/@PVER@/config/Makefile.pre.in (with Debian, this is included
|
||||
in the python-dev package), which is used by most Python extensions.
|
||||
|
||||
In general, packages using the Makefile.pre.in approach can be packaged
|
||||
simply by running dh_make or by using one of debhelper's rules' templates
|
||||
(see /usr/doc/debhelper/examples/). Makefile.pre.in works fine with e.g.
|
||||
"make prefix=debian/tmp/usr install".
|
||||
|
||||
One glitch: You may be running into the problem that Makefile.pre.in
|
||||
doesn't try to create all the directories when they don't exist. Therefore,
|
||||
you may have to create them manually before "make install". In most cases,
|
||||
the following should work:
|
||||
|
||||
...
|
||||
dh_installdirs /usr/lib/@PVER@
|
||||
$(MAKE) prefix=debian/tmp/usr install
|
||||
...
|
||||
|
||||
|
||||
Byte-compilation
|
||||
----------------
|
||||
|
||||
For speed reasons, Python internally compiles source files into a byte-code.
|
||||
To speed up subsequent imports, it tries to save the byte-code along with
|
||||
the source with an extension .pyc (resp. pyo). This will fail if the
|
||||
libraries are installed in a non-writable directory, which may be the
|
||||
case for /usr/lib/@PVER@/.
|
||||
|
||||
Not that .pyc and .pyo files should not be relocated, since for debugging
|
||||
purposes the path of the source for is hard-coded into them.
|
||||
|
||||
To precompile files in batches after installation, Python has a script
|
||||
compileall.py, which compiles all files in a given directory tree. The
|
||||
Debian version of compileall has been enhanced to support incremental
|
||||
compilation and to feature a ddir (destination dir) option. ddir is
|
||||
used to compile files in debian/usr/lib/python/ when they will be
|
||||
installed into /usr/lib/python/.
|
||||
|
||||
|
||||
Currently, there are two ways to use compileall for Debian packages. The
|
||||
first has a speed penalty, the second has a space penalty in the package.
|
||||
|
||||
1.) Compiling and removing .pyc files in postinst/prerm:
|
||||
|
||||
Use dh_python(1) from the debhelper packages to add commands to byte-
|
||||
compile on installation and to remove the byte-compiled files on removal.
|
||||
Your package has to build-depend on: debhelper (>= 4.1.67), python.
|
||||
|
||||
In /usr/share/doc/@PVER@, you'll find sample.postinst and sample.prerm.
|
||||
If you set the directory where the .py files are installed, these
|
||||
scripts will install and remove the .pyc and .pyo files for your
|
||||
package after unpacking resp. before removing the package.
|
||||
|
||||
2.) Compiling the .pyc files `out of place' during installation:
|
||||
|
||||
As of 1.5.1, compileall.py allows you to specify a faked installation
|
||||
directory using the "-d destdir" option, so that you can precompile
|
||||
the files in their temporary directory
|
||||
(e.g. debian/tmp/usr/lib/python2.1/site-packages/PACKAGE).
|
||||
|
||||
|
||||
|
||||
11/02/98
|
||||
Gregor Hoffleit <flight@debian.org>
|
||||
|
||||
|
||||
Last modified: 2007-10-14
|
||||
153
debian/README.python
vendored
Normal file
153
debian/README.python
vendored
Normal file
@@ -0,0 +1,153 @@
|
||||
|
||||
Python 2.x for Debian
|
||||
---------------------
|
||||
|
||||
This is Python 2.x packaged for Debian.
|
||||
|
||||
This document contains information specific to the Debian packages of
|
||||
Python 2.x.
|
||||
|
||||
|
||||
|
||||
[TODO: This document is not yet up-to-date with the packages.]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Currently, it features those two main topics:
|
||||
|
||||
1. Release notes for the Debian packages:
|
||||
2. Notes for developers using the Debian Python packages:
|
||||
|
||||
Release notes and documentation from the upstream package are installed
|
||||
in /usr/share/doc/python/.
|
||||
|
||||
Up-to-date information regarding Python on Debian systems is also
|
||||
available as http://www.debian.org/~flight/python/.
|
||||
|
||||
There's a mailing list for discussion of issues related to Python on Debian
|
||||
systems: debian-python@lists.debian.org. The list is not intended for
|
||||
general Python problems, but as a forum for maintainers of Python-related
|
||||
packages and interested third parties.
|
||||
|
||||
|
||||
|
||||
1. Release notes for the Debian packages:
|
||||
|
||||
|
||||
Results of the regression test:
|
||||
------------------------------
|
||||
|
||||
The package does successfully run the regression tests for all included
|
||||
modules. Seven packages are skipped since they are platform-dependent and
|
||||
can't be used with Linux.
|
||||
|
||||
|
||||
Noteworthy changes since the 1.4 packages:
|
||||
-----------------------------------------
|
||||
|
||||
- Threading support enabled.
|
||||
- Tkinter for Tcl/Tk 8.x.
|
||||
- New package python-zlib.
|
||||
- The dbmmodule was dropped. Use bsddb instead. gdbmmodule is provided
|
||||
for compatibility's sake.
|
||||
- python-elisp adheres to the new emacs add-on policy; it now depends
|
||||
on emacsen. python-elisp probably won't work correctly with emacs19.
|
||||
Refer to /usr/doc/python-elisp/ for more information.
|
||||
- Remember that 1.5 has dropped the `ni' interface in favor of a generic
|
||||
`packages' concept.
|
||||
- Python 1.5 regression test as additional package python-regrtest. You
|
||||
don't need to install this package unless you don't trust the
|
||||
maintainer ;-).
|
||||
- once again, modified upstream's compileall.py and py_compile.py.
|
||||
Now they support compilation of optimized byte-code (.pyo) for use
|
||||
with "python -O", removal of .pyc and .pyo files where the .py source
|
||||
files are missing (-d) and finally the fake of a installation directory
|
||||
when .py files have to be compiled out of place for later installation
|
||||
in a different directory (-i destdir, used in ./debian/rules).
|
||||
- The Debian packages for python 1.4 do call
|
||||
/usr/lib/python1.4/compileall.py in their postrm script. Therefore
|
||||
I had to provide a link from /usr/lib/python1.5/compileall.py, otherwise
|
||||
the old packages won't be removed completely. THIS IS A SILLY HACK!
|
||||
|
||||
|
||||
|
||||
2. Notes for developers using the Debian python packages:
|
||||
|
||||
|
||||
Embedding python:
|
||||
----------------
|
||||
|
||||
The files for embedding python resp. extending the python interpreter
|
||||
are included in the python-dev package. With the configuration in the
|
||||
Debian GNU/Linux packages of python 1.5, you will want to use something
|
||||
like
|
||||
|
||||
-I/usr/include/python1.5 (e.g. for config.h)
|
||||
-L/usr/lib/python1.5/config -lpython1.5 (... -lpthread)
|
||||
(also for Makefile.pre.in, Setup etc.)
|
||||
|
||||
Makefile.pre.in automatically gets that right. Note that unlike 1.4,
|
||||
python 1.5 has only one library, libpython1.5.a.
|
||||
|
||||
Currently, there's no shared version of libpython. Future version of
|
||||
the Debian python packages will support this.
|
||||
|
||||
|
||||
Python extension packages:
|
||||
-------------------------
|
||||
|
||||
According to www.python.org/doc/essays/packages.html, extension packages
|
||||
should only install into /usr/lib/python1.5/site-packages/ (resp.
|
||||
/usr/lib/site-python/ for packages that are definitely version independent).
|
||||
No extension package should install files directly into /usr/lib/python1.5/.
|
||||
|
||||
But according to the FSSTND, only Debian packages are allowed to use
|
||||
/usr/lib/python1.5/. Therefore Debian Python additionally by default
|
||||
searches a second hierarchy in /usr/local/lib/. These directories take
|
||||
precedence over their equivalents in /usr/lib/.
|
||||
|
||||
a) Locally installed Python add-ons
|
||||
|
||||
/usr/local/lib/python1.5/site-packages/
|
||||
/usr/local/lib/site-python/ (version-independent modules)
|
||||
|
||||
b) Python add-ons packaged for Debian
|
||||
|
||||
/usr/lib/python1.5/site-packages/
|
||||
/usr/lib/site-python/ (version-independent modules)
|
||||
|
||||
Note that no package must install files directly into /usr/lib/python1.5/
|
||||
or /usr/local/lib/python1.5/. Only the site-packages directory is allowed
|
||||
for third-party extensions.
|
||||
|
||||
Use of the new `package' scheme is strongly encouraged. The `ni' interface
|
||||
is obsolete in python 1.5.
|
||||
|
||||
Header files for extensions go into /usr/include/python1.5/.
|
||||
|
||||
|
||||
Installing extensions for local use only:
|
||||
----------------------------------------
|
||||
|
||||
Most extensions use Python's Makefile.pre.in. Note that Makefile.pre.in
|
||||
by default will install files into /usr/lib/, not into /usr/local/lib/,
|
||||
which is not allowed for local extensions. You'll have to change the
|
||||
Makefile accordingly. Most times, "make prefix=/usr/local install" will
|
||||
work.
|
||||
|
||||
|
||||
Packaging python extensions for Debian:
|
||||
--------------------------------------
|
||||
|
||||
Maintainers of Python extension packages should read README.maintainers.
|
||||
|
||||
|
||||
|
||||
|
||||
03/09/98
|
||||
Gregor Hoffleit <flight@debian.org>
|
||||
|
||||
Last change: 07/16/1999
|
||||
7
debian/README.source
vendored
Normal file
7
debian/README.source
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
The source tarball is lacking the files Lib/profile.py and Lib/pstats.py,
|
||||
which Debian considers to have a license non-suitable for main (the use
|
||||
of these modules limited to python).
|
||||
|
||||
The package uses quilt to apply / unapply patches.
|
||||
See /usr/share/doc/quilt/README.source. The series file is generated
|
||||
during the build.
|
||||
6
debian/_sysconfigdata.py
vendored
Normal file
6
debian/_sysconfigdata.py
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import sys
|
||||
|
||||
if hasattr(sys, 'gettotalrefcount'):
|
||||
from _sysconfigdata_d import *
|
||||
else:
|
||||
from _sysconfigdata_nd import *
|
||||
8
debian/argparse.egg-info
vendored
Normal file
8
debian/argparse.egg-info
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
Metadata-Version: 1.0
|
||||
Name: argparse
|
||||
Version: 1.2.1
|
||||
Summary: Python command-line parsing library
|
||||
Author: Steven Bethard
|
||||
Author-email: steven.bethard@gmail.com
|
||||
License: Python Software Foundation License
|
||||
Platform: any
|
||||
4826
debian/changelog
vendored
Normal file
4826
debian/changelog
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3
debian/changelog.shared
vendored
Normal file
3
debian/changelog.shared
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
* Link the interpreter against the shared runtime library. With
|
||||
gcc-4.1 the difference in the pystones benchmark dropped from about
|
||||
12% to about 5%.
|
||||
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@@ -0,0 +1 @@
|
||||
9
|
||||
219
debian/control
vendored
Normal file
219
debian/control
vendored
Normal file
@@ -0,0 +1,219 @@
|
||||
Source: python2.7
|
||||
Section: python
|
||||
Priority: optional
|
||||
Maintainer: Matthias Klose <doko@debian.org>
|
||||
Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.17.11),
|
||||
quilt, autoconf, autotools-dev,
|
||||
lsb-release, sharutils,
|
||||
libreadline-dev, libtinfo-dev, libncursesw5-dev (>= 5.3),
|
||||
tk-dev, blt-dev (>= 2.4z), libssl-dev (>= 1.1.1),
|
||||
zlib1g-dev, libbz2-dev,
|
||||
libexpat1-dev,
|
||||
libbluetooth-dev [linux-any] <!profile.nobluetooth>,
|
||||
locales [!armel !avr32 !hppa !ia64 !mipsel],
|
||||
libsqlite3-dev, libffi-dev (>= 3.0.5) [!or1k !avr32],
|
||||
libgpm2 [linux-any],
|
||||
mime-support, netbase, net-tools, bzip2, time,
|
||||
libdb-dev (<< 1:6.0), libgdbm-dev, help2man,
|
||||
xvfb <!nocheck>, xauth <!nocheck>, python2.7:any <cross>
|
||||
Build-Depends-Indep: python3-sphinx
|
||||
Build-Conflicts: tcl8.4-dev, tk8.4-dev,
|
||||
python2.7-xml, python-xml,
|
||||
autoconf2.13, python-cxx-dev,
|
||||
hardening-wrapper
|
||||
Standards-Version: 4.5.0
|
||||
Vcs-Browser: https://salsa.debian.org/cpython-team/python2
|
||||
Vcs-Git: https://salsa.debian.org/cpython-team/python2.git
|
||||
XS-Testsuite: autopkgtest
|
||||
|
||||
Package: python2.7
|
||||
Architecture: any
|
||||
Multi-Arch: allowed
|
||||
Priority: optional
|
||||
Depends: python2.7-minimal (= ${binary:Version}), libpython2.7-stdlib (= ${binary:Version}), mime-support, ${shlibs:Depends}, ${misc:Depends}
|
||||
Suggests: python2.7-doc, binutils
|
||||
Conflicts: python-profiler (<= 2.7.1-2)
|
||||
Breaks: python-virtualenv (<< 1.7.1.2-2~), vim-nox (<< 2:7.3.547-4), vim-gtk (<< 2:7.3.547-4), vim-gnome (<< 2:7.3.547-4), vim-athena (<< 2:7.3.547-4), ${python27:Breaks}
|
||||
Replaces: python-profiler (<= 2.7.1-2), python2.7-minimal (<< 2.7.3-7~)
|
||||
Description: Interactive high-level object-oriented language (version 2.7)
|
||||
Python is a high-level, interactive, object-oriented language. Its 2.7 version
|
||||
includes an extensive class library with lots of goodies for
|
||||
network programming, system administration, sounds and graphics.
|
||||
|
||||
Package: libpython2.7-stdlib
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Priority: optional
|
||||
Depends: libpython2.7-minimal (= ${binary:Version}), libssl1.1 (>= 1.1.1), mime-support, ${shlibs:Depends}, ${misc:Depends}
|
||||
Provides: python2.7-cjkcodecs, python2.7-ctypes, python2.7-elementtree, python2.7-celementtree, python2.7-wsgiref, python2.7-profiler, python2.7-argparse, python-argparse
|
||||
Replaces: python2.7 (<< 2.7.5-0~), libpython2.7-testsuite (<< 2.7.13-4)
|
||||
Breaks: python-urllib3 (<< 1.9.1-3), ${pyfpe:Breaks}, ${python27:Breaks}
|
||||
Description: Interactive high-level object-oriented language (standard library, version 2.7)
|
||||
Python is a high-level, interactive, object-oriented language. Its 2.7 version
|
||||
includes an extensive class library with lots of goodies for
|
||||
network programming, system administration, sounds and graphics.
|
||||
.
|
||||
This package contains Python 2.7's standard library. It is normally not
|
||||
used on its own, but as a dependency of python2.7.
|
||||
|
||||
Package: python2.7-minimal
|
||||
Architecture: any
|
||||
Multi-Arch: allowed
|
||||
Priority: optional
|
||||
Pre-Depends: ${shlibs:Pre-Depends}
|
||||
Depends: libpython2.7-minimal (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
|
||||
Recommends: python2.7
|
||||
Suggests: binfmt-support
|
||||
Replaces: python2.7 (<< 2.7.8-7~)
|
||||
Conflicts: binfmt-support (<< 1.1.2)
|
||||
Breaks: ${python27:Breaks}
|
||||
Description: Minimal subset of the Python language (version 2.7)
|
||||
This package contains the interpreter and some essential modules. It can
|
||||
be used in the boot process for some basic tasks.
|
||||
See /usr/share/doc/python2.7-minimal/README.Debian for a list of the modules
|
||||
contained in this package.
|
||||
XB-Cnf-Visible-Pkgname: python2.7
|
||||
|
||||
Package: libpython2.7-minimal
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Priority: optional
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Recommends: libpython2.7-stdlib
|
||||
Replaces: python2.7 (<< 2.7.4-2), python2.7-minimal (<< 2.7.3-10), libpython2.7-stdlib (<< 2.7.8-7)
|
||||
Breaks: python2.7-minimal (<< 2.7.4~rc1-1~), ${python27:Breaks}
|
||||
Conflicts: binfmt-support (<< 1.1.2)
|
||||
Description: Minimal subset of the Python language (version 2.7)
|
||||
This package contains some essential modules. It is normally not
|
||||
used on it's own, but as a dependency of python2.7-minimal.
|
||||
|
||||
Package: libpython2.7
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Section: libs
|
||||
Priority: optional
|
||||
Pre-Depends: ${misc:Pre-Depends}
|
||||
Depends: libpython2.7-stdlib (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
|
||||
Replaces: python2.7 (<< 2.6)
|
||||
Description: Shared Python runtime library (version 2.7)
|
||||
Python is a high-level, interactive, object-oriented language. Its 2.7 version
|
||||
includes an extensive class library with lots of goodies for
|
||||
network programming, system administration, sounds and graphics.
|
||||
.
|
||||
This package contains the shared runtime library, normally not needed
|
||||
for programs using the statically linked interpreter.
|
||||
|
||||
Package: python2.7-examples
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
Depends: python2.7:any (>= ${source:Version}), ${misc:Depends}
|
||||
Description: Examples for the Python language (v2.7)
|
||||
Examples, Demos and Tools for Python (v2.7). These are files included in
|
||||
the upstream Python distribution (v2.7).
|
||||
|
||||
Package: python2.7-dev
|
||||
Architecture: any
|
||||
Multi-Arch: allowed
|
||||
Depends: python2.7 (= ${binary:Version}), libpython2.7-dev (= ${binary:Version}), libpython2.7 (= ${binary:Version}), libexpat1-dev, ${shlibs:Depends}, ${misc:Depends}
|
||||
Recommends: libc6-dev | libc-dev
|
||||
Replaces: python2.7 (<< 2.7-3)
|
||||
Description: Header files and a static library for Python (v2.7)
|
||||
Header files, a static library and development tools for building
|
||||
Python (v2.7) modules, extending the Python interpreter or embedding
|
||||
Python (v2.7) in applications.
|
||||
.
|
||||
Maintainers of Python packages should read README.maintainers.
|
||||
|
||||
Package: libpython2.7-dev
|
||||
Section: libdevel
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Pre-Depends: ${misc:Pre-Depends}
|
||||
Depends: libpython2.7-stdlib (= ${binary:Version}), libpython2.7 (= ${binary:Version}), libexpat1-dev, ${shlibs:Depends}, ${misc:Depends}
|
||||
Replaces: python2.7 (<< 2.7-3), python2.7-dev (<< 2.7.3-10), python2.7-minimal (<< 2.7.3-10)
|
||||
Recommends: libc6-dev | libc-dev
|
||||
Description: Header files and a static library for Python (v2.7)
|
||||
Header files, a static library and development tools for building
|
||||
Python (v2.7) modules, extending the Python interpreter or embedding
|
||||
Python (v2.7) in applications.
|
||||
.
|
||||
Maintainers of Python packages should read README.maintainers.
|
||||
.
|
||||
This package contains development files. It is normally not
|
||||
used on it's own, but as a dependency of python2.7-dev.
|
||||
|
||||
Package: libpython2.7-testsuite
|
||||
Section: libdevel
|
||||
Architecture: all
|
||||
Depends: libpython2.7-stdlib (>= ${binary:Version}), ${misc:Depends}
|
||||
Suggests: python-gdbm, python-tk
|
||||
Description: Testsuite for the Python standard library (v2.7)
|
||||
The complete testsuite for the Python standard library. Note that
|
||||
a subset is found in the libpython2.7-stdlib package, which should
|
||||
be enough for other packages to use (please do not build-depend
|
||||
on this package, but file a bug report to include additional
|
||||
testsuite files in the libpython2.7-stdlib package).
|
||||
|
||||
Package: idle-python2.7
|
||||
Architecture: all
|
||||
Depends: python2.7, python-tk (>= 2.6~a3), python2.7-tk, ${misc:Depends}
|
||||
Enhances: python2.7
|
||||
Replaces: python2.7 (<< 2.6.1-2)
|
||||
Description: IDE for Python (v2.7) using Tkinter
|
||||
IDLE is an Integrated Development Environment for Python (v2.7).
|
||||
IDLE is written using Tkinter and therefore quite platform-independent.
|
||||
|
||||
Package: python2.7-doc
|
||||
Section: doc
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
Depends: libjs-jquery, libjs-underscore, ${misc:Depends}
|
||||
Suggests: python2.7
|
||||
Description: Documentation for the high-level object-oriented language Python (v2.7)
|
||||
These is the official set of documentation for the interactive high-level
|
||||
object-oriented language Python (v2.7). All documents are provided
|
||||
in HTML format. The package consists of ten documents:
|
||||
.
|
||||
* What's New in Python2.7
|
||||
* Tutorial
|
||||
* Python Library Reference
|
||||
* Macintosh Module Reference
|
||||
* Python Language Reference
|
||||
* Extending and Embedding Python
|
||||
* Python/C API Reference
|
||||
* Installing Python Modules
|
||||
* Documenting Python
|
||||
* Distributing Python Modules
|
||||
|
||||
Package: python2.7-dbg
|
||||
Section: debug
|
||||
Architecture: any
|
||||
Multi-Arch: allowed
|
||||
Depends: python2.7 (= ${binary:Version}), libpython2.7-dbg (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
|
||||
Suggests: python-gdbm-dbg, python-tk-dbg
|
||||
Description: Debug Build of the Python Interpreter (version 2.7)
|
||||
The package holds two things:
|
||||
.
|
||||
- A Python interpreter configured with --pydebug. Dynamically loaded modules
|
||||
are searched as <foo>_d.so first. Third party extensions need a separate
|
||||
build to be used by this interpreter.
|
||||
- Debug information for standard python interpreter and extensions.
|
||||
.
|
||||
See the README.debug for more information.
|
||||
|
||||
Package: libpython2.7-dbg
|
||||
Section: debug
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Pre-Depends: ${misc:Pre-Depends}
|
||||
Depends: libpython2.7-stdlib (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
|
||||
Suggests: python2.7-gdbm-dbg, python2.7-tk-dbg
|
||||
Replaces: python2.7-dbg (<< 2.7.3-10)
|
||||
Description: Debug Build of the Python Interpreter (version 2.7)
|
||||
The package holds two things:
|
||||
.
|
||||
- Extensions for a Python interpreter configured with --pydebug.
|
||||
- Debug information for standard python extensions.
|
||||
.
|
||||
See the README.debug for more information.
|
||||
|
||||
219
debian/control.in
vendored
Normal file
219
debian/control.in
vendored
Normal file
@@ -0,0 +1,219 @@
|
||||
Source: @PVER@
|
||||
Section: python
|
||||
Priority: optional
|
||||
Maintainer: Matthias Klose <doko@debian.org>
|
||||
Build-Depends: debhelper (>= 9), @bd_dpkgdev@ @bd_gcc@
|
||||
quilt, autoconf, autotools-dev,
|
||||
lsb-release, sharutils,
|
||||
libreadline-dev, libtinfo-dev, libncursesw5-dev (>= 5.3),
|
||||
tk-dev, blt-dev (>= 2.4z), libssl-dev (>= 1.1.1),
|
||||
zlib1g-dev, libbz2-dev,
|
||||
libexpat1-dev,
|
||||
libbluetooth-dev [linux-any]@pf_bluetooth@,
|
||||
locales [!armel !avr32 !hppa !ia64 !mipsel],
|
||||
libsqlite3-dev, libffi-dev (>= 3.0.5) [!or1k !avr32],
|
||||
libgpm2 [linux-any],
|
||||
mime-support, netbase, net-tools, bzip2, time,
|
||||
libdb-dev (<< 1:6.0), libgdbm-dev, help2man,
|
||||
xvfb <!nocheck>, xauth <!nocheck>, python2.7:any <cross>
|
||||
Build-Depends-Indep: python3-sphinx
|
||||
Build-Conflicts: tcl8.4-dev, tk8.4-dev,
|
||||
@PVER@-xml, python-xml,
|
||||
autoconf2.13, python-cxx-dev,
|
||||
hardening-wrapper
|
||||
Standards-Version: 4.5.0
|
||||
Vcs-Browser: https://salsa.debian.org/cpython-team/python2
|
||||
Vcs-Git: https://salsa.debian.org/cpython-team/python2.git
|
||||
XS-Testsuite: autopkgtest
|
||||
|
||||
Package: @PVER@
|
||||
Architecture: any
|
||||
Multi-Arch: allowed
|
||||
Priority: @PRIO@
|
||||
Depends: @PVER@-minimal (= ${binary:Version}), lib@PVER@-stdlib (= ${binary:Version}), mime-support, ${shlibs:Depends}, ${misc:Depends}
|
||||
Suggests: @PVER@-doc, binutils
|
||||
Conflicts: python-profiler (<= 2.7.1-2)
|
||||
Breaks: python-virtualenv (<< 1.7.1.2-2~), vim-nox (<< 2:7.3.547-4), vim-gtk (<< 2:7.3.547-4), vim-gnome (<< 2:7.3.547-4), vim-athena (<< 2:7.3.547-4), ${python27:Breaks}
|
||||
Replaces: python-profiler (<= 2.7.1-2), @PVER@-minimal (<< 2.7.3-7~)
|
||||
Description: Interactive high-level object-oriented language (version @VER@)
|
||||
Python is a high-level, interactive, object-oriented language. Its @VER@ version
|
||||
includes an extensive class library with lots of goodies for
|
||||
network programming, system administration, sounds and graphics.
|
||||
|
||||
Package: lib@PVER@-stdlib
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Priority: @PRIO@
|
||||
Depends: lib@PVER@-minimal (= ${binary:Version}), libssl1.1 (>= 1.1.1), mime-support, ${shlibs:Depends}, ${misc:Depends}
|
||||
Provides: @PVER@-cjkcodecs, @PVER@-ctypes, @PVER@-elementtree, @PVER@-celementtree, @PVER@-wsgiref, @PVER@-profiler, @PVER@-argparse, python-argparse
|
||||
Replaces: @PVER@ (<< 2.7.5-0~), lib@PVER@-testsuite (<< 2.7.13-4)
|
||||
Breaks: python-urllib3 (<< 1.9.1-3), ${pyfpe:Breaks}, ${python27:Breaks}
|
||||
Description: Interactive high-level object-oriented language (standard library, version @VER@)
|
||||
Python is a high-level, interactive, object-oriented language. Its @VER@ version
|
||||
includes an extensive class library with lots of goodies for
|
||||
network programming, system administration, sounds and graphics.
|
||||
.
|
||||
This package contains Python @VER@'s standard library. It is normally not
|
||||
used on its own, but as a dependency of python@VER@.
|
||||
|
||||
Package: @PVER@-minimal
|
||||
Architecture: any
|
||||
Multi-Arch: allowed
|
||||
Priority: @MINPRIO@
|
||||
Pre-Depends: ${shlibs:Pre-Depends}
|
||||
Depends: lib@PVER@-minimal (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
|
||||
Recommends: @PVER@
|
||||
Suggests: binfmt-support
|
||||
Replaces: @PVER@ (<< 2.7.8-7~)
|
||||
Conflicts: binfmt-support (<< 1.1.2)
|
||||
Breaks: ${python27:Breaks}
|
||||
Description: Minimal subset of the Python language (version @VER@)
|
||||
This package contains the interpreter and some essential modules. It can
|
||||
be used in the boot process for some basic tasks.
|
||||
See /usr/share/doc/@PVER@-minimal/README.Debian for a list of the modules
|
||||
contained in this package.
|
||||
XB-Cnf-Visible-Pkgname: python2.7
|
||||
|
||||
Package: lib@PVER@-minimal
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Priority: @MINPRIO@
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Recommends: lib@PVER@-stdlib
|
||||
Replaces: @PVER@ (<< 2.7.4-2), @PVER@-minimal (<< 2.7.3-10), lib@PVER@-stdlib (<< 2.7.8-7)
|
||||
Breaks: @PVER@-minimal (<< 2.7.4~rc1-1~), ${python27:Breaks}
|
||||
Conflicts: binfmt-support (<< 1.1.2)
|
||||
Description: Minimal subset of the Python language (version @VER@)
|
||||
This package contains some essential modules. It is normally not
|
||||
used on it's own, but as a dependency of @PVER@-minimal.
|
||||
|
||||
Package: lib@PVER@
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Section: libs
|
||||
Priority: @PRIO@
|
||||
Pre-Depends: ${misc:Pre-Depends}
|
||||
Depends: lib@PVER@-stdlib (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
|
||||
Replaces: @PVER@ (<< 2.6)
|
||||
Description: Shared Python runtime library (version @VER@)
|
||||
Python is a high-level, interactive, object-oriented language. Its @VER@ version
|
||||
includes an extensive class library with lots of goodies for
|
||||
network programming, system administration, sounds and graphics.
|
||||
.
|
||||
This package contains the shared runtime library, normally not needed
|
||||
for programs using the statically linked interpreter.
|
||||
|
||||
Package: @PVER@-examples
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
Depends: @PVER@:any (>= ${source:Version}), ${misc:Depends}
|
||||
Description: Examples for the Python language (v@VER@)
|
||||
Examples, Demos and Tools for Python (v@VER@). These are files included in
|
||||
the upstream Python distribution (v@VER@).
|
||||
|
||||
Package: @PVER@-dev
|
||||
Architecture: any
|
||||
Multi-Arch: allowed
|
||||
Depends: @PVER@ (= ${binary:Version}), lib@PVER@-dev (= ${binary:Version}), lib@PVER@ (= ${binary:Version}), libexpat1-dev, ${shlibs:Depends}, ${misc:Depends}
|
||||
Recommends: libc6-dev | libc-dev
|
||||
Replaces: @PVER@ (<< 2.7-3)
|
||||
Description: Header files and a static library for Python (v@VER@)
|
||||
Header files, a static library and development tools for building
|
||||
Python (v@VER@) modules, extending the Python interpreter or embedding
|
||||
Python (v@VER@) in applications.
|
||||
.
|
||||
Maintainers of Python packages should read README.maintainers.
|
||||
|
||||
Package: lib@PVER@-dev
|
||||
Section: libdevel
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Pre-Depends: ${misc:Pre-Depends}
|
||||
Depends: lib@PVER@-stdlib (= ${binary:Version}), lib@PVER@ (= ${binary:Version}), libexpat1-dev, ${shlibs:Depends}, ${misc:Depends}
|
||||
Replaces: @PVER@ (<< 2.7-3), @PVER@-dev (<< 2.7.3-10), @PVER@-minimal (<< 2.7.3-10)
|
||||
Recommends: libc6-dev | libc-dev
|
||||
Description: Header files and a static library for Python (v@VER@)
|
||||
Header files, a static library and development tools for building
|
||||
Python (v@VER@) modules, extending the Python interpreter or embedding
|
||||
Python (v@VER@) in applications.
|
||||
.
|
||||
Maintainers of Python packages should read README.maintainers.
|
||||
.
|
||||
This package contains development files. It is normally not
|
||||
used on it's own, but as a dependency of @PVER@-dev.
|
||||
|
||||
Package: lib@PVER@-testsuite
|
||||
Section: libdevel
|
||||
Architecture: all
|
||||
Depends: lib@PVER@-stdlib (>= ${binary:Version}), ${misc:Depends}
|
||||
Suggests: python-gdbm, python-tk
|
||||
Description: Testsuite for the Python standard library (v@VER@)
|
||||
The complete testsuite for the Python standard library. Note that
|
||||
a subset is found in the lib@PVER@-stdlib package, which should
|
||||
be enough for other packages to use (please do not build-depend
|
||||
on this package, but file a bug report to include additional
|
||||
testsuite files in the lib@PVER@-stdlib package).
|
||||
|
||||
Package: idle-@PVER@
|
||||
Architecture: all
|
||||
Depends: @PVER@, python-tk (>= 2.6~a3), @PVER@-tk, ${misc:Depends}
|
||||
Enhances: @PVER@
|
||||
Replaces: @PVER@ (<< 2.6.1-2)
|
||||
Description: IDE for Python (v@VER@) using Tkinter
|
||||
IDLE is an Integrated Development Environment for Python (v@VER@).
|
||||
IDLE is written using Tkinter and therefore quite platform-independent.
|
||||
|
||||
Package: @PVER@-doc
|
||||
Section: doc
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
Depends: libjs-jquery, libjs-underscore, ${misc:Depends}
|
||||
Suggests: @PVER@
|
||||
Description: Documentation for the high-level object-oriented language Python (v@VER@)
|
||||
These is the official set of documentation for the interactive high-level
|
||||
object-oriented language Python (v@VER@). All documents are provided
|
||||
in HTML format. The package consists of ten documents:
|
||||
.
|
||||
* What's New in Python@VER@
|
||||
* Tutorial
|
||||
* Python Library Reference
|
||||
* Macintosh Module Reference
|
||||
* Python Language Reference
|
||||
* Extending and Embedding Python
|
||||
* Python/C API Reference
|
||||
* Installing Python Modules
|
||||
* Documenting Python
|
||||
* Distributing Python Modules
|
||||
|
||||
Package: @PVER@-dbg
|
||||
Section: debug
|
||||
Architecture: any
|
||||
Multi-Arch: allowed
|
||||
Depends: @PVER@ (= ${binary:Version}), lib@PVER@-dbg (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
|
||||
Suggests: python-gdbm-dbg, python-tk-dbg
|
||||
Description: Debug Build of the Python Interpreter (version @VER@)
|
||||
The package holds two things:
|
||||
.
|
||||
- A Python interpreter configured with --pydebug. Dynamically loaded modules
|
||||
are searched as <foo>_d.so first. Third party extensions need a separate
|
||||
build to be used by this interpreter.
|
||||
- Debug information for standard python interpreter and extensions.
|
||||
.
|
||||
See the README.debug for more information.
|
||||
|
||||
Package: lib@PVER@-dbg
|
||||
Section: debug
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Pre-Depends: ${misc:Pre-Depends}
|
||||
Depends: lib@PVER@-stdlib (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
|
||||
Suggests: @PVER@-gdbm-dbg, @PVER@-tk-dbg
|
||||
Replaces: @PVER@-dbg (<< 2.7.3-10)
|
||||
Description: Debug Build of the Python Interpreter (version @VER@)
|
||||
The package holds two things:
|
||||
.
|
||||
- Extensions for a Python interpreter configured with --pydebug.
|
||||
- Debug information for standard python extensions.
|
||||
.
|
||||
See the README.debug for more information.
|
||||
|
||||
16
debian/control.stdlib
vendored
Normal file
16
debian/control.stdlib
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
Package: @PVER@-tk
|
||||
Architecture: any
|
||||
Depends: @PVER@ (= ${Source-Version}), ${shlibs:Depends}
|
||||
Suggests: tix
|
||||
XB-Python-Version: @VER@
|
||||
Description: Tkinter - Writing Tk applications with Python (v@VER@)
|
||||
A module for writing portable GUI applications with Python (v@VER@) using Tk.
|
||||
Also known as Tkinter.
|
||||
|
||||
Package: @PVER@-gdbm
|
||||
Architecture: any
|
||||
Depends: @PVER@ (= ${Source-Version}), ${shlibs:Depends}
|
||||
Description: GNU dbm database support for Python (v@VER@)
|
||||
GNU dbm database module for Python. Install this if you want to
|
||||
create or read GNU dbm database files with Python.
|
||||
|
||||
958
debian/copyright
vendored
Normal file
958
debian/copyright
vendored
Normal file
@@ -0,0 +1,958 @@
|
||||
This package was put together by Klee Dienes <klee@debian.org> from
|
||||
sources from ftp.python.org:/pub/python, based on the Debianization by
|
||||
the previous maintainers Bernd S. Brentrup <bsb@uni-muenster.de> and
|
||||
Bruce Perens. Current maintainer is Matthias Klose <doko@debian.org>.
|
||||
|
||||
It was downloaded from http://python.org/
|
||||
|
||||
Copyright:
|
||||
|
||||
Upstream Author: Guido van Rossum <guido@cwi.nl> and others.
|
||||
|
||||
License:
|
||||
|
||||
The following text includes the Python license and licenses and
|
||||
acknowledgements for incorporated software. The licenses can be read
|
||||
in the HTML and texinfo versions of the documentation as well, after
|
||||
installing the pythonx.y-doc package. Licenses for files not licensed
|
||||
under the Python Licenses are found at the end of this file.
|
||||
|
||||
|
||||
Python License
|
||||
==============
|
||||
|
||||
A. HISTORY OF THE SOFTWARE
|
||||
==========================
|
||||
|
||||
Python was created in the early 1990s by Guido van Rossum at Stichting
|
||||
Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands
|
||||
as a successor of a language called ABC. Guido remains Python's
|
||||
principal author, although it includes many contributions from others.
|
||||
|
||||
In 1995, Guido continued his work on Python at the Corporation for
|
||||
National Research Initiatives (CNRI, see http://www.cnri.reston.va.us)
|
||||
in Reston, Virginia where he released several versions of the
|
||||
software.
|
||||
|
||||
In May 2000, Guido and the Python core development team moved to
|
||||
BeOpen.com to form the BeOpen PythonLabs team. In October of the same
|
||||
year, the PythonLabs team moved to Digital Creations (now Zope
|
||||
Corporation, see http://www.zope.com). In 2001, the Python Software
|
||||
Foundation (PSF, see http://www.python.org/psf/) was formed, a
|
||||
non-profit organization created specifically to own Python-related
|
||||
Intellectual Property. Zope Corporation is a sponsoring member of
|
||||
the PSF.
|
||||
|
||||
All Python releases are Open Source (see http://www.opensource.org for
|
||||
the Open Source Definition). Historically, most, but not all, Python
|
||||
releases have also been GPL-compatible; the table below summarizes
|
||||
the various releases.
|
||||
|
||||
Release Derived Year Owner GPL-
|
||||
from compatible? (1)
|
||||
|
||||
0.9.0 thru 1.2 1991-1995 CWI yes
|
||||
1.3 thru 1.5.2 1.2 1995-1999 CNRI yes
|
||||
1.6 1.5.2 2000 CNRI no
|
||||
2.0 1.6 2000 BeOpen.com no
|
||||
1.6.1 1.6 2001 CNRI yes (2)
|
||||
2.1 2.0+1.6.1 2001 PSF no
|
||||
2.0.1 2.0+1.6.1 2001 PSF yes
|
||||
2.1.1 2.1+2.0.1 2001 PSF yes
|
||||
2.2 2.1.1 2001 PSF yes
|
||||
2.1.2 2.1.1 2002 PSF yes
|
||||
2.1.3 2.1.2 2002 PSF yes
|
||||
2.2.1 2.2 2002 PSF yes
|
||||
2.2.2 2.2.1 2002 PSF yes
|
||||
2.2.3 2.2.2 2003 PSF yes
|
||||
2.3 2.2.2 2002-2003 PSF yes
|
||||
2.3.1 2.3 2002-2003 PSF yes
|
||||
2.3.2 2.3.1 2002-2003 PSF yes
|
||||
2.3.3 2.3.2 2002-2003 PSF yes
|
||||
2.3.4 2.3.3 2004 PSF yes
|
||||
2.3.5 2.3.4 2005 PSF yes
|
||||
2.4 2.3 2004 PSF yes
|
||||
2.4.1 2.4 2005 PSF yes
|
||||
2.4.2 2.4.1 2005 PSF yes
|
||||
2.4.3 2.4.2 2006 PSF yes
|
||||
2.5 2.4 2006 PSF yes
|
||||
2.5.1 2.5 2007 PSF yes
|
||||
2.5.2 2.5.1 2008 PSF yes
|
||||
2.5.3 2.5.2 2008 PSF yes
|
||||
2.6 2.5 2008 PSF yes
|
||||
2.6.1 2.6 2008 PSF yes
|
||||
2.6.2 2.6.1 2009 PSF yes
|
||||
2.6.3 2.6.2 2009 PSF yes
|
||||
2.6.4 2.6.3 2009 PSF yes
|
||||
2.6.5 2.6.4 2010 PSF yes
|
||||
2.7 2.6 2010 PSF yes
|
||||
|
||||
Footnotes:
|
||||
|
||||
(1) GPL-compatible doesn't mean that we're distributing Python under
|
||||
the GPL. All Python licenses, unlike the GPL, let you distribute
|
||||
a modified version without making your changes open source. The
|
||||
GPL-compatible licenses make it possible to combine Python with
|
||||
other software that is released under the GPL; the others don't.
|
||||
|
||||
(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
|
||||
because its license has a choice of law clause. According to
|
||||
CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
|
||||
is "not incompatible" with the GPL.
|
||||
|
||||
Thanks to the many outside volunteers who have worked under Guido's
|
||||
direction to make these releases possible.
|
||||
|
||||
|
||||
B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
|
||||
===============================================================
|
||||
|
||||
PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
|
||||
--------------------------------------------
|
||||
|
||||
1. This LICENSE AGREEMENT is between the Python Software Foundation
|
||||
("PSF"), and the Individual or Organization ("Licensee") accessing and
|
||||
otherwise using this software ("Python") in source or binary form and
|
||||
its associated documentation.
|
||||
|
||||
2. Subject to the terms and conditions of this License Agreement, PSF
|
||||
hereby grants Licensee a nonexclusive, royalty-free, world-wide
|
||||
license to reproduce, analyze, test, perform and/or display publicly,
|
||||
prepare derivative works, distribute, and otherwise use Python
|
||||
alone or in any derivative version, provided, however, that PSF's
|
||||
License Agreement and PSF's notice of copyright, i.e., "Copyright (c)
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007 Python Software Foundation;
|
||||
All Rights Reserved" are retained in Python alone or in any derivative
|
||||
version prepared by Licensee.
|
||||
|
||||
3. In the event Licensee prepares a derivative work that is based on
|
||||
or incorporates Python or any part thereof, and wants to make
|
||||
the derivative work available to others as provided herein, then
|
||||
Licensee hereby agrees to include in any such work a brief summary of
|
||||
the changes made to Python.
|
||||
|
||||
4. PSF is making Python available to Licensee on an "AS IS"
|
||||
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
||||
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
|
||||
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
||||
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
|
||||
INFRINGE ANY THIRD PARTY RIGHTS.
|
||||
|
||||
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
|
||||
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
|
||||
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
|
||||
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
||||
|
||||
6. This License Agreement will automatically terminate upon a material
|
||||
breach of its terms and conditions.
|
||||
|
||||
7. Nothing in this License Agreement shall be deemed to create any
|
||||
relationship of agency, partnership, or joint venture between PSF and
|
||||
Licensee. This License Agreement does not grant permission to use PSF
|
||||
trademarks or trade name in a trademark sense to endorse or promote
|
||||
products or services of Licensee, or any third party.
|
||||
|
||||
8. By copying, installing or otherwise using Python, Licensee
|
||||
agrees to be bound by the terms and conditions of this License
|
||||
Agreement.
|
||||
|
||||
|
||||
BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
|
||||
-------------------------------------------
|
||||
|
||||
BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
|
||||
|
||||
1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
|
||||
office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
|
||||
Individual or Organization ("Licensee") accessing and otherwise using
|
||||
this software in source or binary form and its associated
|
||||
documentation ("the Software").
|
||||
|
||||
2. Subject to the terms and conditions of this BeOpen Python License
|
||||
Agreement, BeOpen hereby grants Licensee a non-exclusive,
|
||||
royalty-free, world-wide license to reproduce, analyze, test, perform
|
||||
and/or display publicly, prepare derivative works, distribute, and
|
||||
otherwise use the Software alone or in any derivative version,
|
||||
provided, however, that the BeOpen Python License is retained in the
|
||||
Software, alone or in any derivative version prepared by Licensee.
|
||||
|
||||
3. BeOpen is making the Software available to Licensee on an "AS IS"
|
||||
basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
||||
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
|
||||
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
||||
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
|
||||
INFRINGE ANY THIRD PARTY RIGHTS.
|
||||
|
||||
4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
|
||||
SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
|
||||
AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
|
||||
DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
||||
|
||||
5. This License Agreement will automatically terminate upon a material
|
||||
breach of its terms and conditions.
|
||||
|
||||
6. This License Agreement shall be governed by and interpreted in all
|
||||
respects by the law of the State of California, excluding conflict of
|
||||
law provisions. Nothing in this License Agreement shall be deemed to
|
||||
create any relationship of agency, partnership, or joint venture
|
||||
between BeOpen and Licensee. This License Agreement does not grant
|
||||
permission to use BeOpen trademarks or trade names in a trademark
|
||||
sense to endorse or promote products or services of Licensee, or any
|
||||
third party. As an exception, the "BeOpen Python" logos available at
|
||||
http://www.pythonlabs.com/logos.html may be used according to the
|
||||
permissions granted on that web page.
|
||||
|
||||
7. By copying, installing or otherwise using the software, Licensee
|
||||
agrees to be bound by the terms and conditions of this License
|
||||
Agreement.
|
||||
|
||||
|
||||
CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
|
||||
---------------------------------------
|
||||
|
||||
1. This LICENSE AGREEMENT is between the Corporation for National
|
||||
Research Initiatives, having an office at 1895 Preston White Drive,
|
||||
Reston, VA 20191 ("CNRI"), and the Individual or Organization
|
||||
("Licensee") accessing and otherwise using Python 1.6.1 software in
|
||||
source or binary form and its associated documentation.
|
||||
|
||||
2. Subject to the terms and conditions of this License Agreement, CNRI
|
||||
hereby grants Licensee a nonexclusive, royalty-free, world-wide
|
||||
license to reproduce, analyze, test, perform and/or display publicly,
|
||||
prepare derivative works, distribute, and otherwise use Python 1.6.1
|
||||
alone or in any derivative version, provided, however, that CNRI's
|
||||
License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
|
||||
1995-2001 Corporation for National Research Initiatives; All Rights
|
||||
Reserved" are retained in Python 1.6.1 alone or in any derivative
|
||||
version prepared by Licensee. Alternately, in lieu of CNRI's License
|
||||
Agreement, Licensee may substitute the following text (omitting the
|
||||
quotes): "Python 1.6.1 is made available subject to the terms and
|
||||
conditions in CNRI's License Agreement. This Agreement together with
|
||||
Python 1.6.1 may be located on the Internet using the following
|
||||
unique, persistent identifier (known as a handle): 1895.22/1013. This
|
||||
Agreement may also be obtained from a proxy server on the Internet
|
||||
using the following URL: http://hdl.handle.net/1895.22/1013".
|
||||
|
||||
3. In the event Licensee prepares a derivative work that is based on
|
||||
or incorporates Python 1.6.1 or any part thereof, and wants to make
|
||||
the derivative work available to others as provided herein, then
|
||||
Licensee hereby agrees to include in any such work a brief summary of
|
||||
the changes made to Python 1.6.1.
|
||||
|
||||
4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
|
||||
basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
||||
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
|
||||
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
||||
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
|
||||
INFRINGE ANY THIRD PARTY RIGHTS.
|
||||
|
||||
5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
|
||||
1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
|
||||
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
|
||||
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
||||
|
||||
6. This License Agreement will automatically terminate upon a material
|
||||
breach of its terms and conditions.
|
||||
|
||||
7. This License Agreement shall be governed by the federal
|
||||
intellectual property law of the United States, including without
|
||||
limitation the federal copyright law, and, to the extent such
|
||||
U.S. federal law does not apply, by the law of the Commonwealth of
|
||||
Virginia, excluding Virginia's conflict of law provisions.
|
||||
Notwithstanding the foregoing, with regard to derivative works based
|
||||
on Python 1.6.1 that incorporate non-separable material that was
|
||||
previously distributed under the GNU General Public License (GPL), the
|
||||
law of the Commonwealth of Virginia shall govern this License
|
||||
Agreement only as to issues arising under or with respect to
|
||||
Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this
|
||||
License Agreement shall be deemed to create any relationship of
|
||||
agency, partnership, or joint venture between CNRI and Licensee. This
|
||||
License Agreement does not grant permission to use CNRI trademarks or
|
||||
trade name in a trademark sense to endorse or promote products or
|
||||
services of Licensee, or any third party.
|
||||
|
||||
8. By clicking on the "ACCEPT" button where indicated, or by copying,
|
||||
installing or otherwise using Python 1.6.1, Licensee agrees to be
|
||||
bound by the terms and conditions of this License Agreement.
|
||||
|
||||
ACCEPT
|
||||
|
||||
|
||||
CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
|
||||
--------------------------------------------------
|
||||
|
||||
Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
|
||||
The Netherlands. All rights reserved.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose and without fee is hereby granted,
|
||||
provided that the above copyright notice appear in all copies and that
|
||||
both that copyright notice and this permission notice appear in
|
||||
supporting documentation, and that the name of Stichting Mathematisch
|
||||
Centrum or CWI not be used in advertising or publicity pertaining to
|
||||
distribution of the software without specific, written prior
|
||||
permission.
|
||||
|
||||
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
|
||||
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
|
||||
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
Licenses and Acknowledgements for Incorporated Software
|
||||
=======================================================
|
||||
|
||||
Mersenne Twister
|
||||
----------------
|
||||
|
||||
The `_random' module includes code based on a download from
|
||||
`http://www.math.keio.ac.jp/~matumoto/MT2002/emt19937ar.html'. The
|
||||
following are the verbatim comments from the original code:
|
||||
|
||||
A C-program for MT19937, with initialization improved 2002/1/26.
|
||||
Coded by Takuji Nishimura and Makoto Matsumoto.
|
||||
|
||||
Before using, initialize the state by using init_genrand(seed)
|
||||
or init_by_array(init_key, key_length).
|
||||
|
||||
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The names of its contributors may not be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Any feedback is very welcome.
|
||||
http://www.math.keio.ac.jp/matumoto/emt.html
|
||||
email: matumoto@math.keio.ac.jp
|
||||
|
||||
|
||||
Sockets
|
||||
-------
|
||||
|
||||
The `socket' module uses the functions, `getaddrinfo', and
|
||||
`getnameinfo', which are coded in separate source files from the WIDE
|
||||
Project, `http://www.wide.ad.jp/about/index.html'.
|
||||
|
||||
Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the project nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
||||
GAI_ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
|
||||
FOR GAI_ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON GAI_ANY THEORY OF LIABILITY, WHETHER
|
||||
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN GAI_ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
Floating point exception control
|
||||
--------------------------------
|
||||
|
||||
The source for the `fpectl' module includes the following notice:
|
||||
|
||||
---------------------------------------------------------------------
|
||||
/ Copyright (c) 1996. \
|
||||
| The Regents of the University of California. |
|
||||
| All rights reserved. |
|
||||
| |
|
||||
| Permission to use, copy, modify, and distribute this software for |
|
||||
| any purpose without fee is hereby granted, provided that this en- |
|
||||
| tire notice is included in all copies of any software which is or |
|
||||
| includes a copy or modification of this software and in all |
|
||||
| copies of the supporting documentation for such software. |
|
||||
| |
|
||||
| This work was produced at the University of California, Lawrence |
|
||||
| Livermore National Laboratory under contract no. W-7405-ENG-48 |
|
||||
| between the U.S. Department of Energy and The Regents of the |
|
||||
| University of California for the operation of UC LLNL. |
|
||||
| |
|
||||
| DISCLAIMER |
|
||||
| |
|
||||
| This software was prepared as an account of work sponsored by an |
|
||||
| agency of the United States Government. Neither the United States |
|
||||
| Government nor the University of California nor any of their em- |
|
||||
| ployees, makes any warranty, express or implied, or assumes any |
|
||||
| liability or responsibility for the accuracy, completeness, or |
|
||||
| usefulness of any information, apparatus, product, or process |
|
||||
| disclosed, or represents that its use would not infringe |
|
||||
| privately-owned rights. Reference herein to any specific commer- |
|
||||
| cial products, process, or service by trade name, trademark, |
|
||||
| manufacturer, or otherwise, does not necessarily constitute or |
|
||||
| imply its endorsement, recommendation, or favoring by the United |
|
||||
| States Government or the University of California. The views and |
|
||||
| opinions of authors expressed herein do not necessarily state or |
|
||||
| reflect those of the United States Government or the University |
|
||||
| of California, and shall not be used for advertising or product |
|
||||
\ endorsement purposes. /
|
||||
---------------------------------------------------------------------
|
||||
|
||||
|
||||
Cookie management
|
||||
-----------------
|
||||
|
||||
The `Cookie' module contains the following notice:
|
||||
|
||||
Copyright 2000 by Timothy O'Malley <timo@alum.mit.edu>
|
||||
|
||||
All Rights Reserved
|
||||
|
||||
Permission to use, copy, modify, and distribute this software
|
||||
and its documentation for any purpose and without fee is hereby
|
||||
granted, provided that the above copyright notice appear in all
|
||||
copies and that both that copyright notice and this permission
|
||||
notice appear in supporting documentation, and that the name of
|
||||
Timothy O'Malley not be used in advertising or publicity
|
||||
pertaining to distribution of the software without specific, written
|
||||
prior permission.
|
||||
|
||||
Timothy O'Malley DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
|
||||
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS, IN NO EVENT SHALL Timothy O'Malley BE LIABLE FOR
|
||||
ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||
ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
Execution tracing
|
||||
-----------------
|
||||
|
||||
The `trace' module contains the following notice:
|
||||
|
||||
portions copyright 2001, Autonomous Zones Industries, Inc., all rights...
|
||||
err... reserved and offered to the public under the terms of the
|
||||
Python 2.2 license.
|
||||
Author: Zooko O'Whielacronx
|
||||
http://zooko.com/
|
||||
mailto:zooko@zooko.com
|
||||
|
||||
Copyright 2000, Mojam Media, Inc., all rights reserved.
|
||||
Author: Skip Montanaro
|
||||
|
||||
Copyright 1999, Bioreason, Inc., all rights reserved.
|
||||
Author: Andrew Dalke
|
||||
|
||||
Copyright 1995-1997, Automatrix, Inc., all rights reserved.
|
||||
Author: Skip Montanaro
|
||||
|
||||
Copyright 1991-1995, Stichting Mathematisch Centrum, all rights reserved.
|
||||
|
||||
Permission to use, copy, modify, and distribute this Python software and
|
||||
its associated documentation for any purpose without fee is hereby
|
||||
granted, provided that the above copyright notice appears in all copies,
|
||||
and that both that copyright notice and this permission notice appear in
|
||||
supporting documentation, and that the name of neither Automatrix,
|
||||
Bioreason or Mojam Media be used in advertising or publicity pertaining
|
||||
to distribution of the software without specific, written prior
|
||||
permission.
|
||||
|
||||
|
||||
UUencode and UUdecode functions
|
||||
-------------------------------
|
||||
|
||||
The `uu' module contains the following notice:
|
||||
|
||||
Copyright 1994 by Lance Ellinghouse
|
||||
Cathedral City, California Republic, United States of America.
|
||||
All Rights Reserved
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose and without fee is hereby granted,
|
||||
provided that the above copyright notice appear in all copies and that
|
||||
both that copyright notice and this permission notice appear in
|
||||
supporting documentation, and that the name of Lance Ellinghouse
|
||||
not be used in advertising or publicity pertaining to distribution
|
||||
of the software without specific, written prior permission.
|
||||
LANCE ELLINGHOUSE DISCLAIMS ALL WARRANTIES WITH REGARD TO
|
||||
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS, IN NO EVENT SHALL LANCE ELLINGHOUSE CENTRUM BE LIABLE
|
||||
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
Modified by Jack Jansen, CWI, July 1995:
|
||||
- Use binascii module to do the actual line-by-line conversion
|
||||
between ascii and binary. This results in a 1000-fold speedup. The C
|
||||
version is still 5 times faster, though.
|
||||
- Arguments more compliant with python standard
|
||||
|
||||
|
||||
XML Remote Procedure Calls
|
||||
--------------------------
|
||||
|
||||
The `xmlrpclib' module contains the following notice:
|
||||
|
||||
The XML-RPC client interface is
|
||||
|
||||
Copyright (c) 1999-2002 by Secret Labs AB
|
||||
Copyright (c) 1999-2002 by Fredrik Lundh
|
||||
|
||||
By obtaining, using, and/or copying this software and/or its
|
||||
associated documentation, you agree that you have read, understood,
|
||||
and will comply with the following terms and conditions:
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and
|
||||
its associated documentation for any purpose and without fee is
|
||||
hereby granted, provided that the above copyright notice appears in
|
||||
all copies, and that both that copyright notice and this permission
|
||||
notice appear in supporting documentation, and that the name of
|
||||
Secret Labs AB or the author not be used in advertising or publicity
|
||||
pertaining to distribution of the software without specific, written
|
||||
prior permission.
|
||||
|
||||
SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
|
||||
TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT-
|
||||
ABILITY AND FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR
|
||||
BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
|
||||
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||
ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||
OF THIS SOFTWARE.
|
||||
|
||||
Licenses for Software linked to
|
||||
===============================
|
||||
|
||||
Note that the choice of GPL compatibility outlined above doesn't extend
|
||||
to modules linked to particular libraries, since they change the
|
||||
effective License of the module binary.
|
||||
|
||||
|
||||
GNU Readline
|
||||
------------
|
||||
|
||||
The 'readline' module makes use of GNU Readline.
|
||||
|
||||
The GNU Readline Library is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2, or (at
|
||||
your option) any later version.
|
||||
|
||||
On Debian systems, you can find the complete statement in
|
||||
/usr/share/doc/readline-common/copyright'. A copy of the GNU General
|
||||
Public License is available in /usr/share/common-licenses/GPL-2'.
|
||||
|
||||
|
||||
OpenSSL
|
||||
-------
|
||||
|
||||
The '_ssl' module makes use of OpenSSL.
|
||||
|
||||
The OpenSSL toolkit stays under a dual license, i.e. both the
|
||||
conditions of the OpenSSL License and the original SSLeay license
|
||||
apply to the toolkit. Actually both licenses are BSD-style Open
|
||||
Source licenses. Note that both licenses are incompatible with
|
||||
the GPL.
|
||||
|
||||
On Debian systems, you can find the complete license text in
|
||||
/usr/share/doc/openssl/copyright'.
|
||||
|
||||
|
||||
Files with other licenses than the Python License
|
||||
-------------------------------------------------
|
||||
|
||||
Files: Lib/profile.py Lib/pstats.py
|
||||
Copyright: Disney Enterprises, Inc. All Rights Reserved.
|
||||
License: # Licensed to PSF under a Contributor Agreement
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||
either express or implied. See the License for the specific language
|
||||
overning permissions and limitations under the License.
|
||||
|
||||
On Debian systems, the Apache 2.0 license can be found in
|
||||
/usr/share/common-licenses/Apache-2.0.
|
||||
|
||||
Files: Modules/zlib/*
|
||||
Copyright: (C) 1995-2010 Jean-loup Gailly and Mark Adler
|
||||
License: This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Jean-loup Gailly Mark Adler
|
||||
jloup@gzip.org madler@alumni.caltech.edu
|
||||
|
||||
If you use the zlib library in a product, we would appreciate *not* receiving
|
||||
lengthy legal documents to sign. The sources are provided for free but without
|
||||
warranty of any kind. The library has been entirely written by Jean-loup
|
||||
Gailly and Mark Adler; it does not include third-party code.
|
||||
|
||||
Files: Modules/_ctypes/libffi/*
|
||||
Copyright: Copyright (C) 1996-2009 Red Hat, Inc and others.
|
||||
License: 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.
|
||||
|
||||
Documentation:
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version. A copy of the license is included in the
|
||||
section entitled ``GNU General Public License''.
|
||||
|
||||
Files: Modules/expat/*
|
||||
Copyright: Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
|
||||
and Clark Cooper
|
||||
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers
|
||||
License: 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.
|
||||
|
||||
Files: Misc/python-mode.el
|
||||
Copyright: Copyright (C) 1992,1993,1994 Tim Peters
|
||||
License: This software is provided as-is, without express or implied
|
||||
warranty. Permission to use, copy, modify, distribute or sell this
|
||||
software, without fee, for any purpose and by any individual or
|
||||
organization, is hereby granted, provided that the above copyright
|
||||
notice and this paragraph appear in all copies.
|
||||
|
||||
Files: PC/_subprocess.c
|
||||
Copyright: Copyright (c) 2004 by Fredrik Lundh <fredrik@pythonware.com>
|
||||
Copyright (c) 2004 by Secret Labs AB, http://www.pythonware.com
|
||||
Copyright (c) 2004 by Peter Astrand <astrand@lysator.liu.se>
|
||||
License:
|
||||
* Permission to use, copy, modify, and distribute this software and
|
||||
* its associated documentation for any purpose and without fee is
|
||||
* hereby granted, provided that the above copyright notice appears in
|
||||
* all copies, and that both that copyright notice and this permission
|
||||
* notice appear in supporting documentation, and that the name of the
|
||||
* authors not be used in advertising or publicity pertaining to
|
||||
* distribution of the software without specific, written prior
|
||||
* permission.
|
||||
*
|
||||
* THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
|
||||
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
Files: PC/winsound.c
|
||||
Copyright: Copyright (c) 1999 Toby Dickenson
|
||||
License: * Permission to use this software in any way is granted without
|
||||
* fee, provided that the copyright notice above appears in all
|
||||
* copies. This software is provided "as is" without any warranty.
|
||||
*/
|
||||
|
||||
/* Modified by Guido van Rossum */
|
||||
/* Beep added by Mark Hammond */
|
||||
/* Win9X Beep and platform identification added by Uncle Timmy */
|
||||
|
||||
Files: Lib/ensurepip/_bundled/setuptools-*.whl
|
||||
License: see above, some license as Python.
|
||||
|
||||
Files: Lib/ensurepip/_bundled/pip-*.whl
|
||||
Copyright: Copyright © 2008-2013 The pip developers:
|
||||
Alex Grönholm
|
||||
Alex Morega
|
||||
Alexandre Conrad
|
||||
Andrey Bulgakov
|
||||
Antti Kaihola
|
||||
Armin Ronacher
|
||||
Aziz Köksal
|
||||
Ben Rosser
|
||||
Brian Rosner
|
||||
Carl Meyer
|
||||
Chris McDonough
|
||||
Christian Oudard
|
||||
Clay McClure
|
||||
Cody Soyland
|
||||
Daniel Holth
|
||||
Dave Abrahams
|
||||
David (d1b)
|
||||
Dmitry Gladkov
|
||||
Donald Stufft
|
||||
Francesco
|
||||
Geoffrey Lehée
|
||||
Georgi Valkov
|
||||
Hugo Lopes Tavares
|
||||
Ian Bicking
|
||||
Igor Sobreira
|
||||
Ionel Maries Cristian
|
||||
Jakub Vysoky
|
||||
James Cleveland
|
||||
Jannis Leidel
|
||||
Jay Graves
|
||||
John-Scott Atlakson
|
||||
Jon Parise
|
||||
Jonas Nockert
|
||||
Josh Bronson
|
||||
Kamal Bin Mustafa
|
||||
Kelsey Hightower
|
||||
Kenneth Belitzky
|
||||
Kumar McMillan
|
||||
Luke Macken
|
||||
Masklinn
|
||||
Marc Abramowitz
|
||||
Marcus Smith
|
||||
Markus Hametner
|
||||
Matt Maker
|
||||
Maxime R.
|
||||
Miguel Araujo
|
||||
Nick Stenning
|
||||
Nowell Strite
|
||||
Oliver Tonnhofer
|
||||
Olivier Girardot
|
||||
Patrick Jenkins
|
||||
Paul Moore
|
||||
Paul Nasrat
|
||||
Paul Oswald
|
||||
Paul van der Linden
|
||||
Peter Waller
|
||||
Phil Whelan
|
||||
Piet Delport
|
||||
Przemek Wrzos
|
||||
Qiangning Hong
|
||||
Rafael Caricio
|
||||
Rene Dudfield
|
||||
Roey Berman
|
||||
Ronny Pfannschmidt
|
||||
Rory McCann
|
||||
Simon Cross
|
||||
Stavros Korokithakis
|
||||
Thomas Fenzl
|
||||
Thomas Johansson
|
||||
Vinay Sajip
|
||||
Vitaly Babiy
|
||||
W Trevor King
|
||||
Wil Tan
|
||||
Hsiaoming Yang
|
||||
License: Expat
|
||||
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.
|
||||
|
||||
Files: Lib/ensurepip/_bundled/pip-*.whl/pip/_vendor/ipaddress.py
|
||||
Copyright: 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Python Software Foundation; All Rights Reserved
|
||||
2007 Google Inc.
|
||||
License: PSF-2
|
||||
|
||||
Files: Lib/ensurepip/_bundled/pip-*.whl/pip/_vendor/retrying.py
|
||||
Copyright: (c) 2013-2014, <ray@blacklocus.com>
|
||||
(c) 2014, Derek Wilson <dwilson@domaintools.com>
|
||||
(c) 2014, Alex Kuang <akuang@bizo.com>
|
||||
License: Apache-2
|
||||
|
||||
License: Apache-2
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
.
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
.
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
.
|
||||
On Debian-based systems the full text of the Apache version 2.0 license
|
||||
can be found in /usr/share/common-licenses/Apache-2.0.
|
||||
|
||||
Files: Lib/ensurepip/_bundled/pip-*.whl/pip/_vendor/six.py
|
||||
Copyright: Copyright (c) 2010-2014 Benjamin Peterson
|
||||
License: Expat
|
||||
|
||||
Files: Lib/ensurepip/_bundled/pip-*.whl/pip/_vendor/cachecontrol
|
||||
Copyright: 2015 Eric Larson
|
||||
License: Apache-2.0
|
||||
Copyright 2015 Eric Larson
|
||||
.
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
.
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
.
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied.
|
||||
.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
.
|
||||
On Debian systems, the license is available at
|
||||
/usr/share/common-licenses/Apache-2.0
|
||||
|
||||
Files: Lib/ensurepip/_bundled/pip-*.whl/pip/_vendor/colorama
|
||||
Files: Lib/ensurepip/_bundled/pip-*.whl/pip/_vendor/distlib
|
||||
Copyright: Copyright (C) 2012-2013 The Python Software Foundation
|
||||
Copyright (C) 2012-2013 Vinay Sajip
|
||||
License: Python
|
||||
|
||||
Files: Lib/ensurepip/_bundled/pip-*.whl/pip/_vendor/html5lib
|
||||
html5lib is Copyright (c) 2006 The Authors
|
||||
Authors:
|
||||
James Graham - james@hoppipolla.co.uk
|
||||
Anne van Kesteren - annevankesteren@gmail.com
|
||||
Lachlan Hunt - lachlan.hunt@lachy.id.au
|
||||
Matt McDonald - kanashii@kanashii.ca
|
||||
Sam Ruby - rubys@intertwingly.net
|
||||
Ian Hickson (Google) - ian@hixie.ch
|
||||
Thomas Broyer - t.broyer@gmail.com
|
||||
|
||||
License:
|
||||
|
||||
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.
|
||||
|
||||
Files: Lib/ensurepip/_bundled/pip-*.whl/pip/_vendor/lockfile
|
||||
Copyright:
|
||||
© 2014–2015 OpenStack Foundation <openstack-dev@lists.openstack.org>
|
||||
© 2007–2012 Skip Montanaro <skip@pobox.com>
|
||||
© 2008–2014 Ben Finney <ben+python@benfinney.id.au>
|
||||
License: Expat
|
||||
|
||||
Files: Lib/ensurepip/_bundled/pip-*.whl/pip/_vendor/packaging
|
||||
Copyright: Copyright (C) 2014 Donald Stufft
|
||||
Copyright (C) 2012-2013 Vinay Sajip
|
||||
License: Apache-2.0
|
||||
|
||||
Files: Lib/ensurepip/_bundled/pip-*.whl/pip/_vendor/progress
|
||||
Copyright: Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com>
|
||||
License: ISC
|
||||
|
||||
Files: Lib/ensurepip/_bundled/pip-*.whl/pip/_vendor/requests
|
||||
Copyright: 2016, Kenneth Reitz
|
||||
License: Apache
|
||||
|
||||
Files: Lib/ensurepip/_bundled/pip-*.whl/pip/_vendor/requests/packages/urllib3/*
|
||||
Copyright: 2008-2016, Andrey Petrov
|
||||
License: Expat
|
||||
|
||||
Files: Lib/ensurepip/_bundled/pip-*.whl/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py
|
||||
Copyright: 2009, Raymond Hettinger
|
||||
License: Expat
|
||||
|
||||
Files: Lib/ensurepip/_bundled/pip-*.whl/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py
|
||||
Copyright: 2011, Python Software Foundation
|
||||
License: PSF-2
|
||||
|
||||
Files: Lib/ensurepip/_bundled/pip-*.whl/pip/_vendor/requests/packages/chardet/*
|
||||
Copyright: 2006-2008, Mark Pilgrim
|
||||
2012-2013, Ian Cordasco
|
||||
License: LGPL-2.1+
|
||||
199
debian/depgraph.py
vendored
Normal file
199
debian/depgraph.py
vendored
Normal file
@@ -0,0 +1,199 @@
|
||||
#! /usr/bin/python2.7
|
||||
|
||||
# Copyright 2004 Toby Dickenson
|
||||
#
|
||||
# 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.
|
||||
|
||||
|
||||
import sys, getopt, colorsys, imp, md5
|
||||
|
||||
class pydepgraphdot:
|
||||
|
||||
def main(self,argv):
|
||||
opts,args = getopt.getopt(argv,'',['mono'])
|
||||
self.colored = 1
|
||||
for o,v in opts:
|
||||
if o=='--mono':
|
||||
self.colored = 0
|
||||
self.render()
|
||||
|
||||
def fix(self,s):
|
||||
# Convert a module name to a syntactically correct node name
|
||||
return s.replace('.','_')
|
||||
|
||||
def render(self):
|
||||
p,t = self.get_data()
|
||||
|
||||
# normalise our input data
|
||||
for k,d in p.items():
|
||||
for v in d.keys():
|
||||
if not p.has_key(v):
|
||||
p[v] = {}
|
||||
|
||||
f = self.get_output_file()
|
||||
|
||||
f.write('digraph G {\n')
|
||||
#f.write('concentrate = true;\n')
|
||||
#f.write('ordering = out;\n')
|
||||
f.write('ranksep=1.0;\n')
|
||||
f.write('node [style=filled,fontname=Helvetica,fontsize=10];\n')
|
||||
allkd = p.items()
|
||||
allkd.sort()
|
||||
for k,d in allkd:
|
||||
tk = t.get(k)
|
||||
if self.use(k,tk):
|
||||
allv = d.keys()
|
||||
allv.sort()
|
||||
for v in allv:
|
||||
tv = t.get(v)
|
||||
if self.use(v,tv) and not self.toocommon(v,tv):
|
||||
f.write('%s -> %s' % ( self.fix(k),self.fix(v) ) )
|
||||
self.write_attributes(f,self.edge_attributes(k,v))
|
||||
f.write(';\n')
|
||||
f.write(self.fix(k))
|
||||
self.write_attributes(f,self.node_attributes(k,tk))
|
||||
f.write(';\n')
|
||||
f.write('}\n')
|
||||
|
||||
def write_attributes(self,f,a):
|
||||
if a:
|
||||
f.write(' [')
|
||||
f.write(','.join(a))
|
||||
f.write(']')
|
||||
|
||||
def node_attributes(self,k,type):
|
||||
a = []
|
||||
a.append('label="%s"' % self.label(k))
|
||||
if self.colored:
|
||||
a.append('fillcolor="%s"' % self.color(k,type))
|
||||
else:
|
||||
a.append('fillcolor=white')
|
||||
if self.toocommon(k,type):
|
||||
a.append('peripheries=2')
|
||||
return a
|
||||
|
||||
def edge_attributes(self,k,v):
|
||||
a = []
|
||||
weight = self.weight(k,v)
|
||||
if weight!=1:
|
||||
a.append('weight=%d' % weight)
|
||||
length = self.alien(k,v)
|
||||
if length:
|
||||
a.append('minlen=%d' % length)
|
||||
return a
|
||||
|
||||
def get_data(self):
|
||||
t = eval(sys.stdin.read())
|
||||
return t['depgraph'],t['types']
|
||||
|
||||
def get_output_file(self):
|
||||
return sys.stdout
|
||||
|
||||
def use(self,s,type):
|
||||
# Return true if this module is interesting and should be drawn. Return false
|
||||
# if it should be completely omitted. This is a default policy - please override.
|
||||
if s=='__main__':
|
||||
return 0
|
||||
#if s in ('os','sys','time','__future__','types','re','string'):
|
||||
if s in ('sys'):
|
||||
# nearly all modules use all of these... more or less. They add nothing to
|
||||
# our diagram.
|
||||
return 0
|
||||
if s.startswith('encodings.'):
|
||||
return 0
|
||||
if self.toocommon(s,type):
|
||||
# A module where we dont want to draw references _to_. Dot doesnt handle these
|
||||
# well, so it is probably best to not draw them at all.
|
||||
return 0
|
||||
return 1
|
||||
|
||||
def toocommon(self,s,type):
|
||||
# Return true if references to this module are uninteresting. Such references
|
||||
# do not get drawn. This is a default policy - please override.
|
||||
#
|
||||
if s=='__main__':
|
||||
# references *to* __main__ are never interesting. omitting them means
|
||||
# that main floats to the top of the page
|
||||
return 1
|
||||
#if type==imp.PKG_DIRECTORY:
|
||||
# # dont draw references to packages.
|
||||
# return 1
|
||||
return 0
|
||||
|
||||
def weight(self,a,b):
|
||||
# Return the weight of the dependency from a to b. Higher weights
|
||||
# usually have shorter straighter edges. Return 1 if it has normal weight.
|
||||
# A value of 4 is usually good for ensuring that a related pair of modules
|
||||
# are drawn next to each other. This is a default policy - please override.
|
||||
#
|
||||
if b.split('.')[-1].startswith('_'):
|
||||
# A module that starts with an underscore. You need a special reason to
|
||||
# import these (for example random imports _random), so draw them close
|
||||
# together
|
||||
return 4
|
||||
return 1
|
||||
|
||||
def alien(self,a,b):
|
||||
# Return non-zero if references to this module are strange, and should be drawn
|
||||
# extra-long. the value defines the length, in rank. This is also good for putting some
|
||||
# vertical space between seperate subsystems. This is a default policy - please override.
|
||||
#
|
||||
return 0
|
||||
|
||||
def label(self,s):
|
||||
# Convert a module name to a formatted node label. This is a default policy - please override.
|
||||
#
|
||||
return '\\.\\n'.join(s.split('.'))
|
||||
|
||||
def color(self,s,type):
|
||||
# Return the node color for this module name. This is a default policy - please override.
|
||||
#
|
||||
# Calculate a color systematically based on the hash of the module name. Modules in the
|
||||
# same package have the same color. Unpackaged modules are grey
|
||||
t = self.normalise_module_name_for_hash_coloring(s,type)
|
||||
return self.color_from_name(t)
|
||||
|
||||
def normalise_module_name_for_hash_coloring(self,s,type):
|
||||
if type==imp.PKG_DIRECTORY:
|
||||
return s
|
||||
else:
|
||||
i = s.rfind('.')
|
||||
if i<0:
|
||||
return ''
|
||||
else:
|
||||
return s[:i]
|
||||
|
||||
def color_from_name(self,name):
|
||||
n = md5.md5(name).digest()
|
||||
hf = float(ord(n[0])+ord(n[1])*0xff)/0xffff
|
||||
sf = float(ord(n[2]))/0xff
|
||||
vf = float(ord(n[3]))/0xff
|
||||
r,g,b = colorsys.hsv_to_rgb(hf, 0.3+0.6*sf, 0.8+0.2*vf)
|
||||
return '#%02x%02x%02x' % (r*256,g*256,b*256)
|
||||
|
||||
|
||||
def main():
|
||||
pydepgraphdot().main(sys.argv[1:])
|
||||
|
||||
if __name__=='__main__':
|
||||
main()
|
||||
|
||||
|
||||
|
||||
28
debian/dh_doclink
vendored
Normal file
28
debian/dh_doclink
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
#! /bin/sh
|
||||
|
||||
pkg=`echo $1 | sed 's/^-p//'`
|
||||
target=$2
|
||||
|
||||
ln -sf $target debian/$pkg/usr/share/doc/$pkg
|
||||
|
||||
f=debian/$pkg.postinst.debhelper
|
||||
if [ ! -e $f ] || [ "`grep -c '^# dh_doclink' $f`" -eq 0 ]; then
|
||||
cat >> $f <<EOF
|
||||
# dh_doclink
|
||||
if [ "\$1" = "configure" ]; then
|
||||
if [ -d /usr/doc -a ! -e /usr/doc/$pkg -a -d /usr/share/doc/$pkg ]; then
|
||||
ln -sf ../share/doc/$pkg /usr/doc/$pkg
|
||||
fi
|
||||
fi
|
||||
EOF
|
||||
fi
|
||||
|
||||
f=debian/$pkg.prerm.debhelper
|
||||
if [ ! -e $f ] || [ "`grep -c '^# dh_doclink' $f`" -eq 0 ]; then
|
||||
cat >> $f <<EOF
|
||||
# dh_doclink
|
||||
if [ \( "\$1" = "upgrade" -o "\$1" = "remove" \) -a -L /usr/doc/$pkg ]; then
|
||||
rm -f /usr/doc/$pkg
|
||||
fi
|
||||
EOF
|
||||
fi
|
||||
10
debian/dh_rmemptydirs
vendored
Normal file
10
debian/dh_rmemptydirs
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
#! /bin/sh -e
|
||||
|
||||
pkg=`echo $1 | sed 's/^-p//'`
|
||||
|
||||
: # remove empty directories, when all components are in place
|
||||
for d in `find debian/$pkg -depth -type d -empty 2> /dev/null`; do \
|
||||
while rmdir $$d 2> /dev/null; do d=`dirname $$d`; done; \
|
||||
done
|
||||
|
||||
exit 0
|
||||
104
debian/idle-PVER.1.in
vendored
Normal file
104
debian/idle-PVER.1.in
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
.TH IDLE 1 "21 September 2004"
|
||||
.SH NAME
|
||||
\fBIDLE\fP \- An Integrated DeveLopment Environment for Python
|
||||
.SH SYNTAX
|
||||
.B idle [ \fI-dins\fP ] [ \fI-t title\fP ] [ \fIfile\fP ...]
|
||||
.PP
|
||||
.B idle [ \fI-dins\fP ] [ \fI-t title\fP ] ( \fI-c cmd\fP | \fI-r file\fP ) [ \fIarg\fP ...]
|
||||
.PP
|
||||
.B idle [ \fI-dins\fP ] [ \fI-t title\fP ] - [ \fIarg\fP ...]
|
||||
.SH DESCRIPTION
|
||||
This manual page documents briefly the
|
||||
.BR idle
|
||||
command.
|
||||
This manual page was written for Debian
|
||||
because the original program does not have a manual page.
|
||||
For more information, refer to IDLE's help menu.
|
||||
.PP
|
||||
.B IDLE
|
||||
is an Integrated DeveLopment Environment for Python. IDLE is based on
|
||||
Tkinter, Python's bindings to the Tk widget set. Features are 100% pure
|
||||
Python, multi-windows with multiple undo and Python colorizing, a Python
|
||||
shell window subclass, a debugger. IDLE is cross-platform, i.e. it works
|
||||
on all platforms where Tk is installed.
|
||||
.LP
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-h
|
||||
.PD
|
||||
Print this help message and exit.
|
||||
.TP
|
||||
.B \-n
|
||||
.PD
|
||||
Run IDLE without a subprocess (see Help/IDLE Help for details).
|
||||
.PP
|
||||
The following options will override the IDLE 'settings' configuration:
|
||||
.TP
|
||||
.B \-e
|
||||
.PD
|
||||
Open an edit window.
|
||||
.TP
|
||||
.B \-i
|
||||
.PD
|
||||
Open a shell window.
|
||||
.PP
|
||||
The following options imply -i and will open a shell:
|
||||
.TP
|
||||
.B \-c cmd
|
||||
.PD
|
||||
Run the command in a shell, or
|
||||
.TP
|
||||
.B \-r file
|
||||
.PD
|
||||
Run script from file.
|
||||
.PP
|
||||
.TP
|
||||
.B \-d
|
||||
.PD
|
||||
Enable the debugger.
|
||||
.TP
|
||||
.B \-s
|
||||
.PD
|
||||
Run $IDLESTARTUP or $PYTHONSTARTUP before anything else.
|
||||
.TP
|
||||
.B \-t title
|
||||
.PD
|
||||
Set title of shell window.
|
||||
.PP
|
||||
A default edit window will be bypassed when -c, -r, or - are used.
|
||||
.PP
|
||||
[arg]* and [file]* are passed to the command (-c) or script (-r) in sys.argv[1:].
|
||||
.SH EXAMPLES
|
||||
.TP
|
||||
idle
|
||||
.PD
|
||||
Open an edit window or shell depending on IDLE's configuration.
|
||||
.TP
|
||||
idle foo.py foobar.py
|
||||
.PD
|
||||
Edit the files, also open a shell if configured to start with shell.
|
||||
.TP
|
||||
idle -est "Baz" foo.py
|
||||
.PD
|
||||
Run $IDLESTARTUP or $PYTHONSTARTUP, edit foo.py, and open a shell
|
||||
window with the title "Baz".
|
||||
.TP
|
||||
idle -c "import sys; print sys.argv" "foo"
|
||||
.PD
|
||||
Open a shell window and run the command, passing "-c" in sys.argv[0]
|
||||
and "foo" in sys.argv[1].
|
||||
.TP
|
||||
idle -d -s -r foo.py "Hello World"
|
||||
.PD
|
||||
Open a shell window, run a startup script, enable the debugger, and
|
||||
run foo.py, passing "foo.py" in sys.argv[0] and "Hello World" in
|
||||
sys.argv[1].
|
||||
.TP
|
||||
echo "import sys; print sys.argv" | idle - "foobar"
|
||||
.PD
|
||||
Open a shell window, run the script piped in, passing '' in sys.argv[0]
|
||||
and "foobar" in sys.argv[1].
|
||||
.SH SEE ALSO
|
||||
python(1).
|
||||
.SH AUTHORS
|
||||
Various.
|
||||
5
debian/idle-PVER.overrides.in
vendored
Normal file
5
debian/idle-PVER.overrides.in
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# icon in dependent package
|
||||
idle-@PVER@ binary: menu-icon-missing
|
||||
|
||||
idle-@PVER@ binary: command-with-path-in-maintainer-script
|
||||
idle-@PVER@ binary: image-file-in-usr-lib
|
||||
32
debian/idle-PVER.postinst.in
vendored
Normal file
32
debian/idle-PVER.postinst.in
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# postinst script for the Debian idle-@PVER@ package.
|
||||
# Written 1998 by Gregor Hoffleit <flight@debian.org>.
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
DIRLIST="/usr/lib/python@VER@/idlelib"
|
||||
|
||||
case "$1" in
|
||||
configure|abort-upgrade|abort-remove|abort-deconfigure)
|
||||
|
||||
for i in $DIRLIST ; do
|
||||
/usr/bin/@PVER@ /usr/lib/@PVER@/compileall.py -q $i
|
||||
if grep -sq '^byte-compile[^#]*optimize' /etc/python/debian_config
|
||||
then
|
||||
/usr/bin/@PVER@ -O /usr/lib/@PVER@/compileall.py -q $i
|
||||
fi
|
||||
done
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
11
debian/idle-PVER.postrm.in
vendored
Normal file
11
debian/idle-PVER.postrm.in
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" = "purge" ]; then
|
||||
rm -rf /etc/idle-@PVER@
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
17
debian/idle-PVER.prerm.in
vendored
Normal file
17
debian/idle-PVER.prerm.in
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# sample prerm script for the Debian idle-@PVER@ package.
|
||||
# Written 1998 by Gregor Hoffleit <flight@debian.org>.
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
PACKAGE=`basename $0 .prerm`
|
||||
|
||||
dpkg --listfiles $PACKAGE |
|
||||
awk '$0~/\.py$/ {print $0"c\n" $0"o"}' |
|
||||
xargs rm -f >&2
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
9
debian/idle.desktop.in
vendored
Normal file
9
debian/idle.desktop.in
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Name=IDLE (using Python-@VER@)
|
||||
Comment=Integrated Development Environment for Python (using Python-@VER@)
|
||||
Exec=/usr/bin/idle-@PVER@
|
||||
Icon=/usr/share/pixmaps/@PVER@.xpm
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Application;Development;
|
||||
StartupNotify=true
|
||||
7
debian/libPVER-dbg.overrides.in
vendored
Normal file
7
debian/libPVER-dbg.overrides.in
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
lib@PVER@-dbg binary: package-name-doesnt-match-sonames
|
||||
lib@PVER@-dbg binary: non-dev-pkg-with-shlib-symlink
|
||||
|
||||
lib@PVER@-dbg binary: arch-dependent-file-not-in-arch-specific-directory
|
||||
|
||||
# pointless lintian ...
|
||||
lib@PVER@-dbg binary: hardening-no-fortify-functions
|
||||
12
debian/libPVER-dbg.postinst.in
vendored
Normal file
12
debian/libPVER-dbg.postinst.in
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" = configure ]; then
|
||||
# _sysconfigdata_d.py now found in the platform directory
|
||||
rm -f /usr/lib/python2.7/_sysconfigdata_d.py[co]
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
23
debian/libPVER-dbg.prerm.in
vendored
Normal file
23
debian/libPVER-dbg.prerm.in
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
remove)
|
||||
dpkg -L lib@PVER@-dbg@HOST_QUAL@ \
|
||||
| awk '/\.py$/ {print $0"c\n" $0"o"}' \
|
||||
| xargs -r rm -f >&2
|
||||
;;
|
||||
upgrade)
|
||||
;;
|
||||
deconfigure)
|
||||
;;
|
||||
failed-upgrade)
|
||||
;;
|
||||
*)
|
||||
echo "prerm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
33
debian/libPVER-dbg.symbols.in
vendored
Normal file
33
debian/libPVER-dbg.symbols.in
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
libpython@VER@_d.so.1.0 libpython@VER@-dbg #MINVER#
|
||||
Py_InitModule4TraceRefs@Base @VER@
|
||||
#include "libpython.symbols"
|
||||
_PyDict_Dummy@Base @VER@
|
||||
_PyMem_DebugFree@Base @VER@
|
||||
_PyMem_DebugMalloc@Base @VER@
|
||||
_PyMem_DebugRealloc@Base @VER@
|
||||
_PyObject_DebugCheckAddress@Base @VER@
|
||||
_PyObject_DebugCheckAddressApi@Base @VER@
|
||||
_PyObject_DebugDumpAddress@Base @VER@
|
||||
_PyObject_DebugFree@Base @VER@
|
||||
_PyObject_DebugFreeApi@Base @VER@
|
||||
_PyObject_DebugMalloc@Base @VER@
|
||||
_PyObject_DebugMallocApi@Base @VER@
|
||||
_PyObject_DebugMallocStats@Base @VER@
|
||||
_PyObject_DebugRealloc@Base @VER@
|
||||
_PyObject_DebugReallocApi@Base @VER@
|
||||
_PySet_Dummy@Base @VER@
|
||||
_Py_AddToAllObjects@Base @VER@
|
||||
_Py_Dealloc@Base @VER@
|
||||
_Py_ForgetReference@Base @VER@
|
||||
_Py_GetObjects@Base @VER@
|
||||
_Py_GetRefTotal@Base @VER@
|
||||
_Py_HashSecret_Initialized@Base @VER@
|
||||
_Py_NegativeRefcount@Base @VER@
|
||||
_Py_NewReference@Base @VER@
|
||||
_Py_PrintReferenceAddresses@Base @VER@
|
||||
_Py_PrintReferences@Base @VER@
|
||||
_Py_RefTotal@Base @VER@
|
||||
_Py_dumptree@Base @VER@
|
||||
_Py_printtree@Base @VER@
|
||||
_Py_showtree@Base @VER@
|
||||
_Py_tok_dump@Base @VER@
|
||||
3
debian/libPVER-dev.overrides.in
vendored
Normal file
3
debian/libPVER-dev.overrides.in
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
lib@PVER@-dev binary: python-script-but-no-python-dep
|
||||
|
||||
lib@PVER@-dev binary: arch-dependent-file-not-in-arch-specific-directory
|
||||
1
debian/libPVER-minimal.overrides.in
vendored
Normal file
1
debian/libPVER-minimal.overrides.in
vendored
Normal file
@@ -0,0 +1 @@
|
||||
lib@PVER@-minimal binary: python-script-but-no-python-dep
|
||||
17
debian/libPVER-minimal.postinst.in
vendored
Normal file
17
debian/libPVER-minimal.postinst.in
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ ! -f /etc/@PVER@/sitecustomize.py ]; then
|
||||
cat <<-EOF
|
||||
# Empty sitecustomize.py to avoid a dangling symlink
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ "$1" = configure ]; then
|
||||
rm -f /etc/@PVER@/cert-verification.conf
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
27
debian/libPVER-minimal.postrm.in
vendored
Normal file
27
debian/libPVER-minimal.postrm.in
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" = "remove" ]; then
|
||||
pc=$(dpkg-query -f '${db:Status-Abbrev} ${binary:Package}\n' -W lib@PVER@-minimal \
|
||||
| grep -v '^.n' | wc -l)
|
||||
if [ "$pc" -le 1 ]; then
|
||||
find /usr/lib/@PVER@ -name '*.py[co]' -print0 | xargs -r0 rm -f
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$1" = "purge" ]; then
|
||||
pc=$(dpkg-query -f '${db:Status-Abbrev} ${binary:Package}\n' -W lib@PVER@-minimal \
|
||||
| grep -v '^.n' | wc -l)
|
||||
if [ "$pc" -le 1 ]; then
|
||||
rm -f /etc/@PVER@/site.py /etc/@PVER@/sitecustomize.py
|
||||
if [ -d /etc/@PVER@ ]; then
|
||||
rmdir --ignore-fail-on-non-empty /etc/@PVER@ 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
rm -f /etc/@PVER@/cert-verification.conf
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
35
debian/libPVER-minimal.prerm.in
vendored
Normal file
35
debian/libPVER-minimal.prerm.in
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
remove_bytecode()
|
||||
{
|
||||
pkg=$1
|
||||
dpkg -L $1 \
|
||||
| awk '/\.py$/ {print $0"c\n" $0"o"}' \
|
||||
| xargs -r rm -f >&2
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
remove)
|
||||
pc=$(dpkg-query -f '${db:Status-Abbrev} ${binary:Package}\n' -W lib@PVER@-minimal \
|
||||
| grep -v '^.n' | wc -l)
|
||||
if [ "$pc" -le 1 ]; then
|
||||
remove_bytecode lib@PVER@-minimal@HOST_QUAL@
|
||||
fi
|
||||
;;
|
||||
upgrade)
|
||||
remove_bytecode lib@PVER@-minimal@HOST_QUAL@
|
||||
# byte compilation in @PVER@-minimal postinst, strict dependency
|
||||
;;
|
||||
deconfigure)
|
||||
;;
|
||||
failed-upgrade)
|
||||
;;
|
||||
*)
|
||||
echo "prerm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
14
debian/libPVER-stdlib.overrides.in
vendored
Normal file
14
debian/libPVER-stdlib.overrides.in
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
# idlelib images
|
||||
lib@PVER@-stdlib binary: image-file-in-usr-lib
|
||||
|
||||
# license file referred by the standard library
|
||||
lib@PVER@-stdlib binary: extra-license-file
|
||||
|
||||
# template files
|
||||
lib@PVER@-stdlib binary: interpreter-not-absolute usr/lib/python3.3/venv/scripts/posix/pydoc #!__VENV_PYTHON__
|
||||
lib@PVER@-stdlib binary: unusual-interpreter usr/lib/python3.3/venv/scripts/posix/pydoc #!__VENV_PYTHON__
|
||||
|
||||
# the split is the reason for that
|
||||
lib@PVER@-stdlib binary: python-script-but-no-python-dep
|
||||
|
||||
lib@PVER@-stdlib binary: arch-dependent-file-not-in-arch-specific-directory
|
||||
35
debian/libPVER-stdlib.prerm.in
vendored
Normal file
35
debian/libPVER-stdlib.prerm.in
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
remove_bytecode()
|
||||
{
|
||||
pkg=$1
|
||||
dpkg -L $1 \
|
||||
| awk '/\.py$/ {print $0"c\n" $0"o"}' \
|
||||
| xargs -r rm -f >&2
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
remove)
|
||||
pc=$(dpkg-query -f '${db:Status-Abbrev} ${binary:Package}\n' -W lib@PVER@-stdlib \
|
||||
| grep -v '^.n' | wc -l)
|
||||
if [ "$pc" -le 1 ]; then
|
||||
remove_bytecode lib@PVER@-stdlib@HOST_QUAL@
|
||||
fi
|
||||
;;
|
||||
upgrade)
|
||||
remove_bytecode lib@PVER@-stdlib@HOST_QUAL@
|
||||
# byte compilation in @PVER@ postinst, strict dependency
|
||||
;;
|
||||
deconfigure)
|
||||
;;
|
||||
failed-upgrade)
|
||||
;;
|
||||
*)
|
||||
echo "prerm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
4
debian/libPVER-testsuite.overrides.in
vendored
Normal file
4
debian/libPVER-testsuite.overrides.in
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
lib@PVER@-testsuite binary: python-script-but-no-python-dep
|
||||
lib@PVER@-testsuite binary: image-file-in-usr-lib
|
||||
lib@PVER@-testsuite binary: privacy-breach-generic
|
||||
lib@PVER@-testsuite binary: command-with-path-in-maintainer-script
|
||||
30
debian/libPVER-testsuite.prerm.in
vendored
Normal file
30
debian/libPVER-testsuite.prerm.in
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
remove_bytecode()
|
||||
{
|
||||
pkg=$1
|
||||
dpkg -L $1 \
|
||||
| awk '/\.py$/ {print $0"c\n" $0"o"}' \
|
||||
| xargs -r rm -f >&2
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
remove)
|
||||
remove_bytecode lib@PVER@-testsuite
|
||||
;;
|
||||
upgrade)
|
||||
remove_bytecode lib@PVER@-testsuite
|
||||
;;
|
||||
deconfigure)
|
||||
;;
|
||||
failed-upgrade)
|
||||
;;
|
||||
*)
|
||||
echo "prerm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
1
debian/libPVER.overrides.in
vendored
Normal file
1
debian/libPVER.overrides.in
vendored
Normal file
@@ -0,0 +1 @@
|
||||
lib@PVER@ binary: package-name-doesnt-match-sonames
|
||||
3
debian/libPVER.symbols.in
vendored
Normal file
3
debian/libPVER.symbols.in
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
libpython@VER@.so.1.0 libpython@VER@ #MINVER#
|
||||
Py_InitModule4@Base @VER@
|
||||
#include "libpython.symbols"
|
||||
1352
debian/libpython.symbols.in
vendored
Normal file
1352
debian/libpython.symbols.in
vendored
Normal file
File diff suppressed because it is too large
Load Diff
31
debian/locale-gen
vendored
Normal file
31
debian/locale-gen
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
LOCPATH=`pwd`/locales
|
||||
export LOCPATH
|
||||
|
||||
[ -d $LOCPATH ] || mkdir -p $LOCPATH
|
||||
|
||||
umask 022
|
||||
|
||||
echo "Generating locales..."
|
||||
while read locale charset; do
|
||||
case $locale in \#*) continue;; esac
|
||||
[ -n "$locale" -a -n "$charset" ] || continue
|
||||
echo -n " `echo $locale | sed 's/\([^.\@]*\).*/\1/'`"
|
||||
echo -n ".$charset"
|
||||
echo -n `echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`
|
||||
echo -n '...'
|
||||
if [ -f $LOCPATH/$locale ]; then
|
||||
input=$locale
|
||||
else
|
||||
input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`
|
||||
fi
|
||||
localedef -i $input -c -f $charset $LOCPATH/$locale #-A /etc/locale.alias
|
||||
echo ' done'; \
|
||||
done <<EOF
|
||||
# This file lists locales that the python testsuite depends on
|
||||
en_US ISO-8859-1
|
||||
en_US.UTF-8 UTF-8
|
||||
EOF
|
||||
|
||||
echo "Generation complete."
|
||||
41
debian/mincheck.py
vendored
Normal file
41
debian/mincheck.py
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
import sys
|
||||
|
||||
def get_listed(fn):
|
||||
modules = set()
|
||||
for line in file(fn).readlines():
|
||||
modules.add(line.split()[1])
|
||||
return modules
|
||||
|
||||
def get_dependencies(fn):
|
||||
t = eval(file(fn).read())
|
||||
modules = set()
|
||||
depgraph = t['depgraph']
|
||||
for mod, deps in depgraph.iteritems():
|
||||
if mod != '__main__':
|
||||
modules.add(mod)
|
||||
modules.update(deps.keys())
|
||||
return depgraph, modules
|
||||
|
||||
def main():
|
||||
mods = get_listed(sys.argv[1])
|
||||
depgraph, deps = get_dependencies(sys.argv[2])
|
||||
print "Listed modules:", sorted(mods)
|
||||
print
|
||||
print "Dependent modules:", sorted(deps)
|
||||
print
|
||||
|
||||
missing = deps.difference(mods)
|
||||
if missing:
|
||||
print "Missing modules in python-minimal:"
|
||||
print missing
|
||||
for m in missing:
|
||||
users = []
|
||||
for caller, callees in depgraph.iteritems():
|
||||
if m in callees:
|
||||
users.append(caller)
|
||||
print m, "used in: ", users
|
||||
sys.exit(len(missing))
|
||||
|
||||
main()
|
||||
|
||||
17
debian/mkbinfmt.py
vendored
Normal file
17
debian/mkbinfmt.py
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# mkbinfmt.py
|
||||
import imp, sys, string, os.path
|
||||
|
||||
magic = string.join(["\\x%.2x" % ord(c) for c in imp.get_magic()],"")
|
||||
|
||||
name = sys.argv[1]
|
||||
|
||||
binfmt = '''\
|
||||
package %s
|
||||
interpreter /usr/bin/%s
|
||||
magic %s\
|
||||
''' % (name, name, magic)
|
||||
|
||||
#filename = '/usr/share/binfmts/' + name
|
||||
#open(filename,'w+').write(binfmt)
|
||||
|
||||
print binfmt
|
||||
123
debian/multiarch.h.in
vendored
Normal file
123
debian/multiarch.h.in
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
#if defined(__linux__)
|
||||
# if defined(__x86_64__) && defined(__LP64__)
|
||||
# include <x86_64-linux-gnu/@subdir@/@header@>
|
||||
# elif defined(__x86_64__) && defined(__ILP32__)
|
||||
# include <x86_64-linux-gnux32/@subdir@/@header@>
|
||||
# elif defined(__i386__)
|
||||
# include <i386-linux-gnu/@subdir@/@header@>
|
||||
# elif defined(__aarch64__) && defined(__AARCH64EL__)
|
||||
# if defined(__ILP32__)
|
||||
# include <aarch64_ilp32-linux-gnu/@subdir@/@header@>
|
||||
# else
|
||||
# include <aarch64-linux-gnu/@subdir@/@header@>
|
||||
# endif
|
||||
# elif defined(__aarch64__) && defined(__AARCH64EB__)
|
||||
# if defined(__ILP32__)
|
||||
# include <aarch64_be_ilp32-linux-gnu/@subdir@/@header@>
|
||||
# else
|
||||
# include <aarch64_be-linux-gnu/@subdir@/@header@>
|
||||
# endif
|
||||
# elif defined(__alpha__)
|
||||
# include <alpha-linux-gnu/@subdir@/@header@>
|
||||
# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
|
||||
# if defined(__ARMEL__)
|
||||
# include <arm-linux-gnueabihf/@subdir@/@header@>
|
||||
# else
|
||||
# include <armeb-linux-gnueabihf/@subdir@/@header@>
|
||||
# endif
|
||||
# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
|
||||
# if defined(__ARMEL__)
|
||||
# include <arm-linux-gnueabi/@subdir@/@header@>
|
||||
# else
|
||||
# include <armeb-linux-gnueabi/@subdir@/@header@>
|
||||
# endif
|
||||
# elif defined(__hppa__)
|
||||
# include <hppa-linux-gnu/@subdir@/@header@>
|
||||
# elif defined(__ia64__)
|
||||
# include <ia64-linux-gnu/@subdir@/@header@>
|
||||
# elif defined(__m68k__) && !defined(__mcoldfire__)
|
||||
# include <m68k-linux-gnu/@subdir@/@header@>
|
||||
# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
|
||||
# if _MIPS_SIM == _ABIO32
|
||||
# include <mipsisa32r6el-linux-gnu/@subdir@/@header@>
|
||||
# elif _MIPS_SIM == _ABIN32
|
||||
# include <mipsisa64r6el-linux-gnuabin32/@subdir@/@header@>
|
||||
# elif _MIPS_SIM == _ABI64
|
||||
# include <mipsisa64r6el-linux-gnuabi64/@subdir@/@header@>
|
||||
# else
|
||||
# error unknown multiarch location for @header@
|
||||
# endif
|
||||
# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
|
||||
# if _MIPS_SIM == _ABIO32
|
||||
# include <mipsisa32r6-linux-gnu/@subdir@/@header@>
|
||||
# elif _MIPS_SIM == _ABIN32
|
||||
# include <mipsisa64r6-linux-gnuabin32/@subdir@/@header@>
|
||||
# elif _MIPS_SIM == _ABI64
|
||||
# include <mipsisa64r6-linux-gnuabi64/@subdir@/@header@>
|
||||
# else
|
||||
# error unknown multiarch location for @header@
|
||||
# endif
|
||||
# elif defined(__mips_hard_float) && defined(_MIPSEL)
|
||||
# if _MIPS_SIM == _ABIO32
|
||||
# include <mipsel-linux-gnu/@subdir@/@header@>
|
||||
# elif _MIPS_SIM == _ABIN32
|
||||
# include <mips64el-linux-gnuabin32/@subdir@/@header@>
|
||||
# elif _MIPS_SIM == _ABI64
|
||||
# include <mips64el-linux-gnuabi64/@subdir@/@header@>
|
||||
# else
|
||||
# error unknown multiarch location for @header@
|
||||
# endif
|
||||
# elif defined(__mips_hard_float)
|
||||
# if _MIPS_SIM == _ABIO32
|
||||
# include <mips-linux-gnu/@subdir@/@header@>
|
||||
# elif _MIPS_SIM == _ABIN32
|
||||
# include <mips64-linux-gnuabin32/@subdir@/@header@>
|
||||
# elif _MIPS_SIM == _ABI64
|
||||
# include <mips64-linux-gnuabi64/@subdir@/@header@>
|
||||
# else
|
||||
# error unknown multiarch location for @header@
|
||||
# endif
|
||||
# elif defined(__or1k__)
|
||||
# include <or1k-linux-gnu/@subdir@/@header@>
|
||||
# elif defined(__powerpc__) && defined(__SPE__)
|
||||
# include <powerpc-linux-gnuspe/@subdir@/@header@>
|
||||
# elif defined(__powerpc64__)
|
||||
# if defined(__LITTLE_ENDIAN__)
|
||||
# include <powerpc64le-linux-gnu/@subdir@/@header@>
|
||||
# else
|
||||
# include <powerpc64-linux-gnu/@subdir@/@header@>
|
||||
# endif
|
||||
# elif defined(__powerpc__)
|
||||
# include <powerpc-linux-gnu/@subdir@/@header@>
|
||||
# elif defined(__s390x__)
|
||||
# include <s390x-linux-gnu/@subdir@/@header@>
|
||||
# elif defined(__s390__)
|
||||
# include <s390-linux-gnu/@subdir@/@header@>
|
||||
# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
|
||||
# include <sh4-linux-gnu/@subdir@/@header@>
|
||||
# elif defined(__sparc__) && defined(__arch64__)
|
||||
# include <sparc64-linux-gnu/@subdir@/@header@>
|
||||
# elif defined(__sparc__)
|
||||
# include <sparc-linux-gnu/@subdir@/@header@>
|
||||
# elif defined(__riscv)
|
||||
# if __riscv_xlen == 64
|
||||
# include <riscv64-linux-gnu/@subdir@/@header@>
|
||||
# else
|
||||
# include <riscv32-linux-gnu/@subdir@/@header@>
|
||||
# endif
|
||||
# else
|
||||
# error unknown multiarch location for @header@
|
||||
# endif
|
||||
#elif defined(__FreeBSD_kernel__)
|
||||
# if defined(__LP64__)
|
||||
# include <x86_64-kfreebsd-gnu/@subdir@/@header@>
|
||||
# elif defined(__i386__)
|
||||
# include <i386-kfreebsd-gnu/@subdir@/@header@>
|
||||
# else
|
||||
# error unknown multiarch location for @header@
|
||||
# endif
|
||||
#elif defined(__gnu_hurd__)
|
||||
# include <i386-gnu/@subdir@/@header@>
|
||||
#else
|
||||
# error unknown multiarch location for @header@
|
||||
#endif
|
||||
7
debian/openssl.cnf
vendored
Normal file
7
debian/openssl.cnf
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
openssl_conf = default_conf
|
||||
[default_conf]
|
||||
ssl_conf = ssl_sect
|
||||
[ssl_sect]
|
||||
system_default = system_default_sect
|
||||
[system_default_sect]
|
||||
CipherString = DEFAULT@SECLEVEL=1
|
||||
26
debian/patches/CVE-2019-20907.diff
vendored
Normal file
26
debian/patches/CVE-2019-20907.diff
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
From 47a2955589bdb1a114d271496ff803ad73f954b8 Mon Sep 17 00:00:00 2001
|
||||
From: "Miss Islington (bot)"
|
||||
<31488909+miss-islington@users.noreply.github.com>
|
||||
Date: Wed, 15 Jul 2020 05:36:36 -0700
|
||||
Subject: [PATCH] bpo-39017: Avoid infinite loop in the tarfile module
|
||||
(GH-21454) (#21485)
|
||||
|
||||
Avoid infinite loop when reading specially crafted TAR files using the tarfile module
|
||||
(CVE-2019-20907).
|
||||
(cherry picked from commit 5a8d121a1f3ef5ad7c105ee378cc79a3eac0c7d4)
|
||||
|
||||
Co-authored-by: Rishi <rishi_devan@mail.com>
|
||||
|
||||
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
|
||||
index adf91d5..574a6bb 100644
|
||||
--- a/Lib/tarfile.py
|
||||
+++ b/Lib/tarfile.py
|
||||
@@ -1400,6 +1400,8 @@ class TarInfo(object):
|
||||
|
||||
length, keyword = match.groups()
|
||||
length = int(length)
|
||||
+ if length == 0:
|
||||
+ raise InvalidHeaderError("invalid header")
|
||||
value = buf[match.end(2) + 1:match.start(1) + length - 1]
|
||||
|
||||
keyword = keyword.decode("utf8")
|
||||
26
debian/patches/CVE-2020-8492.diff
vendored
Normal file
26
debian/patches/CVE-2020-8492.diff
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
Backport of 0b297d4ff1c0e4480ad33acae793fbaf4bf015b4, trimmed down to the
|
||||
fix for CVE-2020-8492
|
||||
|
||||
Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
|
||||
diff --git a/Lib/urllib2.py b/Lib/urllib2.py
|
||||
index 8b634ad..11a62a4 100644
|
||||
--- a/Lib/urllib2.py
|
||||
+++ b/Lib/urllib2.py
|
||||
@@ -856,8 +856,15 @@ class AbstractBasicAuthHandler:
|
||||
|
||||
# allow for double- and single-quoted realm values
|
||||
# (single quotes are a violation of the RFC, but appear in the wild)
|
||||
- rx = re.compile('(?:.*,)*[ \t]*([^ \t]+)[ \t]+'
|
||||
- 'realm=(["\']?)([^"\']*)\\2', re.I)
|
||||
+ rx = re.compile('(?:^|,)' # start of the string or ','
|
||||
+ '[ \t]*' # optional whitespaces
|
||||
+ '([^ \t]+)' # scheme like "Basic"
|
||||
+ '[ \t]+' # mandatory whitespaces
|
||||
+ # realm=xxx
|
||||
+ # realm='xxx'
|
||||
+ # realm="xxx"
|
||||
+ 'realm=(["\']?)([^"\']*)\\2',
|
||||
+ re.I)
|
||||
|
||||
# XXX could pre-emptively send auth info already accepted (RFC 2617,
|
||||
# end of section 2, and section 1.2 immediately after "credentials"
|
||||
472
debian/patches/CVE-2021-23336.diff
vendored
Normal file
472
debian/patches/CVE-2021-23336.diff
vendored
Normal file
@@ -0,0 +1,472 @@
|
||||
From fcbe0cb04d35189401c0c880ebfb4311e952d776 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Goldschmidt <adamgold7@gmail.com>
|
||||
Date: Mon, 15 Feb 2021 00:41:57 +0200
|
||||
Subject: [PATCH] bpo-42967: only use '&' as a query string separator (#24297)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
bpo-42967: [security] Address a web cache-poisoning issue reported in urllib.parse.parse_qsl().
|
||||
|
||||
urllib.parse will only us "&" as query string separator by default instead of both ";" and "&" as allowed in earlier versions. An optional argument seperator with default value "&" is added to specify the separator.
|
||||
|
||||
|
||||
Co-authored-by: Éric Araujo <merwok@netwok.org>
|
||||
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
||||
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|
||||
Co-authored-by: Éric Araujo <merwok@netwok.org>
|
||||
---
|
||||
Doc/library/cgi.rst | 9 ++-
|
||||
Doc/library/urllib.parse.rst | 16 ++++-
|
||||
Doc/whatsnew/3.10.rst | 13 ++++
|
||||
Doc/whatsnew/3.6.rst | 13 ++++
|
||||
Doc/whatsnew/3.7.rst | 13 ++++
|
||||
Doc/whatsnew/3.8.rst | 13 ++++
|
||||
Doc/whatsnew/3.9.rst | 15 +++-
|
||||
Lib/cgi.py | 23 ++++---
|
||||
Lib/test/test_cgi.py | 29 ++++++--
|
||||
Lib/test/test_urlparse.py | 68 +++++++++++++------
|
||||
Lib/urllib/parse.py | 20 ++++--
|
||||
.../2021-02-14-15-59-16.bpo-42967.YApqDS.rst | 1 +
|
||||
12 files changed, 186 insertions(+), 47 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Security/2021-02-14-15-59-16.bpo-42967.YApqDS.rst
|
||||
|
||||
Backport:
|
||||
* Drop Doc/whatsnew and Misc/NEWS.d
|
||||
* urllib.parse.urlencode -> urllib.urlencode
|
||||
* urllib.parse -> urlparse
|
||||
* Significant refactoring due to differences in arguments
|
||||
* Avoid using TestCase.subTest
|
||||
|
||||
diff --git a/Doc/library/cgi.rst b/Doc/library/cgi.rst
|
||||
index 4048592e73..05d9cdf424 100644
|
||||
--- a/Doc/library/cgi.rst
|
||||
+++ b/Doc/library/cgi.rst
|
||||
@@ -277,24 +277,25 @@ These are useful if you want more control, or if you want to employ some of the
|
||||
algorithms implemented in this module in other circumstances.
|
||||
|
||||
|
||||
-.. function:: parse(fp[, environ[, keep_blank_values[, strict_parsing]]])
|
||||
+.. function:: parse(fp[, environ[, keep_blank_values[, strict_parsing[, separator="&"]]]])
|
||||
|
||||
Parse a query in the environment or from a file (the file defaults to
|
||||
- ``sys.stdin`` and environment defaults to ``os.environ``). The *keep_blank_values* and *strict_parsing* parameters are
|
||||
+ ``sys.stdin`` and environment defaults to ``os.environ``). The
|
||||
+ *keep_blank_values*, *strict_parsing* and *separator* parameters are
|
||||
passed to :func:`urlparse.parse_qs` unchanged.
|
||||
|
||||
|
||||
-.. function:: parse_qs(qs[, keep_blank_values[, strict_parsing[, max_num_fields]]])
|
||||
+.. function:: parse_qs(qs[, keep_blank_values[, strict_parsing[, max_num_fields[, separator]]]])
|
||||
|
||||
This function is deprecated in this module. Use :func:`urlparse.parse_qs`
|
||||
instead. It is maintained here only for backward compatibility.
|
||||
|
||||
-.. function:: parse_qsl(qs[, keep_blank_values[, strict_parsing[, max_num_fields]]])
|
||||
+.. function:: parse_qsl(qs[, keep_blank_values[, strict_parsing[, max_num_fields[, separator]]]])
|
||||
|
||||
This function is deprecated in this module. Use :func:`urlparse.parse_qsl`
|
||||
instead. It is maintained here only for backward compatibility.
|
||||
|
||||
-.. function:: parse_multipart(fp, pdict)
|
||||
+.. function:: parse_multipart(fp, pdict, separator="&")
|
||||
|
||||
Parse input of type :mimetype:`multipart/form-data` (for file uploads).
|
||||
Arguments are *fp* for the input file and *pdict* for a dictionary containing
|
||||
@@ -303,6 +303,9 @@ algorithms implemented in this module in other circumstances.
|
||||
Note that this does not parse nested multipart parts --- use
|
||||
:class:`FieldStorage` for that.
|
||||
|
||||
+ .. versionchanged:: 2.7 security update
|
||||
+ Added the *separator* parameter.
|
||||
+
|
||||
|
||||
.. function:: parse_header(string)
|
||||
|
||||
diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst
|
||||
index f9c8ba7398..1a79078239 100644
|
||||
--- a/Doc/library/urlparse.rst
|
||||
+++ b/Doc/library/urlparse.rst
|
||||
@@ -165,7 +165,7 @@ or on combining URL components into a URL string.
|
||||
Added IPv6 URL parsing capabilities.
|
||||
|
||||
|
||||
-.. function:: parse_qs(qs[, keep_blank_values[, strict_parsing[, max_num_fields]]])
|
||||
+.. function:: parse_qs(qs[, keep_blank_values[, strict_parsing[, max_num_fields[, separator='&']]]])
|
||||
|
||||
Parse a query string given as a string argument (data of type
|
||||
:mimetype:`application/x-www-form-urlencoded`). Data are returned as a
|
||||
@@ -190,6 +190,8 @@ or on combining URL components into a URL string.
|
||||
read. If set, then throws a :exc:`ValueError` if there are more than
|
||||
*max_num_fields* fields read.
|
||||
|
||||
+ The optional argument *separator* is the symbol to use for separating the query arguments. It defaults to `&`.
|
||||
+
|
||||
Use the :func:`urllib.urlencode` function to convert such dictionaries into
|
||||
query strings.
|
||||
|
||||
@@ -201,7 +203,12 @@ or on combining URL components into a URL string.
|
||||
.. versionchanged:: 2.7.16
|
||||
Added *max_num_fields* parameter.
|
||||
|
||||
-.. function:: parse_qsl(qs[, keep_blank_values[, strict_parsing[, max_num_fields]]])
|
||||
+ .. versionchanged:: 2.7 security update
|
||||
+ Added *separator* parameter with the default value of `&`. Python versions earlier than Python 3.10 allowed using both ";" and "&" as
|
||||
+ query parameter separator. This has been changed to allow only a single separator key, with "&" as the default separator.
|
||||
+
|
||||
+
|
||||
+.. function:: parse_qsl(qs[, keep_blank_values[, strict_parsing[, max_num_fields[, separator='&']]]])
|
||||
|
||||
Parse a query string given as a string argument (data of type
|
||||
:mimetype:`application/x-www-form-urlencoded`). Data are returned as a list of
|
||||
@@ -226,6 +232,8 @@ or on combining URL components into a URL string.
|
||||
read. If set, then throws a :exc:`ValueError` if there are more than
|
||||
*max_num_fields* fields read.
|
||||
|
||||
+ The optional argument *separator* is the symbol to use for separating the query arguments. It defaults to `&`.
|
||||
+
|
||||
Use the :func:`urllib.urlencode` function to convert such lists of pairs into
|
||||
query strings.
|
||||
|
||||
@@ -235,6 +243,11 @@ or on combining URL components into a URL string.
|
||||
.. versionchanged:: 2.7.16
|
||||
Added *max_num_fields* parameter.
|
||||
|
||||
+ .. versionchanged:: 2.7 security update
|
||||
+ Added *separator* parameter with the default value of `&`. Python versions earlier than Python 3.10 allowed using both ";" and "&" as
|
||||
+ query parameter separator. This has been changed to allow only a single separator key, with "&" as the default separator.
|
||||
+
|
||||
+
|
||||
.. function:: urlunparse(parts)
|
||||
|
||||
Construct a URL from a tuple as returned by ``urlparse()``. The *parts* argument
|
||||
diff --git a/Lib/cgi.py b/Lib/cgi.py
|
||||
index 6018c36086..6c72507c20 100755
|
||||
--- a/Lib/cgi.py
|
||||
+++ b/Lib/cgi.py
|
||||
@@ -115,7 +115,8 @@ def closelog():
|
||||
# 0 ==> unlimited input
|
||||
maxlen = 0
|
||||
|
||||
-def parse(fp=None, environ=os.environ, keep_blank_values=0, strict_parsing=0):
|
||||
+def parse(fp=None, environ=os.environ, keep_blank_values=0, strict_parsing=0,
|
||||
+ separator='&'):
|
||||
"""Parse a query in the environment or from a file (default stdin)
|
||||
|
||||
Arguments, all optional:
|
||||
@@ -134,6 +135,9 @@ def parse(fp=None, environ=os.environ, keep_blank_values=0, strict_parsing=0):
|
||||
strict_parsing: flag indicating what to do with parsing errors.
|
||||
If false (the default), errors are silently ignored.
|
||||
If true, errors raise a ValueError exception.
|
||||
+
|
||||
+ separator: str. The symbol to use for separating the query arguments.
|
||||
+ Defaults to &.
|
||||
"""
|
||||
if fp is None:
|
||||
fp = sys.stdin
|
||||
@@ -154,7 +158,7 @@ def parse(fp=None, environ=os.environ, keep_blank_values=0, strict_parsing=0):
|
||||
if environ['REQUEST_METHOD'] == 'POST':
|
||||
ctype, pdict = parse_header(environ['CONTENT_TYPE'])
|
||||
if ctype == 'multipart/form-data':
|
||||
- return parse_multipart(fp, pdict)
|
||||
+ return parse_multipart(fp, pdict, separator=separator)
|
||||
elif ctype == 'application/x-www-form-urlencoded':
|
||||
clength = int(environ['CONTENT_LENGTH'])
|
||||
if maxlen and clength > maxlen:
|
||||
@@ -178,27 +182,30 @@ def parse(fp=None, environ=os.environ, keep_blank_values=0, strict_parsing=0):
|
||||
else:
|
||||
qs = ""
|
||||
environ['QUERY_STRING'] = qs # XXX Shouldn't, really
|
||||
- return urlparse.parse_qs(qs, keep_blank_values, strict_parsing)
|
||||
+ return urlparse.parse_qs(qs, keep_blank_values, strict_parsing,
|
||||
+ separator=separator)
|
||||
|
||||
|
||||
# parse query string function called from urlparse,
|
||||
# this is done in order to maintain backward compatibility.
|
||||
|
||||
-def parse_qs(qs, keep_blank_values=0, strict_parsing=0):
|
||||
+def parse_qs(qs, keep_blank_values=0, strict_parsing=0, separator='&'):
|
||||
"""Parse a query given as a string argument."""
|
||||
warn("cgi.parse_qs is deprecated, use urlparse.parse_qs instead",
|
||||
PendingDeprecationWarning, 2)
|
||||
- return urlparse.parse_qs(qs, keep_blank_values, strict_parsing)
|
||||
+ return urlparse.parse_qs(qs, keep_blank_values, strict_parsing,
|
||||
+ separator=separator)
|
||||
|
||||
|
||||
-def parse_qsl(qs, keep_blank_values=0, strict_parsing=0, max_num_fields=None):
|
||||
+def parse_qsl(qs, keep_blank_values=0, strict_parsing=0, max_num_fields=None,
|
||||
+ separator='&'):
|
||||
"""Parse a query given as a string argument."""
|
||||
warn("cgi.parse_qsl is deprecated, use urlparse.parse_qsl instead",
|
||||
PendingDeprecationWarning, 2)
|
||||
return urlparse.parse_qsl(qs, keep_blank_values, strict_parsing,
|
||||
- max_num_fields)
|
||||
+ max_num_fields, separator=separator)
|
||||
|
||||
-def parse_multipart(fp, pdict):
|
||||
+def parse_multipart(fp, pdict, separator='&'):
|
||||
"""Parse multipart input.
|
||||
|
||||
Arguments:
|
||||
@@ -315,7 +319,7 @@ class FieldStorage:
|
||||
|
||||
def __init__(self, fp=None, headers=None, outerboundary="",
|
||||
environ=os.environ, keep_blank_values=0, strict_parsing=0,
|
||||
- max_num_fields=None):
|
||||
+ max_num_fields=None, separator='&'):
|
||||
"""Constructor. Read multipart/* until last part.
|
||||
|
||||
Arguments, all optional:
|
||||
@@ -363,6 +367,7 @@ def __init__(self, fp=None, headers=None, outerboundary=b'',
|
||||
self.keep_blank_values = keep_blank_values
|
||||
self.strict_parsing = strict_parsing
|
||||
self.max_num_fields = max_num_fields
|
||||
+ self.separator = separator
|
||||
if 'REQUEST_METHOD' in environ:
|
||||
method = environ['REQUEST_METHOD'].upper()
|
||||
self.qs_on_post = None
|
||||
@@ -589,7 +594,8 @@ def read_urlencoded(self):
|
||||
if self.qs_on_post:
|
||||
qs += '&' + self.qs_on_post
|
||||
query = urlparse.parse_qsl(qs, self.keep_blank_values,
|
||||
- self.strict_parsing, self.max_num_fields)
|
||||
+ self.strict_parsing, self.max_num_fields,
|
||||
+ separator=self.separator)
|
||||
self.list = [MiniFieldStorage(key, value) for key, value in query]
|
||||
self.skip_lines()
|
||||
|
||||
@@ -605,7 +610,8 @@ def read_multi(self, environ, keep_blank_values, strict_parsing):
|
||||
query = urlparse.parse_qsl(self.qs_on_post,
|
||||
self.keep_blank_values,
|
||||
self.strict_parsing,
|
||||
- self.max_num_fields)
|
||||
+ self.max_num_fields,
|
||||
+ separator=self.separator)
|
||||
self.list.extend(MiniFieldStorage(key, value)
|
||||
for key, value in query)
|
||||
FieldStorageClass = None
|
||||
@@ -649,7 +654,7 @@ def read_multi(self, environ, keep_blank_values, strict_parsing):
|
||||
klass = self.FieldStorageClass or self.__class__
|
||||
part = klass(self.fp, {}, ib,
|
||||
environ, keep_blank_values, strict_parsing,
|
||||
- max_num_fields)
|
||||
+ max_num_fields, separator=self.separator)
|
||||
|
||||
# Throw first part away
|
||||
while not part.done:
|
||||
diff --git a/Lib/test/test_cgi.py b/Lib/test/test_cgi.py
|
||||
index 6b29759da4..239d97589c 100644
|
||||
--- a/Lib/test/test_cgi.py
|
||||
+++ b/Lib/test/test_cgi.py
|
||||
@@ -53,12 +53,9 @@ def do_test(buf, method):
|
||||
("", ValueError("bad query field: ''")),
|
||||
("&", ValueError("bad query field: ''")),
|
||||
("&&", ValueError("bad query field: ''")),
|
||||
- (";", ValueError("bad query field: ''")),
|
||||
- (";&;", ValueError("bad query field: ''")),
|
||||
# Should the next few really be valid?
|
||||
("=", {}),
|
||||
("=&=", {}),
|
||||
- ("=;=", {}),
|
||||
# This rest seem to make sense
|
||||
("=a", {'': ['a']}),
|
||||
("&=a", ValueError("bad query field: ''")),
|
||||
@@ -73,8 +70,6 @@ def do_test(buf, method):
|
||||
("a=a+b&b=b+c", {'a': ['a b'], 'b': ['b c']}),
|
||||
("a=a+b&a=b+a", {'a': ['a b', 'b a']}),
|
||||
("x=1&y=2.0&z=2-3.%2b0", {'x': ['1'], 'y': ['2.0'], 'z': ['2-3.+0']}),
|
||||
- ("x=1;y=2.0&z=2-3.%2b0", {'x': ['1'], 'y': ['2.0'], 'z': ['2-3.+0']}),
|
||||
- ("x=1;y=2.0;z=2-3.%2b0", {'x': ['1'], 'y': ['2.0'], 'z': ['2-3.+0']}),
|
||||
("Hbc5161168c542333633315dee1182227:key_store_seqid=400006&cuyer=r&view=bustomer&order_id=0bb2e248638833d48cb7fed300000f1b&expire=964546263&lobale=en-US&kid=130003.300038&ss=env",
|
||||
{'Hbc5161168c542333633315dee1182227:key_store_seqid': ['400006'],
|
||||
'cuyer': ['r'],
|
||||
@@ -201,6 +196,30 @@ def test_strict(self):
|
||||
self.assertEqual(expect[k], v)
|
||||
self.assertItemsEqual(expect.values(), d.values())
|
||||
|
||||
+ def test_separator(self):
|
||||
+ parse_semicolon = [
|
||||
+ ("x=1;y=2.0", {'x': ['1'], 'y': ['2.0']}),
|
||||
+ ("x=1;y=2.0;z=2-3.%2b0", {'x': ['1'], 'y': ['2.0'], 'z': ['2-3.+0']}),
|
||||
+ (";", ValueError("bad query field: ''")),
|
||||
+ (";;", ValueError("bad query field: ''")),
|
||||
+ ("=;a", ValueError("bad query field: 'a'")),
|
||||
+ (";b=a", ValueError("bad query field: ''")),
|
||||
+ ("b;=a", ValueError("bad query field: 'b'")),
|
||||
+ ("a=a+b;b=b+c", {'a': ['a b'], 'b': ['b c']}),
|
||||
+ ("a=a+b;a=b+a", {'a': ['a b', 'b a']}),
|
||||
+ ]
|
||||
+ for orig, expect in parse_semicolon:
|
||||
+ env = {'QUERY_STRING': orig}
|
||||
+ fs = cgi.FieldStorage(separator=';', environ=env)
|
||||
+ if isinstance(expect, dict):
|
||||
+ for key in expect.keys():
|
||||
+ expect_val = expect[key]
|
||||
+ self.assertIn(key, fs)
|
||||
+ if len(expect_val) > 1:
|
||||
+ self.assertEqual(fs.getvalue(key), expect_val)
|
||||
+ else:
|
||||
+ self.assertEqual(fs.getvalue(key), expect_val[0])
|
||||
+
|
||||
def test_log(self):
|
||||
cgi.log("Testing")
|
||||
|
||||
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
|
||||
index 762500789f..3b1c360625 100644
|
||||
--- a/Lib/test/test_urlparse.py
|
||||
+++ b/Lib/test/test_urlparse.py
|
||||
@@ -32,16 +32,10 @@
|
||||
("&a=b", [('a', 'b')]),
|
||||
("a=a+b&b=b+c", [('a', 'a b'), ('b', 'b c')]),
|
||||
("a=1&a=2", [('a', '1'), ('a', '2')]),
|
||||
- (";", []),
|
||||
- (";;", []),
|
||||
- (";a=b", [('a', 'b')]),
|
||||
- ("a=a+b;b=b+c", [('a', 'a b'), ('b', 'b c')]),
|
||||
- ("a=1;a=2", [('a', '1'), ('a', '2')]),
|
||||
- (b";", []),
|
||||
- (b";;", []),
|
||||
- (b";a=b", [(b'a', b'b')]),
|
||||
- (b"a=a+b;b=b+c", [(b'a', b'a b'), (b'b', b'b c')]),
|
||||
- (b"a=1;a=2", [(b'a', b'1'), (b'a', b'2')]),
|
||||
+ (";a=b", [(';a', 'b')]),
|
||||
+ ("a=a+b;b=b+c", [('a', 'a b;b=b c')]),
|
||||
+ (b";a=b", [(b';a', b'b')]),
|
||||
+ (b"a=a+b;b=b+c", [(b'a', b'a b;b=b c')]),
|
||||
]
|
||||
|
||||
parse_qs_test_cases = [
|
||||
@@ -68,16 +62,10 @@
|
||||
(b"&a=b", {b'a': [b'b']}),
|
||||
(b"a=a+b&b=b+c", {b'a': [b'a b'], b'b': [b'b c']}),
|
||||
(b"a=1&a=2", {b'a': [b'1', b'2']}),
|
||||
- (";", {}),
|
||||
- (";;", {}),
|
||||
- (";a=b", {'a': ['b']}),
|
||||
- ("a=a+b;b=b+c", {'a': ['a b'], 'b': ['b c']}),
|
||||
- ("a=1;a=2", {'a': ['1', '2']}),
|
||||
- (b";", {}),
|
||||
- (b";;", {}),
|
||||
- (b";a=b", {b'a': [b'b']}),
|
||||
- (b"a=a+b;b=b+c", {b'a': [b'a b'], b'b': [b'b c']}),
|
||||
- (b"a=1;a=2", {b'a': [b'1', b'2']}),
|
||||
+ (";a=b", {';a': ['b']}),
|
||||
+ ("a=a+b;b=b+c", {'a': ['a b;b=b c']}),
|
||||
+ (b";a=b", {b';a': [b'b']}),
|
||||
+ (b"a=a+b;b=b+c", {b'a':[ b'a b;b=b c']}),
|
||||
]
|
||||
|
||||
class UrlParseTestCase(unittest.TestCase):
|
||||
@@ -886,6 +874,42 @@ def test_parse_qsl_encoding(self):
|
||||
self.assertEqual(urlparse.urlparse("http://www.python.org:80"),
|
||||
('http','www.python.org:80','','','',''))
|
||||
|
||||
+ def test_parse_qs_separator(self):
|
||||
+ parse_qs_semicolon_cases = [
|
||||
+ (";", {}),
|
||||
+ (";;", {}),
|
||||
+ (";a=b", {'a': ['b']}),
|
||||
+ ("a=a+b;b=b+c", {'a': ['a b'], 'b': ['b c']}),
|
||||
+ ("a=1;a=2", {'a': ['1', '2']}),
|
||||
+ (b";", {}),
|
||||
+ (b";;", {}),
|
||||
+ (b";a=b", {b'a': [b'b']}),
|
||||
+ (b"a=a+b;b=b+c", {b'a': [b'a b'], b'b': [b'b c']}),
|
||||
+ (b"a=1;a=2", {b'a': [b'1', b'2']}),
|
||||
+ ]
|
||||
+ for orig, expect in parse_qs_semicolon_cases:
|
||||
+ result = urlparse.parse_qs(orig, separator=';')
|
||||
+ self.assertEqual(result, expect, "Error parsing %r" % orig)
|
||||
+
|
||||
+
|
||||
+ def test_parse_qsl_separator(self):
|
||||
+ parse_qsl_semicolon_cases = [
|
||||
+ (";", []),
|
||||
+ (";;", []),
|
||||
+ (";a=b", [('a', 'b')]),
|
||||
+ ("a=a+b;b=b+c", [('a', 'a b'), ('b', 'b c')]),
|
||||
+ ("a=1;a=2", [('a', '1'), ('a', '2')]),
|
||||
+ (b";", []),
|
||||
+ (b";;", []),
|
||||
+ (b";a=b", [(b'a', b'b')]),
|
||||
+ (b"a=a+b;b=b+c", [(b'a', b'a b'), (b'b', b'b c')]),
|
||||
+ (b"a=1;a=2", [(b'a', b'1'), (b'a', b'2')]),
|
||||
+ ]
|
||||
+ for orig, expect in parse_qsl_semicolon_cases:
|
||||
+ result = urlparse.parse_qsl(orig, separator=';')
|
||||
+ self.assertEqual(result, expect, "Error parsing %r" % orig)
|
||||
+
|
||||
+
|
||||
def test_main():
|
||||
test_support.run_unittest(UrlParseTestCase)
|
||||
|
||||
diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py
|
||||
index ea897c3032..5bd067895b 100644
|
||||
--- a/Lib/urlparse.py
|
||||
+++ b/Lib/urlparse.py
|
||||
@@ -662,7 +662,8 @@ def unquote(string, encoding='utf-8', errors='replace'):
|
||||
append(item)
|
||||
return ''.join(res)
|
||||
|
||||
-def parse_qs(qs, keep_blank_values=0, strict_parsing=0, max_num_fields=None):
|
||||
+def parse_qs(qs, keep_blank_values=0, strict_parsing=0, max_num_fields=None,
|
||||
+ separator='&'):
|
||||
"""Parse a query given as a string argument.
|
||||
|
||||
Arguments:
|
||||
@@ -686,10 +686,13 @@ def parse_qs(qs, keep_blank_values=False, strict_parsing=False,
|
||||
|
||||
max_num_fields: int. If set, then throws a ValueError if there
|
||||
are more than n fields read by parse_qsl().
|
||||
+
|
||||
+ separator: str. The symbol to use for separating the query arguments.
|
||||
+ Defaults to &.
|
||||
"""
|
||||
dict = {}
|
||||
for name, value in parse_qsl(qs, keep_blank_values, strict_parsing,
|
||||
- max_num_fields):
|
||||
+ max_num_fields, separator=separator):
|
||||
if name in dict:
|
||||
dict[name].append(value)
|
||||
else:
|
||||
@@ -701,7 +704,8 @@ def parse_qs(qs, keep_blank_values=False, strict_parsing=False,
|
||||
dict[name] = [value]
|
||||
return dict
|
||||
|
||||
-def parse_qsl(qs, keep_blank_values=0, strict_parsing=0, max_num_fields=None):
|
||||
+def parse_qsl(qs, keep_blank_values=0, strict_parsing=0, max_num_fields=None,
|
||||
+ separator='&'):
|
||||
"""Parse a query given as a string argument.
|
||||
|
||||
Arguments:
|
||||
@@ -724,17 +727,23 @@ def parse_qsl(qs, keep_blank_values=False, strict_parsing=False,
|
||||
max_num_fields: int. If set, then throws a ValueError if there
|
||||
are more than n fields read by parse_qsl().
|
||||
|
||||
+ separator: str. The symbol to use for separating the query arguments.
|
||||
+ Defaults to &.
|
||||
+
|
||||
Returns a list, as G-d intended.
|
||||
"""
|
||||
+ if not separator or not isinstance(separator, str):
|
||||
+ raise ValueError("Separator must be of type str.")
|
||||
+
|
||||
# If max_num_fields is defined then check that the number of fields
|
||||
# is less than max_num_fields. This prevents a memory exhaustion DOS
|
||||
# attack via post bodies with many fields.
|
||||
if max_num_fields is not None:
|
||||
- num_fields = 1 + qs.count('&') + qs.count(';')
|
||||
+ num_fields = 1 + qs.count(separator)
|
||||
if max_num_fields < num_fields:
|
||||
raise ValueError('Max number of fields exceeded')
|
||||
|
||||
- pairs = [s2 for s1 in qs.split('&') for s2 in s1.split(';')]
|
||||
+ pairs = [s1 for s1 in qs.split(separator)]
|
||||
r = []
|
||||
for name_value in pairs:
|
||||
if not name_value and not strict_parsing:
|
||||
--
|
||||
2.40.1
|
||||
|
||||
149
debian/patches/CVE-2021-3177.diff
vendored
Normal file
149
debian/patches/CVE-2021-3177.diff
vendored
Normal file
@@ -0,0 +1,149 @@
|
||||
bpo-42938: Replace snprintf with Python unicode formatting in ctypes param reprs.
|
||||
--- a/Lib/ctypes/test/test_parameters.py
|
||||
+++ b/Lib/ctypes/test/test_parameters.py
|
||||
@@ -206,6 +206,49 @@ class SimpleTypesTestCase(unittest.TestC
|
||||
with self.assertRaises(ZeroDivisionError):
|
||||
WorseStruct().__setstate__({}, b'foo')
|
||||
|
||||
+ def test_parameter_repr(self):
|
||||
+ from ctypes import (
|
||||
+ c_bool,
|
||||
+ c_char,
|
||||
+ c_wchar,
|
||||
+ c_byte,
|
||||
+ c_ubyte,
|
||||
+ c_short,
|
||||
+ c_ushort,
|
||||
+ c_int,
|
||||
+ c_uint,
|
||||
+ c_long,
|
||||
+ c_ulong,
|
||||
+ c_longlong,
|
||||
+ c_ulonglong,
|
||||
+ c_float,
|
||||
+ c_double,
|
||||
+ c_longdouble,
|
||||
+ c_char_p,
|
||||
+ c_wchar_p,
|
||||
+ c_void_p,
|
||||
+ )
|
||||
+ self.assertRegexpMatches(repr(c_bool.from_param(True)), r"^<cparam '\?' at 0x[A-Fa-f0-9]+>$")
|
||||
+ self.assertEqual(repr(c_char.from_param('a')), "<cparam 'c' (a)>")
|
||||
+ self.assertRegexpMatches(repr(c_wchar.from_param('a')), r"^<cparam 'u' at 0x[A-Fa-f0-9]+>$")
|
||||
+ self.assertEqual(repr(c_byte.from_param(98)), "<cparam 'b' (98)>")
|
||||
+ self.assertEqual(repr(c_ubyte.from_param(98)), "<cparam 'B' (98)>")
|
||||
+ self.assertEqual(repr(c_short.from_param(511)), "<cparam 'h' (511)>")
|
||||
+ self.assertEqual(repr(c_ushort.from_param(511)), "<cparam 'H' (511)>")
|
||||
+ self.assertRegexpMatches(repr(c_int.from_param(20000)), r"^<cparam '[li]' \(20000\)>$")
|
||||
+ self.assertRegexpMatches(repr(c_uint.from_param(20000)), r"^<cparam '[LI]' \(20000\)>$")
|
||||
+ self.assertRegexpMatches(repr(c_long.from_param(20000)), r"^<cparam '[li]' \(20000\)>$")
|
||||
+ self.assertRegexpMatches(repr(c_ulong.from_param(20000)), r"^<cparam '[LI]' \(20000\)>$")
|
||||
+ self.assertRegexpMatches(repr(c_longlong.from_param(20000)), r"^<cparam '[liq]' \(20000\)>$")
|
||||
+ self.assertRegexpMatches(repr(c_ulonglong.from_param(20000)), r"^<cparam '[LIQ]' \(20000\)>$")
|
||||
+ self.assertEqual(repr(c_float.from_param(1.5)), "<cparam 'f' (1.5)>")
|
||||
+ self.assertEqual(repr(c_double.from_param(1.5)), "<cparam 'd' (1.5)>")
|
||||
+ self.assertEqual(repr(c_double.from_param(1e300)), "<cparam 'd' (1e+300)>")
|
||||
+ self.assertRegexpMatches(repr(c_longdouble.from_param(1.5)), r"^<cparam ('d' \(1.5\)|'g' at 0x[A-Fa-f0-9]+)>$")
|
||||
+ self.assertRegexpMatches(repr(c_char_p.from_param(b'hihi')), "^<cparam 'z' \(0x[A-Fa-f0-9]+\)>$")
|
||||
+ self.assertRegexpMatches(repr(c_wchar_p.from_param('hihi')), "^<cparam 'Z' \(0x[A-Fa-f0-9]+\)>$")
|
||||
+ self.assertRegexpMatches(repr(c_void_p.from_param(0x12)), r"^<cparam 'P' \(0x0*12\)>$")
|
||||
+
|
||||
################################################################
|
||||
|
||||
if __name__ == '__main__':
|
||||
--- a/Modules/_ctypes/callproc.c
|
||||
+++ b/Modules/_ctypes/callproc.c
|
||||
@@ -460,50 +460,53 @@ PyCArg_dealloc(PyCArgObject *self)
|
||||
static PyObject *
|
||||
PyCArg_repr(PyCArgObject *self)
|
||||
{
|
||||
- char buffer[256];
|
||||
switch(self->tag) {
|
||||
case 'b':
|
||||
case 'B':
|
||||
- sprintf(buffer, "<cparam '%c' (%d)>",
|
||||
+ return PyString_FromFormat("<cparam '%c' (%d)>",
|
||||
self->tag, self->value.b);
|
||||
- break;
|
||||
case 'h':
|
||||
case 'H':
|
||||
- sprintf(buffer, "<cparam '%c' (%d)>",
|
||||
+ return PyString_FromFormat("<cparam '%c' (%d)>",
|
||||
self->tag, self->value.h);
|
||||
- break;
|
||||
case 'i':
|
||||
case 'I':
|
||||
- sprintf(buffer, "<cparam '%c' (%d)>",
|
||||
+ return PyString_FromFormat("<cparam '%c' (%d)>",
|
||||
self->tag, self->value.i);
|
||||
- break;
|
||||
case 'l':
|
||||
case 'L':
|
||||
- sprintf(buffer, "<cparam '%c' (%ld)>",
|
||||
+ return PyString_FromFormat("<cparam '%c' (%ld)>",
|
||||
self->tag, self->value.l);
|
||||
- break;
|
||||
|
||||
#ifdef HAVE_LONG_LONG
|
||||
case 'q':
|
||||
case 'Q':
|
||||
- sprintf(buffer,
|
||||
- "<cparam '%c' (%" PY_FORMAT_LONG_LONG "d)>",
|
||||
+ return PyString_FromFormat("<cparam '%c' (%" PY_FORMAT_LONG_LONG "d)>",
|
||||
self->tag, self->value.q);
|
||||
- break;
|
||||
#endif
|
||||
case 'd':
|
||||
- sprintf(buffer, "<cparam '%c' (%f)>",
|
||||
- self->tag, self->value.d);
|
||||
- break;
|
||||
- case 'f':
|
||||
- sprintf(buffer, "<cparam '%c' (%f)>",
|
||||
- self->tag, self->value.f);
|
||||
- break;
|
||||
+ case 'f': {
|
||||
+ PyObject *f = PyFloat_FromDouble((self->tag == 'f') ? self->value.f : self->value.d);
|
||||
+ if (f == NULL) {
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ PyObject *r = PyObject_Repr(f);
|
||||
+ Py_DECREF(f);
|
||||
+ if (r == NULL) {
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ char *value = PyString_AsString(r);
|
||||
+ if (value == NULL) {
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ PyObject *result = PyString_FromFormat("<cparam '%c' (%s)>", self->tag, value);
|
||||
+ Py_DECREF(r);
|
||||
+ return result;
|
||||
+ }
|
||||
|
||||
case 'c':
|
||||
- sprintf(buffer, "<cparam '%c' (%c)>",
|
||||
+ return PyString_FromFormat("<cparam '%c' (%c)>",
|
||||
self->tag, self->value.c);
|
||||
- break;
|
||||
|
||||
/* Hm, are these 'z' and 'Z' codes useful at all?
|
||||
Shouldn't they be replaced by the functionality of c_string
|
||||
@@ -512,16 +515,13 @@ PyCArg_repr(PyCArgObject *self)
|
||||
case 'z':
|
||||
case 'Z':
|
||||
case 'P':
|
||||
- sprintf(buffer, "<cparam '%c' (%p)>",
|
||||
+ return PyString_FromFormat("<cparam '%c' (%p)>",
|
||||
self->tag, self->value.p);
|
||||
- break;
|
||||
|
||||
default:
|
||||
- sprintf(buffer, "<cparam '%c' at %p>",
|
||||
+ return PyString_FromFormat("<cparam '%c' at %p>",
|
||||
self->tag, self);
|
||||
- break;
|
||||
}
|
||||
- return PyString_FromString(buffer);
|
||||
}
|
||||
|
||||
static PyMemberDef PyCArgType_members[] = {
|
||||
151
debian/patches/CVE-2022-0391.diff
vendored
Normal file
151
debian/patches/CVE-2022-0391.diff
vendored
Normal file
@@ -0,0 +1,151 @@
|
||||
From 76cd81d60310d65d01f9d7b48a8985d8ab89c8b4 Mon Sep 17 00:00:00 2001
|
||||
From: Senthil Kumaran <senthil@uthcode.com>
|
||||
Date: Thu, 29 Apr 2021 10:16:50 -0700
|
||||
Subject: [PATCH] bpo-43882 - urllib.parse should sanitize urls containing
|
||||
ASCII newline and tabs. (GH-25595)
|
||||
|
||||
* issue43882 - urllib.parse should sanitize urls containing ASCII newline and tabs.
|
||||
|
||||
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
||||
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
||||
---
|
||||
Doc/library/urllib.parse.rst | 13 +++++++++
|
||||
Lib/test/test_urlparse.py | 29 +++++++++++++++++++
|
||||
Lib/urllib/parse.py | 6 ++++
|
||||
.../2021-04-25-07-46-37.bpo-43882.Jpwx85.rst | 6 ++++
|
||||
4 files changed, 54 insertions(+)
|
||||
create mode 100644 Misc/NEWS.d/next/Security/2021-04-25-07-46-37.bpo-43882.Jpwx85.rst
|
||||
|
||||
From 985ac016373403e8ad41f8d563c4355ffa8d49ff Mon Sep 17 00:00:00 2001
|
||||
From: Senthil Kumaran <senthil@uthcode.com>
|
||||
Date: Wed, 5 May 2021 15:50:05 -0700
|
||||
Subject: [PATCH] bpo-43882 Remove the newline, and tab early. From query and
|
||||
fragments. (GH-25921)
|
||||
|
||||
---
|
||||
Lib/test/test_urlparse.py | 24 ++++++++++++++++--------
|
||||
Lib/urllib/parse.py | 8 +++++---
|
||||
2 files changed, 21 insertions(+), 11 deletions(-)
|
||||
|
||||
Backport:
|
||||
* Drop Misc/NEWS.d
|
||||
* urllib.parse -> urlparse
|
||||
* Update hunk context
|
||||
|
||||
diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst
|
||||
index 67c2120819..0aaac56288 100644
|
||||
--- a/Doc/library/urlparse.rst
|
||||
+++ b/Doc/library/urlparse.rst
|
||||
@@ -312,6 +312,9 @@ or on combining URL components into a URL string.
|
||||
decomposed before parsing, or is not a Unicode string, no error will be
|
||||
raised.
|
||||
|
||||
+ Following the `WHATWG spec`_ that updates RFC 3986, ASCII newline
|
||||
+ ``\n``, ``\r`` and tab ``\t`` characters are stripped from the URL.
|
||||
+
|
||||
.. versionadded:: 2.2
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
@@ -320,6 +323,10 @@ or on combining URL components into a URL string.
|
||||
Characters that affect netloc parsing under NFKC normalization will
|
||||
now raise :exc:`ValueError`.
|
||||
|
||||
+ .. versionchanged:: 2.7 security update
|
||||
+ ASCII newline and tab characters are stripped from the URL.
|
||||
+
|
||||
+.. _WHATWG spec: https://url.spec.whatwg.org/#concept-basic-url-parser
|
||||
|
||||
.. function:: urlunsplit(parts)
|
||||
|
||||
@@ -674,6 +681,10 @@ task isn't already covered by the URL parsing functions above.
|
||||
|
||||
.. seealso::
|
||||
|
||||
+ `WHATWG`_ - URL Living standard
|
||||
+ Working Group for the URL Standard that defines URLs, domains, IP addresses, the
|
||||
+ application/x-www-form-urlencoded format, and their API.
|
||||
+
|
||||
:rfc:`3986` - Uniform Resource Identifiers
|
||||
This is the current standard (STD66). Any changes to urlparse module
|
||||
should conform to this. Certain deviations could be observed, which are
|
||||
@@ -697,6 +708,8 @@ task isn't already covered by the URL parsing functions above.
|
||||
|
||||
:rfc:`1738` - Uniform Resource Locators (URL)
|
||||
This specifies the formal syntax and semantics of absolute URLs.
|
||||
+
|
||||
+.. _WHATWG: https://url.spec.whatwg.org/
|
||||
|
||||
|
||||
.. _urlparse-result-object:
|
||||
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
|
||||
--- a/Lib/test/test_urlparse.py
|
||||
+++ b/Lib/test/test_urlparse.py
|
||||
@@ -612,6 +612,43 @@
|
||||
self.assertEqual(p1.params, 'phone-context=+1-914-555')
|
||||
|
||||
|
||||
+ def test_urlsplit_remove_unsafe_bytes(self):
|
||||
+ # Remove ASCII tabs and newlines from input
|
||||
+ url = "http\t://www.python\n.org\t/java\nscript:\talert('msg\r\n')/?query\n=\tsomething#frag\nment"
|
||||
+ p = urlparse.urlsplit(url)
|
||||
+ self.assertEqual(p.scheme, "http")
|
||||
+ self.assertEqual(p.netloc, "www.python.org")
|
||||
+ self.assertEqual(p.path, "/javascript:alert('msg')/")
|
||||
+ self.assertEqual(p.query, "query=something")
|
||||
+ self.assertEqual(p.fragment, "fragment")
|
||||
+ self.assertEqual(p.username, None)
|
||||
+ self.assertEqual(p.password, None)
|
||||
+ self.assertEqual(p.hostname, "www.python.org")
|
||||
+ self.assertEqual(p.port, None)
|
||||
+ self.assertEqual(p.geturl(), "http://www.python.org/javascript:alert('msg')/?query=something#fragment")
|
||||
+
|
||||
+ # Remove ASCII tabs and newlines from input as bytes.
|
||||
+ url = b"http\t://www.python\n.org\t/java\nscript:\talert('msg\r\n')/?query\n=\tsomething#frag\nment"
|
||||
+ p = urlparse.urlsplit(url)
|
||||
+ self.assertEqual(p.scheme, b"http")
|
||||
+ self.assertEqual(p.netloc, b"www.python.org")
|
||||
+ self.assertEqual(p.path, b"/javascript:alert('msg')/")
|
||||
+ self.assertEqual(p.query, b"query=something")
|
||||
+ self.assertEqual(p.fragment, b"fragment")
|
||||
+ self.assertEqual(p.username, None)
|
||||
+ self.assertEqual(p.password, None)
|
||||
+ self.assertEqual(p.hostname, b"www.python.org")
|
||||
+ self.assertEqual(p.port, None)
|
||||
+ self.assertEqual(p.geturl(), b"http://www.python.org/javascript:alert('msg')/?query=something#fragment")
|
||||
+
|
||||
+ # with scheme as cache-key
|
||||
+ url = "http://www.python.org/java\nscript:\talert('msg\r\n')/?query\n=\tsomething#frag\nment"
|
||||
+ scheme = "ht\ntp"
|
||||
+ for _ in range(2):
|
||||
+ p = urlparse.urlsplit(url, scheme=scheme)
|
||||
+ self.assertEqual(p.scheme, "http")
|
||||
+ self.assertEqual(p.geturl(), "http://www.python.org/javascript:alert('msg')/?query=something#fragment")
|
||||
+
|
||||
def test_attributes_bad_port(self):
|
||||
"""Check handling of non-integer ports."""
|
||||
p = urlparse.urlsplit("http://www.example.net:foo")
|
||||
diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py
|
||||
--- a/Lib/urlparse.py
|
||||
+++ b/Lib/urlparse.py
|
||||
@@ -78,6 +78,9 @@
|
||||
'0123456789'
|
||||
'+-.')
|
||||
|
||||
+# Unsafe bytes to be removed per WHATWG spec
|
||||
+_UNSAFE_URL_BYTES_TO_REMOVE = ['\t', '\r', '\n']
|
||||
+
|
||||
MAX_CACHE_SIZE = 20
|
||||
_parse_cache = {}
|
||||
|
||||
@@ -456,6 +456,11 @@ def urlsplit(url, scheme='', allow_fragments=True):
|
||||
Return a 5-tuple: (scheme, netloc, path, query, fragment).
|
||||
Note that we don't break the components up in smaller bits
|
||||
(e.g. netloc is a single string) and we don't expand % escapes."""
|
||||
+
|
||||
+ for b in _UNSAFE_URL_BYTES_TO_REMOVE:
|
||||
+ url = url.replace(b, "")
|
||||
+ scheme = scheme.replace(b, "")
|
||||
+
|
||||
allow_fragments = bool(allow_fragments)
|
||||
key = url, scheme, allow_fragments, type(url), type(scheme)
|
||||
cached = _parse_cache.get(key, None)
|
||||
155
debian/patches/CVE-2022-48560.diff
vendored
Normal file
155
debian/patches/CVE-2022-48560.diff
vendored
Normal file
@@ -0,0 +1,155 @@
|
||||
From 79f89e6e5a659846d1068e8b1bd8e491ccdef861 Mon Sep 17 00:00:00 2001
|
||||
From: Pablo Galindo <Pablogsal@gmail.com>
|
||||
Date: Thu, 23 Jan 2020 14:07:05 +0000
|
||||
Subject: [PATCH] bpo-39421: Fix posible crash in heapq with custom comparison
|
||||
operators (GH-18118)
|
||||
|
||||
* bpo-39421: Fix posible crash in heapq with custom comparison operators
|
||||
|
||||
* fixup! bpo-39421: Fix posible crash in heapq with custom comparison operators
|
||||
|
||||
* fixup! fixup! bpo-39421: Fix posible crash in heapq with custom comparison operators
|
||||
---
|
||||
Lib/test/test_heapq.py | 31 ++++++++++++++++
|
||||
.../2020-01-22-15-53-37.bpo-39421.O3nG7u.rst | 2 ++
|
||||
Modules/_heapqmodule.c | 35 ++++++++++++++-----
|
||||
3 files changed, 59 insertions(+), 9 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Core and Builtins/2020-01-22-15-53-37.bpo-39421.O3nG7u.rst
|
||||
|
||||
Backport:
|
||||
* Drop Misc/NEWS.d
|
||||
* test_heapq.py:
|
||||
+ Update hunk context
|
||||
+ list.clear() -> del list[:]
|
||||
* _heapqmodule.c: Port the patch with significant changes
|
||||
+ PyObject_RichCompareBool -> cmp_lt
|
||||
+ X[Y] -> PyList_GET_ITEM(X, Y)
|
||||
+ 4th hunk: newitem refcount is already incremented, parent refcount extended
|
||||
|
||||
diff --git a/Lib/test/test_heapq.py b/Lib/test/test_heapq.py
|
||||
index 861ba7540d..6902573e8f 100644
|
||||
--- a/Lib/test/test_heapq.py
|
||||
+++ b/Lib/test/test_heapq.py
|
||||
@@ -432,6 +432,37 @@ def test_heappop_mutating_heap(self):
|
||||
with self.assertRaises((IndexError, RuntimeError)):
|
||||
self.module.heappop(heap)
|
||||
|
||||
+ def test_comparison_operator_modifiying_heap(self):
|
||||
+ # See bpo-39421: Strong references need to be taken
|
||||
+ # when comparing objects as they can alter the heap
|
||||
+ class EvilClass(int):
|
||||
+ def __lt__(self, o):
|
||||
+ del heap[:]
|
||||
+ return NotImplemented
|
||||
+
|
||||
+ heap = []
|
||||
+ self.module.heappush(heap, EvilClass(0))
|
||||
+ self.assertRaises(IndexError, self.module.heappushpop, heap, 1)
|
||||
+
|
||||
+ def test_comparison_operator_modifiying_heap_two_heaps(self):
|
||||
+
|
||||
+ class h(int):
|
||||
+ def __lt__(self, o):
|
||||
+ del list2[:]
|
||||
+ return NotImplemented
|
||||
+
|
||||
+ class g(int):
|
||||
+ def __lt__(self, o):
|
||||
+ del list1[:]
|
||||
+ return NotImplemented
|
||||
+
|
||||
+ list1, list2 = [], []
|
||||
+
|
||||
+ self.module.heappush(list1, h(0))
|
||||
+ self.module.heappush(list2, g(0))
|
||||
+
|
||||
+ self.assertRaises((IndexError, RuntimeError), self.module.heappush, list1, g(1))
|
||||
+ self.assertRaises((IndexError, RuntimeError), self.module.heappush, list2, h(1))
|
||||
|
||||
class TestErrorHandlingPython(TestErrorHandling):
|
||||
module = py_heapq
|
||||
diff --git a/Modules/_heapqmodule.c b/Modules/_heapqmodule.c
|
||||
index a84cade3aa..6bc18b5f82 100644
|
||||
--- a/Modules/_heapqmodule.c
|
||||
+++ b/Modules/_heapqmodule.c
|
||||
@@ -36,7 +36,11 @@ siftdown(PyListObject *heap, Py_ssize_t startpos, Py_ssize_t pos)
|
||||
while (pos > startpos) {
|
||||
parentpos = (pos - 1) >> 1;
|
||||
parent = PyList_GET_ITEM(heap, parentpos);
|
||||
+ Py_INCREF(newitem);
|
||||
+ Py_INCREF(parent);
|
||||
cmp = cmp_lt(newitem, parent);
|
||||
+ Py_DECREF(parent);
|
||||
+ Py_DECREF(newitem);
|
||||
if (cmp == -1)
|
||||
return -1;
|
||||
if (size != PyList_GET_SIZE(heap)) {
|
||||
@@ -78,9 +82,13 @@ siftup(PyListObject *heap, Py_ssize_t pos)
|
||||
childpos = 2*pos + 1; /* leftmost child position */
|
||||
rightpos = childpos + 1;
|
||||
if (rightpos < endpos) {
|
||||
- cmp = cmp_lt(
|
||||
- PyList_GET_ITEM(heap, childpos),
|
||||
- PyList_GET_ITEM(heap, rightpos));
|
||||
+ PyObject* a = PyList_GET_ITEM(heap, childpos);
|
||||
+ PyObject* b = PyList_GET_ITEM(heap, rightpos);
|
||||
+ Py_INCREF(a);
|
||||
+ Py_INCREF(b);
|
||||
+ cmp = cmp_lt(a, b);
|
||||
+ Py_DECREF(a);
|
||||
+ Py_DECREF(b);
|
||||
if (cmp == -1)
|
||||
return -1;
|
||||
if (cmp == 0)
|
||||
@@ -264,7 +271,10 @@ _heapq_heappushpop_impl(PyObject *module, PyObject *heap, PyObject *item)
|
||||
return item;
|
||||
}
|
||||
|
||||
- cmp = cmp_lt(PyList_GET_ITEM(heap, 0), item);
|
||||
+ PyObject* top = PyList_GET_ITEM(heap, 0);
|
||||
+ Py_INCREF(top);
|
||||
+ cmp = cmp_lt(top, item);
|
||||
+ Py_DECREF(top);
|
||||
if (cmp == -1)
|
||||
return NULL;
|
||||
if (cmp == 0) {
|
||||
@@ -420,14 +430,17 @@ siftdown_max(PyListObject *heap, Py_ssize_t startpos, Py_ssize_t pos)
|
||||
while (pos > startpos){
|
||||
parentpos = (pos - 1) >> 1;
|
||||
parent = PyList_GET_ITEM(heap, parentpos);
|
||||
+ Py_INCREF(parent);
|
||||
cmp = cmp_lt(parent, newitem);
|
||||
if (cmp == -1) {
|
||||
+ Py_DECREF(parent);
|
||||
Py_DECREF(newitem);
|
||||
return -1;
|
||||
}
|
||||
- if (cmp == 0)
|
||||
+ if (cmp == 0) {
|
||||
+ Py_DECREF(parent);
|
||||
break;
|
||||
+ }
|
||||
- Py_INCREF(parent);
|
||||
Py_DECREF(PyList_GET_ITEM(heap, pos));
|
||||
PyList_SET_ITEM(heap, pos, parent);
|
||||
pos = parentpos;
|
||||
@@ -462,9 +476,13 @@ siftup_max(PyListObject *heap, Py_ssize_t pos)
|
||||
childpos = 2*pos + 1; /* leftmost child position */
|
||||
rightpos = childpos + 1;
|
||||
if (rightpos < endpos) {
|
||||
- cmp = cmp_lt(
|
||||
- PyList_GET_ITEM(heap, rightpos),
|
||||
- PyList_GET_ITEM(heap, childpos));
|
||||
+ PyObject* a = PyList_GET_ITEM(heap, rightpos);
|
||||
+ PyObject* b = PyList_GET_ITEM(heap, childpos);
|
||||
+ Py_INCREF(a);
|
||||
+ Py_INCREF(b);
|
||||
+ cmp = cmp_lt(a, b);
|
||||
+ Py_DECREF(a);
|
||||
+ Py_DECREF(b);
|
||||
if (cmp == -1) {
|
||||
Py_DECREF(newitem);
|
||||
return -1;
|
||||
--
|
||||
2.40.1
|
||||
|
||||
90
debian/patches/CVE-2022-48565.diff
vendored
Normal file
90
debian/patches/CVE-2022-48565.diff
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
From 05ee790f4d1cd8725a90b54268fc1dfe5b4d1fa2 Mon Sep 17 00:00:00 2001
|
||||
From: Ronald Oussoren <ronaldoussoren@mac.com>
|
||||
Date: Mon, 19 Oct 2020 20:13:49 +0200
|
||||
Subject: [PATCH] bpo-42051: Reject XML entity declarations in plist files
|
||||
(#22760)
|
||||
|
||||
---
|
||||
Lib/plistlib.py | 7 +++++++
|
||||
Lib/test/test_plistlib.py | 18 ++++++++++++++++++
|
||||
.../2020-10-19-10-56-27.bpo-42051.EU_B7u.rst | 3 +++
|
||||
3 files changed, 28 insertions(+)
|
||||
create mode 100644 Misc/NEWS.d/next/Security/2020-10-19-10-56-27.bpo-42051.EU_B7u.rst
|
||||
|
||||
Backport:
|
||||
* Drop Misc/NEWS.d
|
||||
* plistlib.py:
|
||||
* Handle cAmElCaSe vs under_scores
|
||||
* self.parser vs parser
|
||||
* Degrade InvalidFileException to ValueError
|
||||
* test_plistlib.py:
|
||||
* Update hunk context
|
||||
* Drop b"" prefix
|
||||
* Degrade InvalidFileException to ValueError
|
||||
* Adapt parser invocation to older API
|
||||
* Reimplement assertRaisesRegexp
|
||||
|
||||
diff --git a/Lib/plistlib.py b/Lib/plistlib.py
|
||||
index aff5fe36ca..ba7ac19364 100644
|
||||
--- a/Lib/plistlib.py
|
||||
+++ b/Lib/plistlib.py
|
||||
@@ -173,9 +173,16 @@ def parse(self, fileobj):
|
||||
parser.StartElementHandler = self.handleBeginElement
|
||||
parser.EndElementHandler = self.handleEndElement
|
||||
parser.CharacterDataHandler = self.handleData
|
||||
+ parser.EntityDeclHandler = self.handleEntityDecl
|
||||
parser.ParseFile(fileobj)
|
||||
return self.root
|
||||
|
||||
+ def handleEntityDecl(self, entity_name, is_parameter_entity, value, base, system_id, public_id, notation_name):
|
||||
+ # Reject plist files with entity declarations to avoid XML vulnerabilies in expat.
|
||||
+ # Regular plist files don't contain those declerations, and Apple's plutil tool does not
|
||||
+ # accept them either.
|
||||
+ raise ValueError("XML entity declarations are not supported in plist files")
|
||||
+
|
||||
def handleBeginElement(self, element, attrs):
|
||||
self.data = []
|
||||
handler = getattr(self, "begin_" + element, None)
|
||||
diff --git a/Lib/test/test_plistlib.py b/Lib/test/test_plistlib.py
|
||||
index e5c9b5b6b2..cb071da1f3 100644
|
||||
--- a/Lib/test/test_plistlib.py
|
||||
+++ b/Lib/test/test_plistlib.py
|
||||
@@ -106,6 +106,19 @@
|
||||
</plist>
|
||||
""".replace(" " * 8, "\t") # Apple as well as plistlib.py output hard tabs
|
||||
|
||||
+XML_PLIST_WITH_ENTITY='''\
|
||||
+<?xml version="1.0" encoding="UTF-8"?>
|
||||
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd" [
|
||||
+ <!ENTITY entity "replacement text">
|
||||
+ ]>
|
||||
+<plist version="1.0">
|
||||
+ <dict>
|
||||
+ <key>A</key>
|
||||
+ <string>&entity;</string>
|
||||
+ </dict>
|
||||
+</plist>
|
||||
+'''
|
||||
+
|
||||
|
||||
class TestPlistlib(unittest.TestCase):
|
||||
|
||||
@@ -524,6 +537,15 @@ def test_modified_uid_huge(self):
|
||||
self.assertEqual(test1, result1)
|
||||
self.assertEqual(test2, result2)
|
||||
|
||||
+ def test_xml_plist_with_entity_decl(self):
|
||||
+ try:
|
||||
+ plistlib.readPlistFromString(XML_PLIST_WITH_ENTITY)
|
||||
+ except ValueError as e:
|
||||
+ self.assertIn("XML entity declarations are not supported",
|
||||
+ e.message)
|
||||
+ else:
|
||||
+ self.fail("expected ValueError to be raised")
|
||||
+
|
||||
|
||||
def test_main():
|
||||
test_support.run_unittest(TestPlistlib)
|
||||
--
|
||||
2.40.1
|
||||
|
||||
40
debian/patches/CVE-2022-48566.diff
vendored
Normal file
40
debian/patches/CVE-2022-48566.diff
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
From c1bbca5b004b3f74d240ef8a76ff445cc1a27efb Mon Sep 17 00:00:00 2001
|
||||
From: "Miss Islington (bot)"
|
||||
<31488909+miss-islington@users.noreply.github.com>
|
||||
Date: Sat, 21 Nov 2020 01:18:41 -0800
|
||||
Subject: [PATCH] bpo-40791: Make compare_digest more constant-time. (GH-20444)
|
||||
|
||||
* bpo-40791: Make compare_digest more constant-time.
|
||||
|
||||
The existing volatile `left`/`right` pointers guarantee that the reads will all occur, but does not guarantee that they will be _used_. So a compiler can still short-circuit the loop, saving e.g. the overhead of doing the xors and especially the overhead of the data dependency between `result` and the reads. That would change performance depending on where the first unequal byte occurs. This change removes that optimization.
|
||||
|
||||
(This is change GH-1 from https://bugs.python.org/issue40791 .)
|
||||
(cherry picked from commit 31729366e2bc09632e78f3896dbce0ae64914f28)
|
||||
|
||||
Co-authored-by: Devin Jeanpierre <jeanpierreda@google.com>
|
||||
---
|
||||
.../next/Security/2020-05-28-06-06-47.bpo-40791.QGZClX.rst | 1 +
|
||||
Modules/_operator.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Security/2020-05-28-06-06-47.bpo-40791.QGZClX.rst
|
||||
|
||||
Backport:
|
||||
* Drop Misc/NEWS.d
|
||||
* _operator.c -> operator.c
|
||||
|
||||
diff --git a/Modules/_operator.c b/Modules/_operator.c
|
||||
index 8a54829e5b..6f8f68f459 100644
|
||||
--- a/Modules/operator.c
|
||||
+++ b/Modules/operator.c
|
||||
@@ -735,7 +735,7 @@ _tscmp(const unsigned char *a, const unsigned char *b,
|
||||
volatile const unsigned char *left;
|
||||
volatile const unsigned char *right;
|
||||
Py_ssize_t i;
|
||||
- unsigned char result;
|
||||
+ volatile unsigned char result;
|
||||
|
||||
/* loop count depends on length of b */
|
||||
length = len_b;
|
||||
--
|
||||
2.40.1
|
||||
|
||||
264
debian/patches/CVE-2023-24329.diff
vendored
Normal file
264
debian/patches/CVE-2023-24329.diff
vendored
Normal file
@@ -0,0 +1,264 @@
|
||||
From 439b9cfaf43080e91c4ad69f312f21fa098befc7 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Kallus <49924171+kenballus@users.noreply.github.com>
|
||||
Date: Sun, 13 Nov 2022 18:25:55 +0000
|
||||
Subject: [PATCH] gh-99418: Make urllib.parse.urlparse enforce that a scheme
|
||||
must begin with an alphabetical ASCII character. (#99421)
|
||||
|
||||
Prevent urllib.parse.urlparse from accepting schemes that don't begin with an alphabetical ASCII character.
|
||||
|
||||
RFC 3986 defines a scheme like this: `scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )`
|
||||
RFC 2234 defines an ALPHA like this: `ALPHA = %x41-5A / %x61-7A`
|
||||
|
||||
The WHATWG URL spec defines a scheme like this:
|
||||
`"A URL-scheme string must be one ASCII alpha, followed by zero or more of ASCII alphanumeric, U+002B (+), U+002D (-), and U+002E (.)."`
|
||||
---
|
||||
Lib/test/test_urlparse.py | 18 ++++++++++++++++++
|
||||
Lib/urllib/parse.py | 2 +-
|
||||
...22-11-12-15-45-51.gh-issue-99418.FxfAXS.rst | 2 ++
|
||||
3 files changed, 21 insertions(+), 1 deletion(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Library/2022-11-12-15-45-51.gh-issue-99418.FxfAXS.rst
|
||||
|
||||
From 2f630e1ce18ad2e07428296532a68b11dc66ad10 Mon Sep 17 00:00:00 2001
|
||||
From: Illia Volochii <illia.volochii@gmail.com>
|
||||
Date: Wed, 17 May 2023 11:49:20 +0300
|
||||
Subject: [PATCH] gh-102153: Start stripping C0 control and space chars in
|
||||
`urlsplit` (#102508)
|
||||
|
||||
`urllib.parse.urlsplit` has already been respecting the WHATWG spec a bit #25595.
|
||||
|
||||
This adds more sanitizing to respect the "Remove any leading C0 control or space from input" [rule](https://url.spec.whatwg.org/#url-parsing:~:text=Remove%20any%20leading%20and%20trailing%20C0%20control%20or%20space%20from%20input.) in response to [CVE-2023-24329](https://nvd.nist.gov/vuln/detail/CVE-2023-24329).
|
||||
|
||||
---------
|
||||
|
||||
Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
|
||||
---
|
||||
Doc/library/urllib.parse.rst | 46 +++++++++++++-
|
||||
Lib/test/test_urlparse.py | 61 ++++++++++++++++++-
|
||||
Lib/urllib/parse.py | 12 ++++
|
||||
...-03-07-20-59-17.gh-issue-102153.14CLSZ.rst | 3 +
|
||||
4 files changed, 119 insertions(+), 3 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Security/2023-03-07-20-59-17.gh-issue-102153.14CLSZ.rst
|
||||
|
||||
Backport:
|
||||
* Drop Misc/NEWS.d
|
||||
* urllib.parse -> urlparse
|
||||
* Update hunk context
|
||||
* Implement str.isascii
|
||||
* test_urlparse.py:
|
||||
* Various str vs bytes issues
|
||||
* Drop hunk in test_attributes_bad_port
|
||||
* Avoid using TestCase.subTest
|
||||
* Don't use non-ascii in source
|
||||
|
||||
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
|
||||
--- a/Lib/test/test_urlparse.py
|
||||
+++ b/Lib/test/test_urlparse.py
|
||||
@@ -654,6 +654,65 @@ def test_urlsplit_remove_unsafe_bytes(self):
|
||||
self.assertEqual(p.scheme, "http")
|
||||
self.assertEqual(p.geturl(), "http://www.python.org/javascript:alert('msg')/?query=something#fragment")
|
||||
|
||||
+ def test_urlsplit_strip_url(self):
|
||||
+ noise = "".join(map(chr, range(0, 0x20 + 1)))
|
||||
+ base_url = "http://User:Pass@www.python.org:080/doc/?query=yes#frag"
|
||||
+
|
||||
+ url = (noise + base_url).decode("utf8")
|
||||
+ p = urlparse.urlsplit(url)
|
||||
+ self.assertEqual(p.scheme, u"http")
|
||||
+ self.assertEqual(p.netloc, u"User:Pass@www.python.org:080")
|
||||
+ self.assertEqual(p.path, u"/doc/")
|
||||
+ self.assertEqual(p.query, u"query=yes")
|
||||
+ self.assertEqual(p.fragment, u"frag")
|
||||
+ self.assertEqual(p.username, u"User")
|
||||
+ self.assertEqual(p.password, u"Pass")
|
||||
+ self.assertEqual(p.hostname, u"www.python.org")
|
||||
+ self.assertEqual(p.port, 80)
|
||||
+ self.assertEqual(p.geturl(), base_url.decode("utf8"))
|
||||
+
|
||||
+ url = noise + base_url
|
||||
+ p = urlparse.urlsplit(url)
|
||||
+ self.assertEqual(p.scheme, b"http")
|
||||
+ self.assertEqual(p.netloc, b"User:Pass@www.python.org:080")
|
||||
+ self.assertEqual(p.path, b"/doc/")
|
||||
+ self.assertEqual(p.query, b"query=yes")
|
||||
+ self.assertEqual(p.fragment, b"frag")
|
||||
+ self.assertEqual(p.username, b"User")
|
||||
+ self.assertEqual(p.password, b"Pass")
|
||||
+ self.assertEqual(p.hostname, b"www.python.org")
|
||||
+ self.assertEqual(p.port, 80)
|
||||
+ self.assertEqual(p.geturl(), base_url)
|
||||
+
|
||||
+ # Test that trailing space is preserved as some applications rely on
|
||||
+ # this within query strings.
|
||||
+ query_spaces_url = "https://www.python.org:88/doc/?query= "
|
||||
+ p = urlparse.urlsplit(noise + query_spaces_url)
|
||||
+ self.assertEqual(p.scheme, "https")
|
||||
+ self.assertEqual(p.netloc, "www.python.org:88")
|
||||
+ self.assertEqual(p.path, "/doc/")
|
||||
+ self.assertEqual(p.query, "query= ")
|
||||
+ self.assertEqual(p.port, 88)
|
||||
+ self.assertEqual(p.geturl(), query_spaces_url)
|
||||
+
|
||||
+ p = urlparse.urlsplit("www.pypi.org ")
|
||||
+ # That "hostname" gets considered a "path" due to the
|
||||
+ # trailing space and our existing logic... YUCK...
|
||||
+ # and re-assembles via geturl aka unurlsplit into the original.
|
||||
+ # django.core.validators.URLValidator (at least through v3.2) relies on
|
||||
+ # this, for better or worse, to catch it in a ValidationError via its
|
||||
+ # regular expressions.
|
||||
+ # Here we test the basic round trip concept of such a trailing space.
|
||||
+ self.assertEqual(urlparse.urlunsplit(p), "www.pypi.org ")
|
||||
+
|
||||
+ # with scheme as cache-key
|
||||
+ url = "//www.python.org/"
|
||||
+ scheme = noise + "https" + noise
|
||||
+ for _ in range(2):
|
||||
+ p = urlparse.urlsplit(url, scheme=scheme)
|
||||
+ self.assertEqual(p.scheme, "https")
|
||||
+ self.assertEqual(p.geturl(), "https://www.python.org/")
|
||||
+
|
||||
def test_attributes_bad_port(self):
|
||||
"""Check handling of non-integer ports."""
|
||||
p = urlparse.urlsplit("http://www.example.net:foo")
|
||||
@@ -668,6 +668,23 @@ def test_attributes_bad_port(self):
|
||||
self.assertEqual(p.netloc, "www.example.net:foo")
|
||||
self.assertRaises(ValueError, lambda: p.port)
|
||||
|
||||
+ def test_attributes_bad_scheme(self):
|
||||
+ """Check handling of invalid schemes."""
|
||||
+ for bytes in (False, True):
|
||||
+ for parse in (urlparse.urlsplit, urlparse.urlparse):
|
||||
+ for scheme in (u".", u"+", u"-", u"0", u"http&", u"\xe0http"):
|
||||
+ url = scheme + u"://www.example.net"
|
||||
+ if bytes:
|
||||
+ if all(ord(c) < 128 for c in url):
|
||||
+ url = url.encode("ascii")
|
||||
+ else:
|
||||
+ continue
|
||||
+ p = parse(url)
|
||||
+ if bytes:
|
||||
+ self.assertEqual(p.scheme, b"")
|
||||
+ else:
|
||||
+ self.assertEqual(p.scheme, u"")
|
||||
+
|
||||
def test_attributes_without_netloc(self):
|
||||
# This example is straight from RFC 3261. It looks like it
|
||||
# should allow the username, hostname, and port to be filled
|
||||
diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py
|
||||
index 9a3102afd6..4f6867accb 100644
|
||||
--- a/Lib/urlparse.py
|
||||
+++ b/Lib/urlparse.py
|
||||
@@ -25,6 +25,10 @@
|
||||
scenarios for parsing, and for backward compatibility purposes, some
|
||||
parsing quirks from older RFCs are retained. The testcases in
|
||||
test_urlparse.py provides a good indicator of parsing behavior.
|
||||
+
|
||||
+The WHATWG URL Parser spec should also be considered. We are not compliant with
|
||||
+it either due to existing user code API behavior expectations (Hyrum's Law).
|
||||
+It serves as a useful guide when making changes.
|
||||
|
||||
"""
|
||||
|
||||
@@ -80,6 +84,10 @@
|
||||
'0123456789'
|
||||
'+-.')
|
||||
|
||||
+# Leading and trailing C0 control and space to be stripped per WHATWG spec.
|
||||
+# == "".join([chr(i) for i in range(0, 0x20 + 1)])
|
||||
+_WHATWG_C0_CONTROL_OR_SPACE = '\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f '
|
||||
+
|
||||
# Unsafe bytes to be removed per WHATWG spec
|
||||
_UNSAFE_URL_BYTES_TO_REMOVE = ['\t', '\r', '\n']
|
||||
|
||||
@@ -464,9 +472,13 @@ def urlsplit(url, scheme='', allow_fragments=True):
|
||||
return cached
|
||||
if len(_parse_cache) >= MAX_CACHE_SIZE: # avoid runaway growth
|
||||
clear_cache()
|
||||
+ # Only lstrip url as some applications rely on preserving trailing space.
|
||||
+ # (https://url.spec.whatwg.org/#concept-basic-url-parser would strip both)
|
||||
+ url = url.lstrip(_WHATWG_C0_CONTROL_OR_SPACE)
|
||||
+ scheme = scheme.strip(_WHATWG_C0_CONTROL_OR_SPACE)
|
||||
netloc = query = fragment = ''
|
||||
i = url.find(':')
|
||||
- if i > 0:
|
||||
+ if i > 0 and ord(url[0]) < 128 and url[0].isalpha():
|
||||
if url[:i] == 'http': # optimize the common case
|
||||
scheme = url[:i].lower()
|
||||
url = url[i+1:]
|
||||
diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst
|
||||
index 96b3965107..5a9a53f83d 100644
|
||||
--- a/Doc/library/urlparse.rst
|
||||
+++ b/Doc/library/urlparse.rst
|
||||
@@ -159,6 +159,11 @@ or on combining URL components into a URL string.
|
||||
decomposed before parsing, or is not a Unicode string, no error will be
|
||||
raised.
|
||||
|
||||
+ .. warning::
|
||||
+
|
||||
+ :func:`urlparse` does not perform validation. See :ref:`URL parsing
|
||||
+ security <url-parsing-security>` for details.
|
||||
+
|
||||
.. versionchanged:: 2.5
|
||||
Added attributes to return value.
|
||||
|
||||
@@ -324,6 +328,15 @@ or on combining URL components into a URL string.
|
||||
Following the `WHATWG spec`_ that updates RFC 3986, ASCII newline
|
||||
``\n``, ``\r`` and tab ``\t`` characters are stripped from the URL.
|
||||
|
||||
+ Following some of the `WHATWG spec`_ that updates RFC 3986, leading C0
|
||||
+ control and space characters are stripped from the URL. ``\n``,
|
||||
+ ``\r`` and tab ``\t`` characters are removed from the URL at any position.
|
||||
+
|
||||
+ .. warning::
|
||||
+
|
||||
+ :func:`urlsplit` does not perform validation. See :ref:`URL parsing
|
||||
+ security <url-parsing-security>` for details.
|
||||
+
|
||||
.. versionadded:: 2.2
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
@@ -338,6 +348,9 @@ or on combining URL components into a URL string.
|
||||
.. versionchanged:: 2.7 security update
|
||||
ASCII newline and tab characters are stripped from the URL.
|
||||
|
||||
+ .. versionchanged:: 2.7 security update
|
||||
+ Leading WHATWG C0 control and space characters are stripped from the URL.
|
||||
+
|
||||
.. _WHATWG spec: https://url.spec.whatwg.org/#concept-basic-url-parser
|
||||
|
||||
.. function:: urlunsplit(parts)
|
||||
@@ -414,6 +427,35 @@ or on combining URL components into a URL string.
|
||||
.. _WHATWG: https://url.spec.whatwg.org/
|
||||
|
||||
|
||||
+.. _url-parsing-security:
|
||||
+
|
||||
+URL parsing security
|
||||
+--------------------
|
||||
+
|
||||
+The :func:`urlsplit` and :func:`urlparse` APIs do not perform **validation** of
|
||||
+inputs. They may not raise errors on inputs that other applications consider
|
||||
+invalid. They may also succeed on some inputs that might not be considered
|
||||
+URLs elsewhere. Their purpose is for practical functionality rather than
|
||||
+purity.
|
||||
+
|
||||
+Instead of raising an exception on unusual input, they may instead return some
|
||||
+component parts as empty strings. Or components may contain more than perhaps
|
||||
+they should.
|
||||
+
|
||||
+We recommend that users of these APIs where the values may be used anywhere
|
||||
+with security implications code defensively. Do some verification within your
|
||||
+code before trusting a returned component part. Does that ``scheme`` make
|
||||
+sense? Is that a sensible ``path``? Is there anything strange about that
|
||||
+``hostname``? etc.
|
||||
+
|
||||
+What constitutes a URL is not universally well defined. Different applications
|
||||
+have different needs and desired constraints. For instance the living `WHATWG
|
||||
+spec`_ describes what user facing web clients such as a web browser require.
|
||||
+While :rfc:`3986` is more general. These functions incorporate some aspects of
|
||||
+both, but cannot be claimed compliant with either. The APIs and existing user
|
||||
+code with expectations on specific behaviors predate both standards leading us
|
||||
+to be very cautious about making API behavior changes.
|
||||
+
|
||||
.. _urlparse-result-object:
|
||||
|
||||
Results of :func:`urlparse` and :func:`urlsplit`
|
||||
321
debian/patches/CVE-2023-40217.diff
vendored
Normal file
321
debian/patches/CVE-2023-40217.diff
vendored
Normal file
@@ -0,0 +1,321 @@
|
||||
From 0cb0c238d520a8718e313b52cffc356a5a7561bf Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C5=81ukasz=20Langa?= <lukasz@langa.pl>
|
||||
Date: Tue, 22 Aug 2023 19:53:15 +0200
|
||||
Subject: [PATCH] gh-108310: Fix CVE-2023-40217: Check for & avoid the ssl
|
||||
pre-close flaw (#108315)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Instances of `ssl.SSLSocket` were vulnerable to a bypass of the TLS handshake
|
||||
and included protections (like certificate verification) and treating sent
|
||||
unencrypted data as if it were post-handshake TLS encrypted data.
|
||||
|
||||
The vulnerability is caused when a socket is connected, data is sent by the
|
||||
malicious peer and stored in a buffer, and then the malicious peer closes the
|
||||
socket within a small timing window before the other peers’ TLS handshake can
|
||||
begin. After this sequence of events the closed socket will not immediately
|
||||
attempt a TLS handshake due to not being connected but will also allow the
|
||||
buffered data to be read as if a successful TLS handshake had occurred.
|
||||
|
||||
Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
|
||||
---
|
||||
Lib/ssl.py | 31 ++-
|
||||
Lib/test/test_ssl.py | 211 ++++++++++++++++++
|
||||
...-08-22-17-39-12.gh-issue-108310.fVM3sg.rst | 7 +
|
||||
3 files changed, 248 insertions(+), 1 deletion(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Security/2023-08-22-17-39-12.gh-issue-108310.fVM3sg.rst
|
||||
|
||||
From 64f99350351bc46e016b2286f36ba7cd669b79e3 Mon Sep 17 00:00:00 2001
|
||||
From: Victor Stinner <vstinner@python.org>
|
||||
Date: Wed, 23 Aug 2023 07:26:01 +0200
|
||||
Subject: [PATCH] gh-108342: Break ref cycle in SSLSocket._create() exc
|
||||
(#108344)
|
||||
|
||||
Explicitly break a reference cycle when SSLSocket._create() raises an
|
||||
exception. Clear the variable storing the exception, since the
|
||||
exception traceback contains the variables and so creates a reference
|
||||
cycle.
|
||||
|
||||
This test leak was introduced by the test added for the fix of #108310.
|
||||
---
|
||||
Lib/ssl.py | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
Backport:
|
||||
* ssl.py:
|
||||
* There is no socket.getblocking. In the connected case, we do not retain the
|
||||
timeout, because #8524 was never fixed on Python 2.7. In the disconnected
|
||||
case, we have to modify the timeout and therefore restore it.
|
||||
* Cannot use self.recv in c'tor, because it would access self._sslobj
|
||||
* socket.socket raises socket.error rather than OSError
|
||||
* test_ssl.py:
|
||||
* Merge imports
|
||||
* Inline socket_helper.bind_port
|
||||
* Delete non_linux_skip_if_other_okay_error: This backport is Linux-only
|
||||
* socket.socket isn't a ContextManager yet
|
||||
* http.client -> httplib
|
||||
* Implement assertRaises
|
||||
* Remove use of keyword-only arguments
|
||||
* Do not use f"strings"
|
||||
* Drop Misc/NEWS.d
|
||||
|
||||
diff --git a/Lib/ssl.py b/Lib/ssl.py
|
||||
index 1d58737264..ff363c75e7 100644
|
||||
--- a/Lib/ssl.py
|
||||
+++ b/Lib/ssl.py
|
||||
@@ -994,6 +994,38 @@ def _create(cls, sock, server_side=False, do_handshake_on_connect=True,
|
||||
if e.errno != errno.ENOTCONN:
|
||||
raise
|
||||
connected = False
|
||||
+ sock_timeout = self.gettimeout()
|
||||
+ self.settimeout(0)
|
||||
+ try:
|
||||
+ # We are not connected so this is not supposed to block, but
|
||||
+ # testing revealed otherwise on macOS and Windows so we do
|
||||
+ # the non-blocking dance regardless. Our raise when any data
|
||||
+ # is found means consuming the data is harmless.
|
||||
+ notconn_pre_handshake_data = self._sock.recv(1)
|
||||
+ except socket_error as e:
|
||||
+ # EINVAL occurs for recv(1) on non-connected on unix sockets.
|
||||
+ if e.errno not in (errno.ENOTCONN, errno.EINVAL):
|
||||
+ raise
|
||||
+ notconn_pre_handshake_data = b''
|
||||
+ self.settimeout(sock_timeout)
|
||||
+ if notconn_pre_handshake_data:
|
||||
+ # This prevents pending data sent to the socket before it was
|
||||
+ # closed from escaping to the caller who could otherwise
|
||||
+ # presume it came through a successful TLS connection.
|
||||
+ reason = "Closed before TLS handshake with data in recv buffer."
|
||||
+ notconn_pre_handshake_data_error = SSLError(e.errno, reason)
|
||||
+ # Add the SSLError attributes that _ssl.c always adds.
|
||||
+ notconn_pre_handshake_data_error.reason = reason
|
||||
+ notconn_pre_handshake_data_error.library = None
|
||||
+ try:
|
||||
+ self.close()
|
||||
+ except socket_error:
|
||||
+ pass
|
||||
+ try:
|
||||
+ raise notconn_pre_handshake_data_error
|
||||
+ finally:
|
||||
+ # Explicitly break the reference cycle.
|
||||
+ notconn_pre_handshake_data_error = None
|
||||
else:
|
||||
connected = True
|
||||
|
||||
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
|
||||
index 6117ca3fdb..ad5377ec05 100644
|
||||
--- a/Lib/test/test_ssl.py
|
||||
+++ b/Lib/test/test_ssl.py
|
||||
@@ -10,9 +10,11 @@
|
||||
import asyncore
|
||||
import socket
|
||||
import select
|
||||
+import struct
|
||||
import time
|
||||
import datetime
|
||||
import gc
|
||||
+import httplib
|
||||
import os
|
||||
import errno
|
||||
import pprint
|
||||
@@ -4659,5 +4662,196 @@ def sni_cb(sock, servername, ctx):
|
||||
if _have_threads:
|
||||
support.threading_cleanup(*thread_info)
|
||||
|
||||
+def set_socket_so_linger_on_with_zero_timeout(sock):
|
||||
+ sock.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, struct.pack('ii', 1, 0))
|
||||
+
|
||||
+
|
||||
+class TestPreHandshakeClose(unittest.TestCase):
|
||||
+ """Verify behavior of close sockets with received data before to the handshake.
|
||||
+ """
|
||||
+
|
||||
+ class SingleConnectionTestServerThread(threading.Thread):
|
||||
+
|
||||
+ def __init__(self, name, call_after_accept):
|
||||
+ self.call_after_accept = call_after_accept
|
||||
+ self.received_data = b'' # set by .run()
|
||||
+ self.wrap_error = None # set by .run()
|
||||
+ self.listener = None # set by .start()
|
||||
+ self.port = None # set by .start()
|
||||
+ super().__init__(name=name)
|
||||
+
|
||||
+ def __enter__(self):
|
||||
+ self.start()
|
||||
+ return self
|
||||
+
|
||||
+ def __exit__(self, *args):
|
||||
+ try:
|
||||
+ if self.listener:
|
||||
+ self.listener.close()
|
||||
+ except OSError:
|
||||
+ pass
|
||||
+ self.join()
|
||||
+ self.wrap_error = None # avoid dangling references
|
||||
+
|
||||
+ def start(self):
|
||||
+ self.ssl_ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
|
||||
+ self.ssl_ctx.verify_mode = ssl.CERT_REQUIRED
|
||||
+ self.ssl_ctx.load_verify_locations(cafile=ONLYCERT)
|
||||
+ self.ssl_ctx.load_cert_chain(certfile=ONLYCERT, keyfile=ONLYKEY)
|
||||
+ self.listener = socket.socket()
|
||||
+ self.listener.bind((None, 0))
|
||||
+ self.port = self.listener.getsockname()[1]
|
||||
+ self.listener.settimeout(2.0)
|
||||
+ self.listener.listen(1)
|
||||
+ super().start()
|
||||
+
|
||||
+ def run(self):
|
||||
+ conn, address = self.listener.accept()
|
||||
+ self.listener.close()
|
||||
+ with conn:
|
||||
+ if self.call_after_accept(conn):
|
||||
+ return
|
||||
+ try:
|
||||
+ tls_socket = self.ssl_ctx.wrap_socket(conn, server_side=True)
|
||||
+ except OSError as err: # ssl.SSLError inherits from OSError
|
||||
+ self.wrap_error = err
|
||||
+ else:
|
||||
+ try:
|
||||
+ self.received_data = tls_socket.recv(400)
|
||||
+ except OSError:
|
||||
+ pass # closed, protocol error, etc.
|
||||
+
|
||||
+ def test_preauth_data_to_tls_server(self):
|
||||
+ server_accept_called = threading.Event()
|
||||
+ ready_for_server_wrap_socket = threading.Event()
|
||||
+
|
||||
+ def call_after_accept(unused):
|
||||
+ server_accept_called.set()
|
||||
+ if not ready_for_server_wrap_socket.wait(2.0):
|
||||
+ raise RuntimeError("wrap_socket event never set, test may fail.")
|
||||
+ return False # Tell the server thread to continue.
|
||||
+
|
||||
+ server = self.SingleConnectionTestServerThread(
|
||||
+ call_after_accept=call_after_accept,
|
||||
+ name="preauth_data_to_tls_server")
|
||||
+ self.enterContext(server) # starts it & unittest.TestCase stops it.
|
||||
+
|
||||
+ with closing(socket.socket()) as client:
|
||||
+ client.connect(server.listener.getsockname())
|
||||
+ # This forces an immediate connection close via RST on .close().
|
||||
+ set_socket_so_linger_on_with_zero_timeout(client)
|
||||
+ client.setblocking(False)
|
||||
+
|
||||
+ server_accept_called.wait()
|
||||
+ client.send(b"DELETE /data HTTP/1.0\r\n\r\n")
|
||||
+ client.close() # RST
|
||||
+
|
||||
+ ready_for_server_wrap_socket.set()
|
||||
+ server.join()
|
||||
+ wrap_error = server.wrap_error
|
||||
+ self.assertEqual(b"", server.received_data)
|
||||
+ self.assertIsInstance(wrap_error, OSError) # All platforms.
|
||||
+ self.assertIsInstance(wrap_error, ssl.SSLError)
|
||||
+ self.assertIn("before TLS handshake with data", wrap_error.args[1])
|
||||
+ self.assertIn("before TLS handshake with data", wrap_error.reason)
|
||||
+ self.assertNotEqual(0, wrap_error.args[0])
|
||||
+ self.assertIsNone(wrap_error.library, msg="attr must exist")
|
||||
+
|
||||
+ def test_preauth_data_to_tls_client(self):
|
||||
+ client_can_continue_with_wrap_socket = threading.Event()
|
||||
+
|
||||
+ def call_after_accept(conn_to_client):
|
||||
+ # This forces an immediate connection close via RST on .close().
|
||||
+ set_socket_so_linger_on_with_zero_timeout(conn_to_client)
|
||||
+ conn_to_client.send(
|
||||
+ b"HTTP/1.0 307 Temporary Redirect\r\n"
|
||||
+ b"Location: https://example.com/someone-elses-server\r\n"
|
||||
+ b"\r\n")
|
||||
+ conn_to_client.close() # RST
|
||||
+ client_can_continue_with_wrap_socket.set()
|
||||
+ return True # Tell the server to stop.
|
||||
+
|
||||
+ server = self.SingleConnectionTestServerThread(
|
||||
+ call_after_accept=call_after_accept,
|
||||
+ name="preauth_data_to_tls_client")
|
||||
+ self.enterContext(server) # starts it & unittest.TestCase stops it.
|
||||
+ # Redundant; call_after_accept sets SO_LINGER on the accepted conn.
|
||||
+ set_socket_so_linger_on_with_zero_timeout(server.listener)
|
||||
+
|
||||
+ with closing(socket.socket()) as client:
|
||||
+ client.connect(server.listener.getsockname())
|
||||
+ if not client_can_continue_with_wrap_socket.wait(2.0):
|
||||
+ self.fail("test server took too long.")
|
||||
+ ssl_ctx = ssl.create_default_context()
|
||||
+ try:
|
||||
+ tls_client = ssl_ctx.wrap_socket(
|
||||
+ client, server_hostname="localhost")
|
||||
+ except OSError as err: # SSLError inherits from OSError
|
||||
+ wrap_error = err
|
||||
+ received_data = b""
|
||||
+ else:
|
||||
+ wrap_error = None
|
||||
+ received_data = tls_client.recv(400)
|
||||
+ tls_client.close()
|
||||
+
|
||||
+ server.join()
|
||||
+ self.assertEqual(b"", received_data)
|
||||
+ self.assertIsInstance(wrap_error, OSError) # All platforms.
|
||||
+ self.assertIsInstance(wrap_error, ssl.SSLError)
|
||||
+ self.assertIn("before TLS handshake with data", wrap_error.args[1])
|
||||
+ self.assertIn("before TLS handshake with data", wrap_error.reason)
|
||||
+ self.assertNotEqual(0, wrap_error.args[0])
|
||||
+ self.assertIsNone(wrap_error.library, msg="attr must exist")
|
||||
+
|
||||
+ def test_https_client_non_tls_response_ignored(self):
|
||||
+
|
||||
+ server_responding = threading.Event()
|
||||
+
|
||||
+ class SynchronizedHTTPSConnection(httplib.HTTPSConnection):
|
||||
+ def connect(self):
|
||||
+ httplib.HTTPConnection.connect(self)
|
||||
+ # Wait for our fault injection server to have done its thing.
|
||||
+ if not server_responding.wait(1.0) and support.verbose:
|
||||
+ sys.stdout.write("server_responding event never set.")
|
||||
+ self.sock = self._context.wrap_socket(
|
||||
+ self.sock, server_hostname=self.host)
|
||||
+
|
||||
+ def call_after_accept(conn_to_client):
|
||||
+ # This forces an immediate connection close via RST on .close().
|
||||
+ set_socket_so_linger_on_with_zero_timeout(conn_to_client)
|
||||
+ conn_to_client.send(
|
||||
+ b"HTTP/1.0 402 Payment Required\r\n"
|
||||
+ b"\r\n")
|
||||
+ conn_to_client.close() # RST
|
||||
+ server_responding.set()
|
||||
+ return True # Tell the server to stop.
|
||||
+
|
||||
+ server = self.SingleConnectionTestServerThread(
|
||||
+ call_after_accept=call_after_accept,
|
||||
+ name="non_tls_http_RST_responder")
|
||||
+ self.enterContext(server) # starts it & unittest.TestCase stops it.
|
||||
+ # Redundant; call_after_accept sets SO_LINGER on the accepted conn.
|
||||
+ set_socket_so_linger_on_with_zero_timeout(server.listener)
|
||||
+
|
||||
+ connection = SynchronizedHTTPSConnection(
|
||||
+ "localhost",
|
||||
+ port=server.port,
|
||||
+ context=ssl.create_default_context(),
|
||||
+ timeout=2.0,
|
||||
+ )
|
||||
+ # There are lots of reasons this raises as desired, long before this
|
||||
+ # test was added. Sending the request requires a successful TLS wrapped
|
||||
+ # socket; that fails if the connection is broken. It may seem pointless
|
||||
+ # to test this. It serves as an illustration of something that we never
|
||||
+ # want to happen... properly not happening.
|
||||
+ try:
|
||||
+ connection.request("HEAD", "/test", headers={"Host": "localhost"})
|
||||
+ response = connection.getresponse()
|
||||
+ except OSError:
|
||||
+ pass
|
||||
+ else:
|
||||
+ self.fail("http request did not raise OSError")
|
||||
+
|
||||
+
|
||||
if __name__ == "__main__":
|
||||
test_main()
|
||||
--
|
||||
2.40.1
|
||||
|
||||
174
debian/patches/add-python-config-sh.diff
vendored
Normal file
174
debian/patches/add-python-config-sh.diff
vendored
Normal file
@@ -0,0 +1,174 @@
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -1196,6 +1196,8 @@ python-config: $(srcdir)/Misc/python-con
|
||||
# Substitution happens here, as the completely-expanded BINDIR
|
||||
# is not available in configure
|
||||
sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config
|
||||
+ # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR}
|
||||
+ sed -e "s,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g" < Misc/python-config.sh >python-config.sh
|
||||
|
||||
# Install the include files
|
||||
INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
|
||||
@@ -1255,6 +1257,7 @@ libainstall: @DEF_MAKE_RULE@ python-conf
|
||||
$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
|
||||
$(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(VERSION)-config
|
||||
rm python-config
|
||||
+ $(INSTALL_SCRIPT) python-config.sh $(DESTDIR)$(BINDIR)/python-config.sh
|
||||
@if [ -s Modules/python.exp -a \
|
||||
"`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
|
||||
echo; echo "Installing support files for building shared extension modules on AIX:"; \
|
||||
--- a/Misc/python-config.in
|
||||
+++ b/Misc/python-config.in
|
||||
@@ -56,3 +56,11 @@ for opt in opt_flags:
|
||||
libs.extend(getvar('LINKFORSHARED').split())
|
||||
print ' '.join(libs)
|
||||
|
||||
+ elif opt == '--extension-suffix':
|
||||
+ print sysconfig.get_config_var('SO')
|
||||
+
|
||||
+ elif opt == '--abiflags':
|
||||
+ print ''
|
||||
+
|
||||
+ elif opt == '--configdir':
|
||||
+ print sysconfig.get_config_var('LIBPL')
|
||||
--- /dev/null
|
||||
+++ b/Misc/python-config.sh.in
|
||||
@@ -0,0 +1,103 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
+exit_with_usage ()
|
||||
+{
|
||||
+ echo "Usage: $0 --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir"
|
||||
+ exit $1
|
||||
+}
|
||||
+
|
||||
+if [ "$1" = "" ] ; then
|
||||
+ exit_with_usage 1
|
||||
+fi
|
||||
+
|
||||
+# Returns the actual prefix where this script was installed to.
|
||||
+installed_prefix ()
|
||||
+{
|
||||
+ local RESULT=$(dirname $(cd $(dirname "$1") && pwd -P))
|
||||
+ if [ $(which readlink) ] ; then
|
||||
+ RESULT=$(readlink -f "$RESULT")
|
||||
+ fi
|
||||
+ echo $RESULT
|
||||
+}
|
||||
+
|
||||
+prefix_build="@prefix@"
|
||||
+prefix_real=$(installed_prefix "$0")
|
||||
+
|
||||
+# Use sed to fix paths from their built to locations to their installed to locations.
|
||||
+prefix=$(echo "$prefix_build" | sed "s#$prefix_build#$prefix_real#")
|
||||
+exec_prefix_build="@exec_prefix@"
|
||||
+exec_prefix=$(echo "$exec_prefix_build" | sed "s#$exec_prefix_build#$prefix_real#")
|
||||
+includedir=$(echo "@includedir@" | sed "s#$prefix_build#$prefix_real#")
|
||||
+libdir=$(echo "@libdir@" | sed "s#$prefix_build#$prefix_real#")
|
||||
+CFLAGS=$(echo "@CFLAGS@" | sed "s#$prefix_build#$prefix_real#")
|
||||
+VERSION="@VERSION@"
|
||||
+LIBM="@LIBM@"
|
||||
+LIBC="@LIBC@"
|
||||
+SYSLIBS="$LIBM $LIBC"
|
||||
+ABIFLAGS="@DEBUG_EXT@"
|
||||
+MULTIARCH="@MULTIARCH@"
|
||||
+LIBS="-lpython${VERSION}${ABIFLAGS} @LIBS@ $SYSLIBS"
|
||||
+BASECFLAGS="@BASECFLAGS@"
|
||||
+LDLIBRARY="@LDLIBRARY@"
|
||||
+LINKFORSHARED="@LINKFORSHARED@"
|
||||
+OPT="@OPT@"
|
||||
+PY_ENABLE_SHARED="@PY_ENABLE_SHARED@"
|
||||
+LIBDEST=${prefix}/lib/python${VERSION}
|
||||
+LIBPL=${LIBDEST}/config-${MULTIARCH}${ABIFLAGS}
|
||||
+SO="${ABIFLAGS}.so"
|
||||
+PYTHONFRAMEWORK="@PYTHONFRAMEWORK@"
|
||||
+INCDIR="-I$includedir/python${VERSION}${ABIFLAGS}"
|
||||
+PLATINCDIR="-I$includedir/$MULTIARCH/python${VERSION}${ABIFLAGS}"
|
||||
+
|
||||
+# Scan for --help or unknown argument.
|
||||
+for ARG in $*
|
||||
+do
|
||||
+ case $ARG in
|
||||
+ --help)
|
||||
+ exit_with_usage 0
|
||||
+ ;;
|
||||
+ --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--configdir)
|
||||
+ ;;
|
||||
+ *)
|
||||
+ exit_with_usage 1
|
||||
+ ;;
|
||||
+ esac
|
||||
+done
|
||||
+
|
||||
+for ARG in $*
|
||||
+do
|
||||
+ case $ARG in
|
||||
+ --prefix)
|
||||
+ echo "$prefix"
|
||||
+ ;;
|
||||
+ --exec-prefix)
|
||||
+ echo "$exec_prefix"
|
||||
+ ;;
|
||||
+ --includes)
|
||||
+ echo "$INCDIR" "$PLATINCDIR"
|
||||
+ ;;
|
||||
+ --cflags)
|
||||
+ echo "$INCDIR $PLATINCDIR $BASECFLAGS $CFLAGS $OPT"
|
||||
+ ;;
|
||||
+ --libs)
|
||||
+ echo "$LIBS"
|
||||
+ ;;
|
||||
+ --ldflags)
|
||||
+ LINKFORSHAREDUSED=
|
||||
+ if [ -z "$PYTHONFRAMEWORK" ] ; then
|
||||
+ LINKFORSHAREDUSED=$LINKFORSHARED
|
||||
+ fi
|
||||
+ LIBPLUSED=
|
||||
+ if [ "$PY_ENABLE_SHARED" = "0" ] ; then
|
||||
+ LIBPLUSED="-L$LIBPL"
|
||||
+ fi
|
||||
+ echo "$LIBPLUSED -L$libdir $LIBS $LINKFORSHAREDUSED"
|
||||
+ ;;
|
||||
+ --extension-suffix)
|
||||
+ echo "$SO"
|
||||
+ ;;
|
||||
+ --configdir)
|
||||
+ echo "$LIBPL"
|
||||
+ ;;
|
||||
+esac
|
||||
+done
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -915,6 +915,7 @@ fi
|
||||
|
||||
# Other platforms follow
|
||||
if test $enable_shared = "yes"; then
|
||||
+ PY_ENABLE_SHARED=1
|
||||
AC_DEFINE(Py_ENABLE_SHARED, 1, [Defined if Python is built as a shared library.])
|
||||
case $ac_sys_system in
|
||||
BeOS*)
|
||||
@@ -975,6 +976,7 @@ if test $enable_shared = "yes"; then
|
||||
|
||||
esac
|
||||
else # shared is disabled
|
||||
+ PY_ENABLE_SHARED=0
|
||||
case $ac_sys_system in
|
||||
CYGWIN*)
|
||||
BLDLIBRARY='$(LIBRARY)'
|
||||
@@ -982,6 +984,7 @@ else # shared is disabled
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
+AC_SUBST(PY_ENABLE_SHARED)
|
||||
|
||||
if test "$cross_compiling" = yes; then
|
||||
RUNSHARED=
|
||||
@@ -4959,7 +4962,7 @@ AC_MSG_RESULT($ENSUREPIP)
|
||||
AC_SUBST(ENSUREPIP)
|
||||
|
||||
# generate output files
|
||||
-AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
|
||||
+AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh)
|
||||
AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
|
||||
AC_OUTPUT
|
||||
|
||||
34
debian/patches/atomic-pyc-rename.diff
vendored
Normal file
34
debian/patches/atomic-pyc-rename.diff
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
--- a/Lib/py_compile.py
|
||||
+++ b/Lib/py_compile.py
|
||||
@@ -120,13 +120,24 @@
|
||||
return
|
||||
if cfile is None:
|
||||
cfile = file + (__debug__ and 'c' or 'o')
|
||||
- with open(cfile, 'wb') as fc:
|
||||
- fc.write('\0\0\0\0')
|
||||
- wr_long(fc, timestamp)
|
||||
- marshal.dump(codeobject, fc)
|
||||
- fc.flush()
|
||||
- fc.seek(0, 0)
|
||||
- fc.write(MAGIC)
|
||||
+ # Atomically write the pyc/pyo file. Issue #13146.
|
||||
+ # id() is used to generate a pseudo-random filename.
|
||||
+ path_tmp = '{}.{}'.format(cfile, id(cfile))
|
||||
+ try:
|
||||
+ with open(path_tmp, 'wb') as fc:
|
||||
+ fc.write('\0\0\0\0')
|
||||
+ wr_long(fc, timestamp)
|
||||
+ marshal.dump(codeobject, fc)
|
||||
+ fc.flush()
|
||||
+ fc.seek(0, 0)
|
||||
+ fc.write(MAGIC)
|
||||
+ os.rename(path_tmp, cfile)
|
||||
+ except OSError:
|
||||
+ try:
|
||||
+ os.unlink(path_tmp)
|
||||
+ except OSError:
|
||||
+ pass
|
||||
+ raise
|
||||
|
||||
def main(args=None):
|
||||
"""Compile several source files.
|
||||
25
debian/patches/bdist-wininst-notfound.diff
vendored
Normal file
25
debian/patches/bdist-wininst-notfound.diff
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# DP: the wininst-* files cannot be built within Debian, needing a
|
||||
# DP: zlib mingw build, which the zlib maintainer isn't going to provide.
|
||||
|
||||
--- a/Lib/distutils/command/bdist_wininst.py
|
||||
+++ b/Lib/distutils/command/bdist_wininst.py
|
||||
@@ -14,6 +14,7 @@
|
||||
from distutils.core import Command
|
||||
from distutils.dir_util import remove_tree
|
||||
from distutils.errors import DistutilsOptionError, DistutilsPlatformError
|
||||
+from distutils.errors import DistutilsFileError
|
||||
from distutils import log
|
||||
from distutils.util import get_platform
|
||||
|
||||
@@ -360,7 +361,10 @@
|
||||
sfix = ''
|
||||
|
||||
filename = os.path.join(directory, "wininst-%.1f%s.exe" % (bv, sfix))
|
||||
- f = open(filename, "rb")
|
||||
+ try:
|
||||
+ f = open(filename, "rb")
|
||||
+ except IOError, msg:
|
||||
+ raise DistutilsFileError, str(msg) + ', %s not included in the Debian packages.' % filename
|
||||
try:
|
||||
return f.read()
|
||||
finally:
|
||||
19
debian/patches/bsddb-libpath.diff
vendored
Normal file
19
debian/patches/bsddb-libpath.diff
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# DP: Don't add the bsddb multilib path, if already in the standard lib path
|
||||
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -1136,7 +1136,13 @@ class PyBuildExt(build_ext):
|
||||
if db_setup_debug:
|
||||
print "bsddb using BerkeleyDB lib:", db_ver, dblib
|
||||
print "bsddb lib dir:", dblib_dir, " inc dir:", db_incdir
|
||||
- db_incs = [db_incdir]
|
||||
+ # only add db_incdir/dblib_dir if not in the standard paths
|
||||
+ if db_incdir in inc_dirs:
|
||||
+ db_incs = []
|
||||
+ else:
|
||||
+ db_incs = [db_incdir]
|
||||
+ if dblib_dir[0] in lib_dirs:
|
||||
+ dblib_dir = []
|
||||
dblibs = [dblib]
|
||||
# We add the runtime_library_dirs argument because the
|
||||
# BerkeleyDB lib we're linking against often isn't in the
|
||||
22
debian/patches/build-hash.diff
vendored
Normal file
22
debian/patches/build-hash.diff
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
# DP: Always build the _md5, _sha1, _sha256 and _sha512 extension modules.
|
||||
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -920,7 +920,7 @@ class PyBuildExt(build_ext):
|
||||
print ("warning: openssl 0x%08x is too old for _hashlib" %
|
||||
openssl_ver)
|
||||
missing.append('_hashlib')
|
||||
- if COMPILED_WITH_PYDEBUG or not have_usable_openssl:
|
||||
+ if True or COMPILED_WITH_PYDEBUG or not have_usable_openssl:
|
||||
# The _sha module implements the SHA1 hash algorithm.
|
||||
exts.append( Extension('_sha', ['shamodule.c']) )
|
||||
# The _md5 module implements the RSA Data Security, Inc. MD5
|
||||
@@ -931,7 +931,7 @@ class PyBuildExt(build_ext):
|
||||
depends = ['md5.h']) )
|
||||
|
||||
min_sha2_openssl_ver = 0x00908000
|
||||
- if COMPILED_WITH_PYDEBUG or openssl_ver < min_sha2_openssl_ver:
|
||||
+ if True or COMPILED_WITH_PYDEBUG or openssl_ver < min_sha2_openssl_ver:
|
||||
# OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash
|
||||
exts.append( Extension('_sha256', ['sha256module.c']) )
|
||||
exts.append( Extension('_sha512', ['sha512module.c']) )
|
||||
24
debian/patches/build-libpython.diff
vendored
Normal file
24
debian/patches/build-libpython.diff
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# DP: Don't include object files twice in libpython.
|
||||
|
||||
Index: b/Makefile.pre.in
|
||||
===================================================================
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -400,7 +400,7 @@ LIBRARY_OBJS= \
|
||||
$(PYTHON_OBJS) \
|
||||
$(MODULE_OBJS) \
|
||||
$(SIGNAL_OBJS) \
|
||||
- $(MODOBJS)
|
||||
+ $(sort $(MODOBJS))
|
||||
|
||||
#########################################################################
|
||||
# Rules
|
||||
@@ -542,7 +542,7 @@ $(LIBRARY): $(LIBRARY_OBJS)
|
||||
$(AR) $(ARFLAGS) $@ $(OBJECT_OBJS)
|
||||
$(AR) $(ARFLAGS) $@ $(PYTHON_OBJS)
|
||||
$(AR) $(ARFLAGS) $@ $(MODULE_OBJS) $(SIGNAL_OBJS)
|
||||
- $(AR) $(ARFLAGS) $@ $(MODOBJS)
|
||||
+ $(AR) $(ARFLAGS) $@ $(sort $(MODOBJS))
|
||||
$(RANLIB) $@
|
||||
|
||||
libpython$(VERSION).so: $(LIBRARY_OBJS)
|
||||
39
debian/patches/cthreads.diff
vendored
Normal file
39
debian/patches/cthreads.diff
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
# DP: Remove cthreads detection
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2154,7 +2154,6 @@
|
||||
|
||||
# Templates for things AC_DEFINEd more than once.
|
||||
# For a single AC_DEFINE, no template is needed.
|
||||
-AH_TEMPLATE(C_THREADS,[Define if you have the Mach cthreads package])
|
||||
AH_TEMPLATE(_REENTRANT,
|
||||
[Define to force use of thread-safe errno, h_errno, and other functions])
|
||||
AH_TEMPLATE(WITH_THREAD,
|
||||
@@ -2236,17 +2235,6 @@
|
||||
AC_MSG_RESULT($unistd_defines_pthreads)
|
||||
|
||||
AC_DEFINE(_REENTRANT)
|
||||
- AC_CHECK_HEADER(cthreads.h, [AC_DEFINE(WITH_THREAD)
|
||||
- AC_DEFINE(C_THREADS)
|
||||
- AC_DEFINE(HURD_C_THREADS, 1,
|
||||
- [Define if you are using Mach cthreads directly under /include])
|
||||
- LIBS="$LIBS -lthreads"
|
||||
- THREADOBJ="Python/thread.o"],[
|
||||
- AC_CHECK_HEADER(mach/cthreads.h, [AC_DEFINE(WITH_THREAD)
|
||||
- AC_DEFINE(C_THREADS)
|
||||
- AC_DEFINE(MACH_C_THREADS, 1,
|
||||
- [Define if you are using Mach cthreads under mach /])
|
||||
- THREADOBJ="Python/thread.o"],[
|
||||
AC_MSG_CHECKING(for --with-pth)
|
||||
AC_ARG_WITH([pth],
|
||||
AS_HELP_STRING([--with-pth], [use GNU pth threading libraries]),
|
||||
@@ -2301,7 +2289,7 @@
|
||||
LIBS="$LIBS -lcma"
|
||||
THREADOBJ="Python/thread.o"],[
|
||||
USE_THREAD_MODULE="#"])
|
||||
- ])])])])])])])])])])
|
||||
+ ])])])])])])])])
|
||||
|
||||
AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD)
|
||||
LIBS="$LIBS -lmpc"
|
||||
34
debian/patches/ctypes-arm.diff
vendored
Normal file
34
debian/patches/ctypes-arm.diff
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
Index: b/Lib/ctypes/util.py
|
||||
===================================================================
|
||||
--- a/Lib/ctypes/util.py
|
||||
+++ b/Lib/ctypes/util.py
|
||||
@@ -236,16 +236,27 @@ elif os.name == "posix":
|
||||
|
||||
def _findSoname_ldconfig(name):
|
||||
import struct
|
||||
+ # XXX this code assumes that we know all unames and that a single
|
||||
+ # ABI is supported per uname; instead we should find what the
|
||||
+ # ABI is (e.g. check ABI of current process) or simply ask libc
|
||||
+ # to load the library for us
|
||||
+ uname = os.uname()[4]
|
||||
+ # ARM has a variety of unames, e.g. armv7l
|
||||
+ if uname.startswith("arm"):
|
||||
+ uname = "arm"
|
||||
if struct.calcsize('l') == 4:
|
||||
- machine = os.uname()[4] + '-32'
|
||||
+ machine = uname + '-32'
|
||||
else:
|
||||
- machine = os.uname()[4] + '-64'
|
||||
+ machine = uname + '-64'
|
||||
mach_map = {
|
||||
'x86_64-64': 'libc6,x86-64',
|
||||
'ppc64-64': 'libc6,64bit',
|
||||
'sparc64-64': 'libc6,64bit',
|
||||
's390x-64': 'libc6,64bit',
|
||||
'ia64-64': 'libc6,IA-64',
|
||||
+ # this actually breaks on biarch or multiarch as the first
|
||||
+ # library wins; uname doesn't tell us which ABI we're using
|
||||
+ 'arm-32': 'libc6(,hard-float)?',
|
||||
}
|
||||
abi_type = mach_map.get(machine, 'libc6')
|
||||
|
||||
73
debian/patches/deb-locations.diff
vendored
Normal file
73
debian/patches/deb-locations.diff
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
# DP: adjust locations of directories to debian policy
|
||||
|
||||
Index: b/Demo/tkinter/guido/ManPage.py
|
||||
===================================================================
|
||||
--- a/Demo/tkinter/guido/ManPage.py
|
||||
+++ b/Demo/tkinter/guido/ManPage.py
|
||||
@@ -189,8 +189,9 @@ ManPage = ReadonlyManPage
|
||||
def test():
|
||||
import os
|
||||
import sys
|
||||
- # XXX This directory may be different on your system
|
||||
- MANDIR = '/usr/local/man/mann'
|
||||
+ # XXX This directory may be different on your system,
|
||||
+ # it is here set for Debian GNU/Linux.
|
||||
+ MANDIR = '/usr/share/man'
|
||||
DEFAULTPAGE = 'Tcl'
|
||||
formatted = 0
|
||||
if sys.argv[1:] and sys.argv[1] == '-f':
|
||||
Index: b/Demo/tkinter/guido/tkman.py
|
||||
===================================================================
|
||||
--- a/Demo/tkinter/guido/tkman.py
|
||||
+++ b/Demo/tkinter/guido/tkman.py
|
||||
@@ -9,8 +9,8 @@ import re
|
||||
from Tkinter import *
|
||||
from ManPage import ManPage
|
||||
|
||||
-MANNDIRLIST = ['/depot/sundry/man/mann','/usr/local/man/mann']
|
||||
-MAN3DIRLIST = ['/depot/sundry/man/man3','/usr/local/man/man3']
|
||||
+MANNDIRLIST = ['/depot/sundry/man/mann','/usr/share/man/mann']
|
||||
+MAN3DIRLIST = ['/depot/sundry/man/man3','/usr/share/man/man3']
|
||||
|
||||
foundmanndir = 0
|
||||
for dir in MANNDIRLIST:
|
||||
Index: b/Misc/python.man
|
||||
===================================================================
|
||||
--- a/Misc/python.man
|
||||
+++ b/Misc/python.man
|
||||
@@ -337,7 +337,7 @@ exception). Error messages are written
|
||||
These are subject to difference depending on local installation
|
||||
conventions; ${prefix} and ${exec_prefix} are installation-dependent
|
||||
and should be interpreted as for GNU software; they may be the same.
|
||||
-The default for both is \fI/usr/local\fP.
|
||||
+On Debian GNU/{Hurd,Linux} the default for both is \fI/usr\fP.
|
||||
.IP \fI${exec_prefix}/bin/python\fP
|
||||
Recommended location of the interpreter.
|
||||
.PP
|
||||
Index: b/Tools/faqwiz/faqconf.py
|
||||
===================================================================
|
||||
--- a/Tools/faqwiz/faqconf.py
|
||||
+++ b/Tools/faqwiz/faqconf.py
|
||||
@@ -21,7 +21,7 @@ OWNERNAME = "FAQ owner"
|
||||
OWNEREMAIL = "nobody@anywhere.org" # Email for feedback
|
||||
HOMEURL = "http://www.python.org" # Related home page
|
||||
HOMENAME = "Python home" # Name of related home page
|
||||
-RCSBINDIR = "/usr/local/bin/" # Directory containing RCS commands
|
||||
+RCSBINDIR = "/usr/bin/" # Directory containing RCS commands
|
||||
# (must end in a slash)
|
||||
|
||||
# Parameters you can normally leave alone
|
||||
Index: b/Tools/webchecker/webchecker.py
|
||||
===================================================================
|
||||
--- a/Tools/webchecker/webchecker.py
|
||||
+++ b/Tools/webchecker/webchecker.py
|
||||
@@ -19,7 +19,8 @@ file index.html in that directory is ret
|
||||
a directory listing is returned. Now, you can point webchecker to the
|
||||
document tree in the local file system of your HTTP daemon, and have
|
||||
most of it checked. In fact the default works this way if your local
|
||||
-web tree is located at /usr/local/etc/httpd/htdpcs (the default for
|
||||
+web tree is located at /var/www, which is the default for Debian
|
||||
+GNU/Linux. Other systems use /usr/local/etc/httpd/htdocs (the default for
|
||||
the NCSA HTTP daemon and probably others).
|
||||
|
||||
Report printed:
|
||||
19
debian/patches/deb-setup.diff
vendored
Normal file
19
debian/patches/deb-setup.diff
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# DP: Don't include /usr/local/include and /usr/local/lib as gcc search paths
|
||||
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -500,10 +500,10 @@ class PyBuildExt(build_ext):
|
||||
os.unlink(tmpfile)
|
||||
|
||||
def detect_modules(self):
|
||||
- # Ensure that /usr/local is always used
|
||||
- if not cross_compiling:
|
||||
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
||||
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||
+ # On Debian /usr/local is always used, so we don't include it twice
|
||||
+ #if not cross_compiling:
|
||||
+ # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
||||
+ # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||
if cross_compiling:
|
||||
self.add_gcc_paths()
|
||||
self.add_multiarch_paths()
|
||||
228
debian/patches/debug-build.diff
vendored
Normal file
228
debian/patches/debug-build.diff
vendored
Normal file
@@ -0,0 +1,228 @@
|
||||
# DP: Change the interpreter to build and install python extensions
|
||||
# DP: built with the python-dbg interpreter with a different name into
|
||||
# DP: the same path (by appending `_d' to the extension name).
|
||||
|
||||
--- a/Lib/distutils/command/build.py
|
||||
+++ b/Lib/distutils/command/build.py
|
||||
@@ -91,7 +91,8 @@ class build(Command):
|
||||
# 'lib.<plat>' under the base build directory. We only use one of
|
||||
# them for a given distribution, though --
|
||||
if self.build_purelib is None:
|
||||
- self.build_purelib = os.path.join(self.build_base, 'lib')
|
||||
+ self.build_purelib = os.path.join(self.build_base,
|
||||
+ 'lib' + plat_specifier)
|
||||
if self.build_platlib is None:
|
||||
self.build_platlib = os.path.join(self.build_base,
|
||||
'lib' + plat_specifier)
|
||||
--- a/Lib/distutils/sysconfig.py
|
||||
+++ b/Lib/distutils/sysconfig.py
|
||||
@@ -100,7 +100,7 @@ def get_python_inc(plat_specific=0, pref
|
||||
# Include is located in the srcdir
|
||||
inc_dir = os.path.join(srcdir, "Include")
|
||||
return inc_dir
|
||||
- return os.path.join(prefix, "include", "python" + get_python_version())
|
||||
+ return os.path.join(prefix, "include", "python" + get_python_version())+(sys.pydebug and "_d" or "")
|
||||
elif os.name == "nt":
|
||||
return os.path.join(prefix, "include")
|
||||
elif os.name == "os2":
|
||||
@@ -270,7 +270,7 @@ def get_makefile_filename():
|
||||
if python_build:
|
||||
return os.path.join(project_base, "Makefile")
|
||||
lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
|
||||
- return os.path.join(lib_dir, "config", "Makefile")
|
||||
+ return os.path.join(lib_dir, "config"+(sys.pydebug and "_d" or ""), "Makefile")
|
||||
|
||||
|
||||
def parse_config_h(fp, g=None):
|
||||
--- a/Lib/sysconfig.py
|
||||
+++ b/Lib/sysconfig.py
|
||||
@@ -338,7 +338,7 @@ def get_makefile_filename():
|
||||
"""Return the path of the Makefile."""
|
||||
if _PYTHON_BUILD:
|
||||
return os.path.join(_PROJECT_BASE, "Makefile")
|
||||
- return os.path.join(get_path('platstdlib').replace("/usr/local","/usr",1), "config", "Makefile")
|
||||
+ return os.path.join(get_path('platstdlib').replace("/usr/local","/usr",1), "config" + (sys.pydebug and "_d" or ""), "Makefile")
|
||||
|
||||
# Issue #22199: retain undocumented private name for compatibility
|
||||
_get_makefile_filename = get_makefile_filename
|
||||
@@ -470,7 +470,7 @@ def get_config_h_filename():
|
||||
else:
|
||||
inc_dir = _PROJECT_BASE
|
||||
else:
|
||||
- inc_dir = get_path('platinclude').replace("/usr/local","/usr",1)
|
||||
+ inc_dir = get_path('platinclude').replace("/usr/local","/usr",1)+(sys.pydebug and "_d" or "")
|
||||
return os.path.join(inc_dir, 'pyconfig.h')
|
||||
|
||||
def get_scheme_names():
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -121,8 +121,8 @@ SCRIPTDIR= $(prefix)/lib
|
||||
# Detailed destination directories
|
||||
BINLIBDEST= $(LIBDIR)/python$(VERSION)
|
||||
LIBDEST= $(SCRIPTDIR)/python$(VERSION)
|
||||
-INCLUDEPY= $(INCLUDEDIR)/python$(VERSION)
|
||||
-CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(VERSION)
|
||||
+INCLUDEPY= $(INCLUDEDIR)/python$(VERSION)$(DEBUG_EXT)
|
||||
+CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(VERSION)$(DEBUG_EXT)
|
||||
LIBP= $(LIBDIR)/python$(VERSION)
|
||||
|
||||
# Symbols used for using shared libraries
|
||||
@@ -136,6 +136,8 @@ DESTSHARED= $(BINLIBDEST)/lib-dynload
|
||||
EXE= @EXEEXT@
|
||||
BUILDEXE= @BUILDEXEEXT@
|
||||
|
||||
+DEBUG_EXT= @DEBUG_EXT@
|
||||
+
|
||||
# Short name and location for Mac OS X Python framework
|
||||
UNIVERSALSDK=@UNIVERSALSDK@
|
||||
PYTHONFRAMEWORK= @PYTHONFRAMEWORK@
|
||||
@@ -545,7 +547,7 @@ $(LIBRARY): $(LIBRARY_OBJS)
|
||||
$(AR) $(ARFLAGS) $@ $(sort $(MODOBJS))
|
||||
$(RANLIB) $@
|
||||
|
||||
-libpython$(VERSION).so: $(LIBRARY_OBJS)
|
||||
+libpython$(VERSION)$(DEBUG_EXT).so: $(LIBRARY_OBJS)
|
||||
if test $(INSTSONAME) != $(LDLIBRARY); then \
|
||||
$(BLDSHARED) $(PY_LDFLAGS) $(CCSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
|
||||
$(LN) -f $(INSTSONAME) $@; \
|
||||
@@ -1207,8 +1209,8 @@ inclinstall:
|
||||
$(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
|
||||
|
||||
# Install the library and miscellaneous stuff needed for extending/embedding
|
||||
-# This goes into $(exec_prefix)
|
||||
-LIBPL= $(LIBP)/config
|
||||
+# This goes into $(exec_prefix)$(DEBUG_EXT)
|
||||
+LIBPL= $(LIBP)/config$(DEBUG_EXT)
|
||||
|
||||
# pkgconfig directory
|
||||
LIBPC= $(LIBDIR)/pkgconfig
|
||||
--- a/Misc/python-config.in
|
||||
+++ b/Misc/python-config.in
|
||||
@@ -44,7 +44,7 @@ for opt in opt_flags:
|
||||
print ' '.join(flags)
|
||||
|
||||
elif opt in ('--libs', '--ldflags'):
|
||||
- libs = ['-lpython' + pyver]
|
||||
+ libs = ['-lpython' + pyver + (sys.pydebug and "_d" or "")]
|
||||
libs += getvar('LIBS').split()
|
||||
libs += getvar('SYSLIBS').split()
|
||||
# add the prefix/lib/pythonX.Y/config dir, but only if there is no
|
||||
--- a/Python/dynload_shlib.c
|
||||
+++ b/Python/dynload_shlib.c
|
||||
@@ -46,6 +46,10 @@ const struct filedescr _PyImport_DynLoad
|
||||
{"module.exe", "rb", C_EXTENSION},
|
||||
{"MODULE.EXE", "rb", C_EXTENSION},
|
||||
#else
|
||||
+#ifdef Py_DEBUG
|
||||
+ {"_d.so", "rb", C_EXTENSION},
|
||||
+ {"module_d.so", "rb", C_EXTENSION},
|
||||
+#endif
|
||||
{".so", "rb", C_EXTENSION},
|
||||
{"module.so", "rb", C_EXTENSION},
|
||||
#endif
|
||||
--- a/Python/sysmodule.c
|
||||
+++ b/Python/sysmodule.c
|
||||
@@ -1524,6 +1524,12 @@ _PySys_Init(void)
|
||||
PyString_FromString("legacy"));
|
||||
#endif
|
||||
|
||||
+#ifdef Py_DEBUG
|
||||
+ PyDict_SetItemString(sysdict, "pydebug", Py_True);
|
||||
+#else
|
||||
+ PyDict_SetItemString(sysdict, "pydebug", Py_False);
|
||||
+#endif
|
||||
+
|
||||
#undef SET_SYS_FROM_STRING
|
||||
if (PyErr_Occurred())
|
||||
return NULL;
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -777,7 +777,7 @@ AC_SUBST(LIBRARY)
|
||||
AC_MSG_CHECKING(LIBRARY)
|
||||
if test -z "$LIBRARY"
|
||||
then
|
||||
- LIBRARY='libpython$(VERSION).a'
|
||||
+ LIBRARY='libpython$(VERSION)$(DEBUG_EXT).a'
|
||||
fi
|
||||
AC_MSG_RESULT($LIBRARY)
|
||||
|
||||
@@ -923,8 +923,8 @@ if test $enable_shared = "yes"; then
|
||||
INSTSONAME="$LDLIBRARY".$SOVERSION
|
||||
;;
|
||||
Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
|
||||
- LDLIBRARY='libpython$(VERSION).so'
|
||||
- BLDLIBRARY='-L. -lpython$(VERSION)'
|
||||
+ LDLIBRARY='libpython$(VERSION)$(DEBUG_EXT).so'
|
||||
+ BLDLIBRARY='-L. -lpython$(VERSION)$(DEBUG_EXT)'
|
||||
RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
|
||||
case $ac_sys_system in
|
||||
FreeBSD*)
|
||||
@@ -1050,6 +1050,12 @@ else AC_MSG_RESULT(no); Py_DEBUG='false'
|
||||
fi],
|
||||
[AC_MSG_RESULT(no)])
|
||||
|
||||
+if test "$Py_DEBUG" = 'true'
|
||||
+then
|
||||
+ DEBUG_EXT=_d
|
||||
+fi
|
||||
+AC_SUBST(DEBUG_EXT)
|
||||
+
|
||||
# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
|
||||
# merged with this chunk of code?
|
||||
|
||||
@@ -2129,7 +2135,7 @@ then
|
||||
esac
|
||||
;;
|
||||
CYGWIN*) SO=.dll;;
|
||||
- *) SO=.so;;
|
||||
+ *) SO=$DEBUG_EXT.so;;
|
||||
esac
|
||||
else
|
||||
# this might also be a termcap variable, see #610332
|
||||
--- a/Lib/distutils/tests/test_build_ext.py
|
||||
+++ b/Lib/distutils/tests/test_build_ext.py
|
||||
@@ -295,8 +295,8 @@ class BuildExtTestCase(support.TempdirMa
|
||||
finally:
|
||||
os.chdir(old_wd)
|
||||
self.assertTrue(os.path.exists(so_file))
|
||||
- self.assertEqual(os.path.splitext(so_file)[-1],
|
||||
- sysconfig.get_config_var('SO'))
|
||||
+ so_ext = sysconfig.get_config_var('SO')
|
||||
+ self.assertEqual(so_file[len(so_file)-len(so_ext):], so_ext)
|
||||
so_dir = os.path.dirname(so_file)
|
||||
self.assertEqual(so_dir, other_tmp_dir)
|
||||
cmd.compiler = None
|
||||
@@ -304,8 +304,7 @@ class BuildExtTestCase(support.TempdirMa
|
||||
cmd.run()
|
||||
so_file = cmd.get_outputs()[0]
|
||||
self.assertTrue(os.path.exists(so_file))
|
||||
- self.assertEqual(os.path.splitext(so_file)[-1],
|
||||
- sysconfig.get_config_var('SO'))
|
||||
+ self.assertEqual(so_file[len(so_file)-len(so_ext):], so_ext)
|
||||
so_dir = os.path.dirname(so_file)
|
||||
self.assertEqual(so_dir, cmd.build_lib)
|
||||
|
||||
--- a/Lib/distutils/tests/test_build.py
|
||||
+++ b/Lib/distutils/tests/test_build.py
|
||||
@@ -20,10 +20,6 @@ class BuildTestCase(support.TempdirManag
|
||||
# if not specified, plat_name gets the current platform
|
||||
self.assertEqual(cmd.plat_name, get_platform())
|
||||
|
||||
- # build_purelib is build + lib
|
||||
- wanted = os.path.join(cmd.build_base, 'lib')
|
||||
- self.assertEqual(cmd.build_purelib, wanted)
|
||||
-
|
||||
# build_platlib is 'build/lib.platform-x.x[-pydebug]'
|
||||
# examples:
|
||||
# build/lib.macosx-10.3-i386-2.7
|
||||
@@ -34,6 +30,10 @@ class BuildTestCase(support.TempdirManag
|
||||
wanted = os.path.join(cmd.build_base, 'lib' + plat_spec)
|
||||
self.assertEqual(cmd.build_platlib, wanted)
|
||||
|
||||
+ # build_purelib is build + lib
|
||||
+ wanted = os.path.join(cmd.build_base, 'lib' + plat_spec)
|
||||
+ self.assertEqual(cmd.build_purelib, wanted)
|
||||
+
|
||||
# by default, build_lib = build_purelib
|
||||
self.assertEqual(cmd.build_lib, cmd.build_purelib)
|
||||
|
||||
28
debian/patches/disable-sem-check.diff
vendored
Normal file
28
debian/patches/disable-sem-check.diff
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
# DP: Assume working semaphores on Linux, don't rely on running kernel for the check.
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4061,6 +4061,11 @@ int main(void) {
|
||||
[ac_cv_posix_semaphores_enabled=no],
|
||||
[ac_cv_posix_semaphores_enabled=yes])
|
||||
)
|
||||
+case $ac_sys_system in
|
||||
+ Linux*)
|
||||
+ # assume enabled, see https://launchpad.net/bugs/630511
|
||||
+ ac_cv_posix_semaphores_enabled=yes
|
||||
+esac
|
||||
AC_MSG_RESULT($ac_cv_posix_semaphores_enabled)
|
||||
if test $ac_cv_posix_semaphores_enabled = no
|
||||
then
|
||||
@@ -4097,6 +4102,11 @@ int main(void){
|
||||
[ac_cv_broken_sem_getvalue=yes],
|
||||
[ac_cv_broken_sem_getvalue=yes])
|
||||
)
|
||||
+case $ac_sys_system in
|
||||
+ Linux*)
|
||||
+ # assume enabled, see https://launchpad.net/bugs/630511
|
||||
+ ac_cv_broken_sem_getvalue=no
|
||||
+esac
|
||||
AC_MSG_RESULT($ac_cv_broken_sem_getvalue)
|
||||
if test $ac_cv_broken_sem_getvalue = yes
|
||||
then
|
||||
13
debian/patches/disable-utimes.diff
vendored
Normal file
13
debian/patches/disable-utimes.diff
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# DP: disable check for utimes function, which is broken in glibc-2.3.2
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2698,7 +2698,7 @@
|
||||
setsid setpgid setpgrp setuid setvbuf snprintf \
|
||||
sigaction siginterrupt sigrelse strftime \
|
||||
sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
|
||||
- truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty)
|
||||
+ truncate uname unsetenv waitpid wait3 wait4 wcscoll _getpty)
|
||||
|
||||
# For some functions, having a definition is not sufficient, since
|
||||
# we want to take their address.
|
||||
380
debian/patches/distutils-install-layout.diff
vendored
Normal file
380
debian/patches/distutils-install-layout.diff
vendored
Normal file
@@ -0,0 +1,380 @@
|
||||
# DP: distutils: Add an option --install-layout=deb, which
|
||||
# DP: - installs into $prefix/dist-packages instead of $prefix/site-packages.
|
||||
# DP: - doesn't encode the python version into the egg name.
|
||||
|
||||
--- a/Doc/install/index.rst
|
||||
+++ b/Doc/install/index.rst
|
||||
@@ -255,6 +255,8 @@ is pure Python or contains extensions ("
|
||||
+-----------------+-----------------------------------------------------+--------------------------------------------------+-------+
|
||||
| Platform | Standard installation location | Default value | Notes |
|
||||
+=================+=====================================================+==================================================+=======+
|
||||
+| Debian/Ubuntu | :file:`{prefix}/lib/python{X.Y}/dist-packages` | :file:`/usr/local/lib/python{X.Y}/dist-packages` | \(0) |
|
||||
++-----------------+-----------------------------------------------------+--------------------------------------------------+-------+
|
||||
| Unix (pure) | :file:`{prefix}/lib/python{X.Y}/site-packages` | :file:`/usr/local/lib/python{X.Y}/site-packages` | \(1) |
|
||||
+-----------------+-----------------------------------------------------+--------------------------------------------------+-------+
|
||||
| Unix (non-pure) | :file:`{exec-prefix}/lib/python{X.Y}/site-packages` | :file:`/usr/local/lib/python{X.Y}/site-packages` | \(1) |
|
||||
@@ -264,6 +266,14 @@ is pure Python or contains extensions ("
|
||||
|
||||
Notes:
|
||||
|
||||
+(0)
|
||||
+ Starting with Python-2.6 Debian/Ubuntu uses for the Python which comes within
|
||||
+ the Linux distribution a non-default name for the installation directory. This
|
||||
+ is to avoid overwriting of the python modules which come with the distribution,
|
||||
+ which unfortunately is the upstream behaviour of the installation tools. The
|
||||
+ non-default name in :file:`/usr/local` is used not to overwrite a local python
|
||||
+ installation (defaulting to :file:`/usr/local`).
|
||||
+
|
||||
(1)
|
||||
Most Linux distributions include Python as a standard part of the system, so
|
||||
:file:`{prefix}` and :file:`{exec-prefix}` are usually both :file:`/usr` on
|
||||
@@ -448,6 +458,15 @@ them to go in :file:`/usr/local/lib/pyth
|
||||
|
||||
/usr/bin/python setup.py install --prefix=/usr/local
|
||||
|
||||
+Starting with Python-2.6 Debian/Ubuntu does use
|
||||
+:file:`/usr/lib/python{X.Y}/dist-packages` and
|
||||
+:file:`/usr/local/lib/python{X.Y}/dist-packages` for the installation
|
||||
+of python modules included in the Linux distribution. To overwrite
|
||||
+the name of the site directory, explicitely use the :option:`--prefix`
|
||||
+option, however make sure that the installation path is included in
|
||||
+``sys.path``. For packaging of python modules for Debian/Ubuntu, use
|
||||
+the new ``setup.py install`` option :option:`--install-layout=deb`.
|
||||
+
|
||||
Another possibility is a network filesystem where the name used to write to a
|
||||
remote directory is different from the name used to read it: for example, the
|
||||
Python interpreter accessed as :file:`/usr/local/bin/python` might search for
|
||||
@@ -699,6 +718,17 @@ Add-on Python modules might then belong
|
||||
import them, this directory must be added to ``sys.path``. There are several
|
||||
different ways to add the directory.
|
||||
|
||||
+On Debian/Ubuntu, starting with Python-2.6 the convention for system
|
||||
+installed packages is to put then in the
|
||||
+:file:`/usr/lib/python{X.Y}/dist-packages/` directory, and for locally
|
||||
+installed packages is to put them in the
|
||||
+:file:`/usr/lib/python{X.Y}/dist-packages/` directory. To share the
|
||||
+locally installed packages for the system provided Python with the
|
||||
+locally installed packages of a local python installation, make
|
||||
+:file:`/usr/lib/python{X.Y}/dist-packages/` a symbolic link to the
|
||||
+:file:`{...}/site-packages/` directory of your local python
|
||||
+installation.
|
||||
+
|
||||
The most convenient way is to add a path configuration file to a directory
|
||||
that's already on Python's path, usually to the :file:`.../site-packages/`
|
||||
directory. Path configuration files have an extension of :file:`.pth`, and each
|
||||
--- a/Lib/distutils/command/install.py
|
||||
+++ b/Lib/distutils/command/install.py
|
||||
@@ -47,6 +47,20 @@ INSTALL_SCHEMES = {
|
||||
'scripts': '$base/bin',
|
||||
'data' : '$base',
|
||||
},
|
||||
+ 'unix_local': {
|
||||
+ 'purelib': '$base/local/lib/python$py_version_short/dist-packages',
|
||||
+ 'platlib': '$platbase/local/lib/python$py_version_short/dist-packages',
|
||||
+ 'headers': '$base/local/include/python$py_version_short/$dist_name',
|
||||
+ 'scripts': '$base/local/bin',
|
||||
+ 'data' : '$base/local',
|
||||
+ },
|
||||
+ 'deb_system': {
|
||||
+ 'purelib': '$base/lib/python$py_version_short/dist-packages',
|
||||
+ 'platlib': '$platbase/lib/python$py_version_short/dist-packages',
|
||||
+ 'headers': '$base/include/python$py_version_short/$dist_name',
|
||||
+ 'scripts': '$base/bin',
|
||||
+ 'data' : '$base',
|
||||
+ },
|
||||
'unix_home': {
|
||||
'purelib': '$base/lib/python',
|
||||
'platlib': '$base/lib/python',
|
||||
@@ -154,6 +168,9 @@ class install (Command):
|
||||
|
||||
('record=', None,
|
||||
"filename in which to record list of installed files"),
|
||||
+
|
||||
+ ('install-layout=', None,
|
||||
+ "installation layout to choose (known values: deb, unix)"),
|
||||
]
|
||||
|
||||
boolean_options = ['compile', 'force', 'skip-build', 'user']
|
||||
@@ -168,6 +185,7 @@ class install (Command):
|
||||
self.exec_prefix = None
|
||||
self.home = None
|
||||
self.user = 0
|
||||
+ self.prefix_option = None
|
||||
|
||||
# These select only the installation base; it's up to the user to
|
||||
# specify the installation scheme (currently, that means supplying
|
||||
@@ -189,6 +207,9 @@ class install (Command):
|
||||
self.install_userbase = USER_BASE
|
||||
self.install_usersite = USER_SITE
|
||||
|
||||
+ # enable custom installation, known values: deb
|
||||
+ self.install_layout = None
|
||||
+
|
||||
self.compile = None
|
||||
self.optimize = None
|
||||
|
||||
@@ -421,6 +442,7 @@ class install (Command):
|
||||
self.install_base = self.install_platbase = self.home
|
||||
self.select_scheme("unix_home")
|
||||
else:
|
||||
+ self.prefix_option = self.prefix
|
||||
if self.prefix is None:
|
||||
if self.exec_prefix is not None:
|
||||
raise DistutilsOptionError, \
|
||||
@@ -435,7 +457,23 @@ class install (Command):
|
||||
|
||||
self.install_base = self.prefix
|
||||
self.install_platbase = self.exec_prefix
|
||||
- self.select_scheme("unix_prefix")
|
||||
+ if self.install_layout:
|
||||
+ if self.install_layout.lower() in ['deb']:
|
||||
+ self.select_scheme("deb_system")
|
||||
+ elif self.install_layout.lower() in ['posix', 'unix']:
|
||||
+ self.select_scheme("unix_prefix")
|
||||
+ else:
|
||||
+ raise DistutilsOptionError(
|
||||
+ "unknown value for --install-layout")
|
||||
+ elif (self.prefix_option and os.path.normpath(self.prefix) != '/usr/local') \
|
||||
+ or 'PYTHONUSERBASE' in os.environ \
|
||||
+ or 'real_prefix' in sys.__dict__:
|
||||
+ self.select_scheme("unix_prefix")
|
||||
+ else:
|
||||
+ if os.path.normpath(self.prefix) == '/usr/local':
|
||||
+ self.select_scheme("deb_system")
|
||||
+ else:
|
||||
+ self.select_scheme("unix_local")
|
||||
|
||||
# finalize_unix ()
|
||||
|
||||
--- a/Lib/distutils/command/install_egg_info.py
|
||||
+++ b/Lib/distutils/command/install_egg_info.py
|
||||
@@ -14,18 +14,37 @@ class install_egg_info(Command):
|
||||
description = "Install package's PKG-INFO metadata as an .egg-info file"
|
||||
user_options = [
|
||||
('install-dir=', 'd', "directory to install to"),
|
||||
+ ('install-layout', None, "custom installation layout"),
|
||||
]
|
||||
|
||||
def initialize_options(self):
|
||||
self.install_dir = None
|
||||
+ self.install_layout = None
|
||||
+ self.prefix_option = None
|
||||
|
||||
def finalize_options(self):
|
||||
self.set_undefined_options('install_lib',('install_dir','install_dir'))
|
||||
- basename = "%s-%s-py%s.egg-info" % (
|
||||
- to_filename(safe_name(self.distribution.get_name())),
|
||||
- to_filename(safe_version(self.distribution.get_version())),
|
||||
- sys.version[:3]
|
||||
- )
|
||||
+ self.set_undefined_options('install',('install_layout','install_layout'))
|
||||
+ self.set_undefined_options('install',('prefix_option','prefix_option'))
|
||||
+ if self.install_layout:
|
||||
+ basename = "%s-%s.egg-info" % (
|
||||
+ to_filename(safe_name(self.distribution.get_name())),
|
||||
+ to_filename(safe_version(self.distribution.get_version()))
|
||||
+ )
|
||||
+ if not self.install_layout.lower() in ['deb']:
|
||||
+ raise DistutilsOptionError(
|
||||
+ "unknown value for --install-layout")
|
||||
+ elif self.prefix_option or 'real_prefix' in sys.__dict__:
|
||||
+ basename = "%s-%s-py%s.egg-info" % (
|
||||
+ to_filename(safe_name(self.distribution.get_name())),
|
||||
+ to_filename(safe_version(self.distribution.get_version())),
|
||||
+ sys.version[:3]
|
||||
+ )
|
||||
+ else:
|
||||
+ basename = "%s-%s.egg-info" % (
|
||||
+ to_filename(safe_name(self.distribution.get_name())),
|
||||
+ to_filename(safe_version(self.distribution.get_version()))
|
||||
+ )
|
||||
self.target = os.path.join(self.install_dir, basename)
|
||||
self.outputs = [self.target]
|
||||
|
||||
--- a/Lib/distutils/sysconfig.py
|
||||
+++ b/Lib/distutils/sysconfig.py
|
||||
@@ -125,6 +125,7 @@ def get_python_lib(plat_specific=0, stan
|
||||
If 'prefix' is supplied, use it instead of sys.prefix or
|
||||
sys.exec_prefix -- i.e., ignore 'plat_specific'.
|
||||
"""
|
||||
+ is_default_prefix = not prefix or os.path.normpath(prefix) in ('/usr', '/usr/local')
|
||||
if prefix is None:
|
||||
prefix = plat_specific and EXEC_PREFIX or PREFIX
|
||||
|
||||
@@ -133,6 +134,8 @@ def get_python_lib(plat_specific=0, stan
|
||||
"lib", "python" + get_python_version())
|
||||
if standard_lib:
|
||||
return libpython
|
||||
+ elif is_default_prefix and 'PYTHONUSERBASE' not in os.environ and 'real_prefix' not in sys.__dict__:
|
||||
+ return os.path.join(libpython, "dist-packages")
|
||||
else:
|
||||
return os.path.join(libpython, "site-packages")
|
||||
|
||||
--- a/Lib/site.py
|
||||
+++ b/Lib/site.py
|
||||
@@ -273,6 +273,13 @@ def addusersitepackages(known_paths):
|
||||
|
||||
if ENABLE_USER_SITE and os.path.isdir(user_site):
|
||||
addsitedir(user_site, known_paths)
|
||||
+ if ENABLE_USER_SITE:
|
||||
+ for dist_libdir in ("local/lib", "lib"):
|
||||
+ user_site = os.path.join(USER_BASE, dist_libdir,
|
||||
+ "python" + sys.version[:3],
|
||||
+ "dist-packages")
|
||||
+ if os.path.isdir(user_site):
|
||||
+ addsitedir(user_site, known_paths)
|
||||
return known_paths
|
||||
|
||||
def getsitepackages():
|
||||
--- a/Lib/sysconfig.py
|
||||
+++ b/Lib/sysconfig.py
|
||||
@@ -16,6 +16,26 @@ _INSTALL_SCHEMES = {
|
||||
'scripts': '{base}/bin',
|
||||
'data': '{base}',
|
||||
},
|
||||
+ 'posix_local': {
|
||||
+ 'stdlib': '{base}/lib/python{py_version_short}',
|
||||
+ 'platstdlib': '{platbase}/lib/python{py_version_short}',
|
||||
+ 'purelib': '{base}/local/lib/python{py_version_short}/dist-packages',
|
||||
+ 'platlib': '{platbase}/local/lib/python{py_version_short}/dist-packages',
|
||||
+ 'include': '{base}/local/include/python{py_version_short}',
|
||||
+ 'platinclude': '{platbase}/local/include/python{py_version_short}',
|
||||
+ 'scripts': '{base}/local/bin',
|
||||
+ 'data': '{base}/local',
|
||||
+ },
|
||||
+ 'deb_system': {
|
||||
+ 'stdlib': '{base}/lib/python{py_version_short}',
|
||||
+ 'platstdlib': '{platbase}/lib/python{py_version_short}',
|
||||
+ 'purelib': '{base}/lib/python{py_version_short}/dist-packages',
|
||||
+ 'platlib': '{platbase}/lib/python{py_version_short}/dist-packages',
|
||||
+ 'include': '{base}/include/python{py_version_short}',
|
||||
+ 'platinclude': '{platbase}/include/python{py_version_short}',
|
||||
+ 'scripts': '{base}/bin',
|
||||
+ 'data': '{base}',
|
||||
+ },
|
||||
'posix_home': {
|
||||
'stdlib': '{base}/lib/python',
|
||||
'platstdlib': '{base}/lib/python',
|
||||
@@ -134,7 +154,7 @@ def is_python_build():
|
||||
_PYTHON_BUILD = is_python_build()
|
||||
|
||||
if _PYTHON_BUILD:
|
||||
- for scheme in ('posix_prefix', 'posix_home'):
|
||||
+ for scheme in ('posix_prefix', 'posix_local', 'deb_system', 'posix_home'):
|
||||
_INSTALL_SCHEMES[scheme]['include'] = '{projectbase}/Include'
|
||||
_INSTALL_SCHEMES[scheme]['platinclude'] = '{srcdir}'
|
||||
|
||||
@@ -168,7 +188,10 @@ def _expand_vars(scheme, vars):
|
||||
|
||||
def _get_default_scheme():
|
||||
if os.name == 'posix':
|
||||
- # the default scheme for posix is posix_prefix
|
||||
+ # the default scheme for posix on Debian/Ubuntu is posix_local
|
||||
+ is_default_prefix = os.path.normpath(sys.exec_prefix or sys.prefix) in ('/usr', '/usr/local')
|
||||
+ if is_default_prefix and 'PYTHONUSERBASE' not in os.environ and 'real_prefix' not in sys.__dict__:
|
||||
+ return 'posix_local'
|
||||
return 'posix_prefix'
|
||||
return os.name
|
||||
|
||||
@@ -315,7 +338,7 @@ def get_makefile_filename():
|
||||
"""Return the path of the Makefile."""
|
||||
if _PYTHON_BUILD:
|
||||
return os.path.join(_PROJECT_BASE, "Makefile")
|
||||
- return os.path.join(get_path('platstdlib'), "config", "Makefile")
|
||||
+ return os.path.join(get_path('platstdlib').replace("/usr/local","/usr",1), "config", "Makefile")
|
||||
|
||||
# Issue #22199: retain undocumented private name for compatibility
|
||||
_get_makefile_filename = get_makefile_filename
|
||||
@@ -447,7 +470,7 @@ def get_config_h_filename():
|
||||
else:
|
||||
inc_dir = _PROJECT_BASE
|
||||
else:
|
||||
- inc_dir = get_path('platinclude')
|
||||
+ inc_dir = get_path('platinclude').replace("/usr/local","/usr",1)
|
||||
return os.path.join(inc_dir, 'pyconfig.h')
|
||||
|
||||
def get_scheme_names():
|
||||
--- a/Lib/test/test_import.py
|
||||
+++ b/Lib/test/test_import.py
|
||||
@@ -301,7 +301,7 @@ class ImportTests(unittest.TestCase):
|
||||
with check_warnings(('', ImportWarning)):
|
||||
# Just a random non-package directory we always expect to be
|
||||
# somewhere in sys.path...
|
||||
- self.assertRaises(ImportError, __import__, "site-packages")
|
||||
+ self.assertRaises(ImportError, __import__, "dist-packages")
|
||||
|
||||
def test_import_by_filename(self):
|
||||
path = os.path.abspath(TESTFN)
|
||||
--- a/Lib/test/test_site.py
|
||||
+++ b/Lib/test/test_site.py
|
||||
@@ -255,10 +255,13 @@ class HelperFunctionsTests(unittest.Test
|
||||
elif os.sep == '/':
|
||||
# OS X, Linux, FreeBSD, etc
|
||||
self.assertEqual(len(dirs), 2)
|
||||
- wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
|
||||
- 'site-packages')
|
||||
+ wanted = os.path.join('xoxo', 'local', 'lib',
|
||||
+ 'python' + sys.version[:3],
|
||||
+ 'dist-packages')
|
||||
self.assertEqual(dirs[0], wanted)
|
||||
- wanted = os.path.join('xoxo', 'lib', 'site-python')
|
||||
+ wanted = os.path.join('xoxo', 'lib',
|
||||
+ 'python' + sys.version[:3],
|
||||
+ 'dist-packages')
|
||||
self.assertEqual(dirs[1], wanted)
|
||||
else:
|
||||
# other platforms
|
||||
--- a/Lib/test/test_sysconfig.py
|
||||
+++ b/Lib/test/test_sysconfig.py
|
||||
@@ -239,8 +239,8 @@ class TestSysConfig(unittest.TestCase):
|
||||
self.assertTrue(os.path.isfile(config_h), config_h)
|
||||
|
||||
def test_get_scheme_names(self):
|
||||
- wanted = ('nt', 'nt_user', 'os2', 'os2_home', 'osx_framework_user',
|
||||
- 'posix_home', 'posix_prefix', 'posix_user')
|
||||
+ wanted = ('deb_system', 'nt', 'nt_user', 'os2', 'os2_home', 'osx_framework_user',
|
||||
+ 'posix_home', 'posix_local', 'posix_prefix', 'posix_user')
|
||||
self.assertEqual(get_scheme_names(), wanted)
|
||||
|
||||
@unittest.skipIf(sys.platform.startswith('win'),
|
||||
--- a/Lib/distutils/tests/test_install.py
|
||||
+++ b/Lib/distutils/tests/test_install.py
|
||||
@@ -194,7 +194,7 @@ class InstallTestCase(support.TempdirMan
|
||||
|
||||
found = [os.path.basename(line) for line in content.splitlines()]
|
||||
expected = ['hello.py', 'hello.pyc', 'sayhi',
|
||||
- 'UNKNOWN-0.0.0-py%s.%s.egg-info' % sys.version_info[:2]]
|
||||
+ 'UNKNOWN-0.0.0.egg-info']
|
||||
self.assertEqual(found, expected)
|
||||
|
||||
def test_record_extensions(self):
|
||||
@@ -224,7 +224,7 @@ class InstallTestCase(support.TempdirMan
|
||||
|
||||
found = [os.path.basename(line) for line in content.splitlines()]
|
||||
expected = [_make_ext_name('xx'),
|
||||
- 'UNKNOWN-0.0.0-py%s.%s.egg-info' % sys.version_info[:2]]
|
||||
+ 'UNKNOWN-0.0.0.egg-info']
|
||||
self.assertEqual(found, expected)
|
||||
|
||||
def test_debug_mode(self):
|
||||
--- a/Lib/distutils/tests/test_bdist_dumb.py
|
||||
+++ b/Lib/distutils/tests/test_bdist_dumb.py
|
||||
@@ -87,7 +87,7 @@ class BuildDumbTestCase(support.TempdirM
|
||||
fp.close()
|
||||
|
||||
contents = sorted(filter(None, map(os.path.basename, contents)))
|
||||
- wanted = ['foo-0.1-py%s.%s.egg-info' % sys.version_info[:2], 'foo.py']
|
||||
+ wanted = ['foo-0.1.egg-info', 'foo.py']
|
||||
if not sys.dont_write_bytecode:
|
||||
wanted.append('foo.pyc')
|
||||
self.assertEqual(contents, sorted(wanted))
|
||||
--- a/Lib/pydoc.py
|
||||
+++ b/Lib/pydoc.py
|
||||
@@ -392,6 +392,7 @@ class Doc:
|
||||
'marshal', 'posix', 'signal', 'sys',
|
||||
'thread', 'zipimport') or
|
||||
(file.startswith(basedir) and
|
||||
+ not file.startswith(os.path.join(basedir, 'dist-packages')) and
|
||||
not file.startswith(os.path.join(basedir, 'site-packages')))) and
|
||||
object.__name__ not in ('xml.etree', 'test.pydoc_mod')):
|
||||
if docloc.startswith(("http://", "https://")):
|
||||
20
debian/patches/distutils-link.diff
vendored
Normal file
20
debian/patches/distutils-link.diff
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# DP: Don't add standard library dirs to library_dirs and runtime_library_dirs.
|
||||
|
||||
Index: b/Lib/distutils/unixccompiler.py
|
||||
===================================================================
|
||||
--- a/Lib/distutils/unixccompiler.py
|
||||
+++ b/Lib/distutils/unixccompiler.py
|
||||
@@ -157,7 +157,12 @@ class UnixCCompiler(CCompiler):
|
||||
objects, output_dir = self._fix_object_args(objects, output_dir)
|
||||
libraries, library_dirs, runtime_library_dirs = \
|
||||
self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
|
||||
-
|
||||
+ # filter out standard library paths, which are not explicitely needed
|
||||
+ # for linking
|
||||
+ library_dirs = [dir for dir in library_dirs
|
||||
+ if not dir in ('/lib', '/lib64', '/usr/lib', '/usr/lib64')]
|
||||
+ runtime_library_dirs = [dir for dir in runtime_library_dirs
|
||||
+ if not dir in ('/lib', '/lib64', '/usr/lib', '/usr/lib64')]
|
||||
lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs,
|
||||
libraries)
|
||||
if type(output_dir) not in (StringType, NoneType):
|
||||
57
debian/patches/distutils-sysconfig.diff
vendored
Normal file
57
debian/patches/distutils-sysconfig.diff
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
# DP: Allow setting BASECFLAGS, OPT and EXTRA_LDFLAGS (like, CC, CXX, CPP,
|
||||
# DP: CFLAGS, CPPFLAGS, CCSHARED, LDSHARED) from the environment.
|
||||
|
||||
--- a/Lib/distutils/sysconfig.py
|
||||
+++ b/Lib/distutils/sysconfig.py
|
||||
@@ -184,10 +184,12 @@ def customize_compiler(compiler):
|
||||
_osx_support.customize_compiler(_config_vars)
|
||||
_config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
|
||||
|
||||
- (cc, cxx, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \
|
||||
- get_config_vars('CC', 'CXX', 'CFLAGS',
|
||||
- 'CCSHARED', 'LDSHARED', 'SO', 'AR',
|
||||
- 'ARFLAGS')
|
||||
+ (cc, cxx, cflags, extra_cflags, basecflags,
|
||||
+ ccshared, ldshared, so_ext, ar, ar_flags,
|
||||
+ configure_cppflags, configure_cflags, configure_ldflags) = \
|
||||
+ get_config_vars('CC', 'CXX', 'CFLAGS', 'EXTRA_CFLAGS', 'BASECFLAGS',
|
||||
+ 'CCSHARED', 'LDSHARED', 'SO', 'AR', 'ARFLAGS',
|
||||
+ 'CONFIGURE_CPPFLAGS', 'CONFIGURE_CFLAGS', 'CONFIGURE_LDFLAGS')
|
||||
|
||||
if 'CC' in os.environ:
|
||||
newcc = os.environ['CC']
|
||||
@@ -208,13 +210,24 @@ def customize_compiler(compiler):
|
||||
cpp = cc + " -E" # not always
|
||||
if 'LDFLAGS' in os.environ:
|
||||
ldshared = ldshared + ' ' + os.environ['LDFLAGS']
|
||||
+ elif configure_ldflags:
|
||||
+ ldshared = ldshared + ' ' + configure_ldflags
|
||||
+ if 'BASECFLAGS' in os.environ:
|
||||
+ basecflags = os.environ['BASECFLAGS']
|
||||
if 'CFLAGS' in os.environ:
|
||||
- cflags = cflags + ' ' + os.environ['CFLAGS']
|
||||
+ cflags = ' '.join(str(x) for x in (basecflags, os.environ['CFLAGS'], extra_cflags) if x)
|
||||
ldshared = ldshared + ' ' + os.environ['CFLAGS']
|
||||
+ elif configure_cflags:
|
||||
+ cflags = ' '.join(str(x) for x in (basecflags, configure_cflags, extra_cflags) if x)
|
||||
+ ldshared = ldshared + ' ' + configure_cflags
|
||||
if 'CPPFLAGS' in os.environ:
|
||||
cpp = cpp + ' ' + os.environ['CPPFLAGS']
|
||||
cflags = cflags + ' ' + os.environ['CPPFLAGS']
|
||||
ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
|
||||
+ elif configure_cppflags:
|
||||
+ cpp = cpp + ' ' + configure_cppflags
|
||||
+ cflags = cflags + ' ' + configure_cppflags
|
||||
+ ldshared = ldshared + ' ' + configure_cppflags
|
||||
if 'AR' in os.environ:
|
||||
ar = os.environ['AR']
|
||||
if 'ARFLAGS' in os.environ:
|
||||
@@ -228,7 +241,7 @@ def customize_compiler(compiler):
|
||||
compiler=cc_cmd,
|
||||
compiler_so=cc_cmd + ' ' + ccshared,
|
||||
compiler_cxx=cxx,
|
||||
- linker_so=ldshared,
|
||||
+ linker_so=ldshared + ' ' + ccshared,
|
||||
linker_exe=cc,
|
||||
archiver=archiver)
|
||||
|
||||
13
debian/patches/doc-nodownload.diff
vendored
Normal file
13
debian/patches/doc-nodownload.diff
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# DP: Don't try to download documentation tools
|
||||
|
||||
--- a/Doc/Makefile
|
||||
+++ b/Doc/Makefile
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
update: clean checkout
|
||||
|
||||
-build: checkout
|
||||
+build:
|
||||
mkdir -p build/$(BUILDER) build/doctrees
|
||||
$(PYTHON) tools/sphinx-build.py $(ALLSPHINXOPTS)
|
||||
@echo
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user