forked from pool/python310
Accepting request 900325 from home:mcepl:work
Sending the project to the development project. OBS-URL: https://build.opensuse.org/request/show/900325 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python310?expand=0&rev=1
This commit is contained in:
commit
db99c9d1b7
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
58
F00251-change-user-install-location.patch
Normal file
58
F00251-change-user-install-location.patch
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
From 910f38d9768d39d4d31426743ae4081ed1ab66b6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michal Cyprian <m.cyprian@gmail.com>
|
||||||
|
Date: Mon, 26 Jun 2017 16:32:56 +0200
|
||||||
|
Subject: [PATCH] 00251: Change user install location
|
||||||
|
|
||||||
|
Set values of prefix and exec_prefix in distutils install command
|
||||||
|
to /usr/local if executable is /usr/bin/python* and RPM build
|
||||||
|
is not detected to make pip and distutils install into separate location.
|
||||||
|
|
||||||
|
Fedora Change: https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
|
||||||
|
---
|
||||||
|
Lib/distutils/command/install.py | 15 +++++++++++++--
|
||||||
|
Lib/site.py | 9 ++++++++-
|
||||||
|
2 files changed, 21 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
--- a/Lib/distutils/command/install.py
|
||||||
|
+++ b/Lib/distutils/command/install.py
|
||||||
|
@@ -441,8 +441,19 @@ class install(Command):
|
||||||
|
raise DistutilsOptionError(
|
||||||
|
"must not supply exec-prefix without prefix")
|
||||||
|
|
||||||
|
- self.prefix = os.path.normpath(sys.prefix)
|
||||||
|
- self.exec_prefix = os.path.normpath(sys.exec_prefix)
|
||||||
|
+ # self.prefix is set to sys.prefix + /local/
|
||||||
|
+ # if neither RPM build nor virtual environment is
|
||||||
|
+ # detected to make pip and distutils install packages
|
||||||
|
+ # into the separate location.
|
||||||
|
+ if (not (hasattr(sys, 'real_prefix') or
|
||||||
|
+ sys.prefix != sys.base_prefix) and
|
||||||
|
+ 'RPM_BUILD_ROOT' not in os.environ):
|
||||||
|
+ addition = "/local"
|
||||||
|
+ else:
|
||||||
|
+ addition = ""
|
||||||
|
+
|
||||||
|
+ self.prefix = os.path.normpath(sys.prefix) + addition
|
||||||
|
+ self.exec_prefix = os.path.normpath(sys.exec_prefix) + addition
|
||||||
|
|
||||||
|
else:
|
||||||
|
if self.exec_prefix is None:
|
||||||
|
--- a/Lib/site.py
|
||||||
|
+++ b/Lib/site.py
|
||||||
|
@@ -380,8 +380,15 @@ def getsitepackages(prefixes=None):
|
||||||
|
return sitepackages
|
||||||
|
|
||||||
|
def addsitepackages(known_paths, prefixes=None):
|
||||||
|
- """Add site-packages to sys.path"""
|
||||||
|
+ """Add site-packages to sys.path
|
||||||
|
+
|
||||||
|
+ '/usr/local' is included in PREFIXES if RPM build is not detected
|
||||||
|
+ to make packages installed into this location visible.
|
||||||
|
+
|
||||||
|
+ """
|
||||||
|
_trace("Processing global site-packages")
|
||||||
|
+ if ENABLE_USER_SITE and 'RPM_BUILD_ROOT' not in os.environ:
|
||||||
|
+ PREFIXES.insert(0, "/usr/local")
|
||||||
|
for sitedir in getsitepackages(prefixes):
|
||||||
|
if os.path.isdir(sitedir):
|
||||||
|
addsitedir(sitedir, known_paths)
|
26
PACKAGING-NOTES
Normal file
26
PACKAGING-NOTES
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Notes for packagers of Python3
|
||||||
|
==============================
|
||||||
|
|
||||||
|
0. Faster build turnaround
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
By default, python builds with profile-guided optimization. This needs
|
||||||
|
an additional run of the test suite and it is generally slow.
|
||||||
|
PGO build takes around 50 minutes.
|
||||||
|
|
||||||
|
For development, use "--without profileopt" option to disable PGO. This
|
||||||
|
shortens the build time to ~5 minutes including test suite.
|
||||||
|
|
||||||
|
1. import_failed.map
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
This is a mechanism installed as part of python3-base, that places shim modules
|
||||||
|
on python's path (through a generated zzzz-import-failed-hooks.pth file, so that
|
||||||
|
it is imported as much at the end as makes sense; and an _import_failed subdir
|
||||||
|
of /usr/lib/pythonX.Y). Then when the user tries to import a module that is part
|
||||||
|
of a subpackage, the ImportError will contain a helpful message telling them
|
||||||
|
which missing subpackage to install.
|
||||||
|
|
||||||
|
This can sometimes cause problems on non-standard configurations, if the pth
|
||||||
|
gets included too early (for instance if you are using a script to include all
|
||||||
|
pths by hand in some strange order). Just something to look out for.
|
3
Python-3.10.0b2.tar.xz
Normal file
3
Python-3.10.0b2.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:c171663351fadef1759aef1dd5220ff69ccd76affb6d0aa719f90c63509b6aa8
|
||||||
|
size 18651420
|
16
Python-3.10.0b2.tar.xz.asc
Normal file
16
Python-3.10.0b2.tar.xz.asc
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
|
||||||
|
iQIzBAABCAAdFiEEz9yiRbEEPPKl+Xhl/+h0BBaL2EcFAmC0yQQACgkQ/+h0BBaL
|
||||||
|
2Ecx4Q/+Pc7JTYqDW/o7+3qFtVeZwfmTNoxDjDSkLUgOLO04RdZOsGpIHdlOkKqF
|
||||||
|
cadKXQDIXdPbfgb5fM9fOaPWAICgvGf3WHfl6cDMuvRnVTLx3/L2dHKNsUH2o4ty
|
||||||
|
XDjNLYTrHF8gjk2P70eG3YYmMRJIG9HKZNa8ER6gmeerzWTCr85Px6UexDSpmQe+
|
||||||
|
BR4hLfF+sOgJ9sJK8AaU2ZRYm9yVJmxa/tW1CmtDNTDo0Hc48R2ZDqB4rhMO2n8v
|
||||||
|
I9pXbQ4Bv3KJ+2Xkk42WIko2vz8d+EE5x3oToL/Pa9Tw4x+ypmssfHZlHw3+OG5X
|
||||||
|
HVKsuEPcek0LAukOdaGPSxG2EeDiOMrJpo17n6dcIq5fYyP60a+q+F2nZ+VnW4sI
|
||||||
|
ryTtsYE/lfHjb3GT+yoyw2eLAhC3zSzkTAgFzcq1ZnEuRrrRyhEeV4fvZxngdB3c
|
||||||
|
Z4PdLcLklT8u6YevFbFi9TmBE0NNdtoL6vwhXibBITmnPpnCwmfzFyNjIbvHoN8V
|
||||||
|
g3D8b+IQXR+AfKCTTpedLj4nFk2YV5pjDH5IEiO3PfsSbCYcGn01IHqgy9Uv0Kei
|
||||||
|
HqIKf8GKMtjQUkX/+1ywXV0Vt+rdE99rZ7EKku70znaD1XOw+wyE1UAZsw85dI0m
|
||||||
|
qFz1DIIJxX6ViMHwl8NF30Rl68OvILgV1xDjhDz60EgroP/DIe0=
|
||||||
|
=cMZi
|
||||||
|
-----END PGP SIGNATURE-----
|
43
README.SUSE
Normal file
43
README.SUSE
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
Python 3 in SUSE
|
||||||
|
==============
|
||||||
|
|
||||||
|
* Subpackages *
|
||||||
|
|
||||||
|
Python 3 is split into several subpackages, based on external dependencies.
|
||||||
|
The main package 'python3' has soft dependencies on all subpackages needed to
|
||||||
|
assemble the standard library; however, these might not all be installed by default.
|
||||||
|
|
||||||
|
If you attempt to import a module that is currently not installed, an ImportError is thrown,
|
||||||
|
with instructions to install the missing subpackage. Installing the subpackage might result
|
||||||
|
in installing libraries that the subpackage requires to function.
|
||||||
|
|
||||||
|
|
||||||
|
* ensurepip *
|
||||||
|
|
||||||
|
The 'ensurepip' module from Python 3 standard library (PEP 453) is supposed to deploy
|
||||||
|
a bundled copy of the pip installer. This makes no sense in a managed distribution like SUSE.
|
||||||
|
Instead, you need to install package 'python3-pip'. Usually this will be installed automatically
|
||||||
|
with 'python3'.
|
||||||
|
|
||||||
|
Using 'ensurepip' when pip is not installed will result in an ImportError with instructions
|
||||||
|
to install 'python3-pip'.
|
||||||
|
|
||||||
|
|
||||||
|
* Documentation *
|
||||||
|
|
||||||
|
You can find documentation in seprarate packages: python3-doc and
|
||||||
|
python3-doc-pdf. These contan following documents:
|
||||||
|
|
||||||
|
Tutorial, What's New in Python, Global Module Index, Library Reference,
|
||||||
|
Macintosh Module Reference, Installing Python Modules, Distributing Python
|
||||||
|
Modules, Language Reference, Extending and Embedding, Python/C API,
|
||||||
|
Documenting Python
|
||||||
|
|
||||||
|
The python3-doc package constains many text files from source tarball.
|
||||||
|
|
||||||
|
|
||||||
|
* Interactive mode *
|
||||||
|
|
||||||
|
Interactive mode is by default enhanced with of history and command completion.
|
||||||
|
If you don't like these features, you can unset the PYTHONSTARTUP variable
|
||||||
|
in your .profile or disable it system wide in /etc/profile.d/python.sh.
|
4
_multibuild
Normal file
4
_multibuild
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>base</package>
|
||||||
|
<package>doc</package>
|
||||||
|
</multibuild>
|
3
baselibs.conf
Normal file
3
baselibs.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
python39-base
|
||||||
|
python39
|
||||||
|
libpython3_9-1_0
|
3
bluez-devel-vendor.tar.xz
Normal file
3
bluez-devel-vendor.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:d030d6ff641577625745b435f4a45e9025e11143e60d0bba7dddf53e8bf71941
|
||||||
|
size 24976
|
163
bpo-31046_ensurepip_honours_prefix.patch
Normal file
163
bpo-31046_ensurepip_honours_prefix.patch
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
From 5754521af1d51aa8e445cba07a093bbc0c88596d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zackery Spytz <zspytz@gmail.com>
|
||||||
|
Date: Mon, 16 Dec 2019 18:24:08 -0700
|
||||||
|
Subject: [PATCH] bpo-31046: ensurepip does not honour the value of $(prefix)
|
||||||
|
|
||||||
|
Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
|
||||||
|
---
|
||||||
|
Doc/library/ensurepip.rst | 9 +++--
|
||||||
|
Lib/ensurepip/__init__.py | 18 +++++++---
|
||||||
|
Lib/test/test_ensurepip.py | 11 ++++++
|
||||||
|
Makefile.pre.in | 4 +-
|
||||||
|
Misc/NEWS.d/next/Build/2019-12-16-17-50-42.bpo-31046.XA-Qfr.rst | 1
|
||||||
|
5 files changed, 34 insertions(+), 9 deletions(-)
|
||||||
|
create mode 100644 Misc/NEWS.d/next/Build/2019-12-16-17-50-42.bpo-31046.XA-Qfr.rst
|
||||||
|
|
||||||
|
--- a/Doc/library/ensurepip.rst
|
||||||
|
+++ b/Doc/library/ensurepip.rst
|
||||||
|
@@ -56,8 +56,9 @@ is at least as recent as the one availab
|
||||||
|
By default, ``pip`` is installed into the current virtual environment
|
||||||
|
(if one is active) or into the system site packages (if there is no
|
||||||
|
active virtual environment). The installation location can be controlled
|
||||||
|
-through two additional command line options:
|
||||||
|
+through some additional command line options:
|
||||||
|
|
||||||
|
+* ``--prefix <dir>``: Installs ``pip`` using the given directory prefix.
|
||||||
|
* ``--root <dir>``: Installs ``pip`` relative to the given root directory
|
||||||
|
rather than the root of the currently active virtual environment (if any)
|
||||||
|
or the default root for the current Python installation.
|
||||||
|
@@ -89,7 +90,7 @@ Module API
|
||||||
|
Returns a string specifying the available version of pip that will be
|
||||||
|
installed when bootstrapping an environment.
|
||||||
|
|
||||||
|
-.. function:: bootstrap(root=None, upgrade=False, user=False, \
|
||||||
|
+.. function:: bootstrap(root=None, prefix=None, upgrade=False, user=False, \
|
||||||
|
altinstall=False, default_pip=False, \
|
||||||
|
verbosity=0)
|
||||||
|
|
||||||
|
@@ -99,6 +100,8 @@ Module API
|
||||||
|
If *root* is ``None``, then installation uses the default install location
|
||||||
|
for the current environment.
|
||||||
|
|
||||||
|
+ *prefix* specifies the directory prefix to use when installing.
|
||||||
|
+
|
||||||
|
*upgrade* indicates whether or not to upgrade an existing installation
|
||||||
|
of an earlier version of ``pip`` to the available version.
|
||||||
|
|
||||||
|
@@ -119,6 +122,8 @@ Module API
|
||||||
|
*verbosity* controls the level of output to :data:`sys.stdout` from the
|
||||||
|
bootstrapping operation.
|
||||||
|
|
||||||
|
+ .. versionchanged:: 3.9 the *prefix* parameter was added.
|
||||||
|
+
|
||||||
|
.. audit-event:: ensurepip.bootstrap root ensurepip.bootstrap
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
--- a/Lib/ensurepip/__init__.py
|
||||||
|
+++ b/Lib/ensurepip/__init__.py
|
||||||
|
@@ -113,27 +113,27 @@ def _disable_pip_configuration_settings(
|
||||||
|
os.environ['PIP_CONFIG_FILE'] = os.devnull
|
||||||
|
|
||||||
|
|
||||||
|
-def bootstrap(*, root=None, upgrade=False, user=False,
|
||||||
|
+def bootstrap(*, root=None, prefix=None, upgrade=False, user=False,
|
||||||
|
altinstall=False, default_pip=False,
|
||||||
|
verbosity=0):
|
||||||
|
"""
|
||||||
|
Bootstrap pip into the current Python installation (or the given root
|
||||||
|
- directory).
|
||||||
|
+ and directory prefix).
|
||||||
|
|
||||||
|
Note that calling this function will alter both sys.path and os.environ.
|
||||||
|
"""
|
||||||
|
# Discard the return value
|
||||||
|
- _bootstrap(root=root, upgrade=upgrade, user=user,
|
||||||
|
+ _bootstrap(root=root, prefix=prefix, upgrade=upgrade, user=user,
|
||||||
|
altinstall=altinstall, default_pip=default_pip,
|
||||||
|
verbosity=verbosity)
|
||||||
|
|
||||||
|
|
||||||
|
-def _bootstrap(*, root=None, upgrade=False, user=False,
|
||||||
|
+def _bootstrap(*, root=None, prefix=None, upgrade=False, user=False,
|
||||||
|
altinstall=False, default_pip=False,
|
||||||
|
verbosity=0):
|
||||||
|
"""
|
||||||
|
Bootstrap pip into the current Python installation (or the given root
|
||||||
|
- directory). Returns pip command status code.
|
||||||
|
+ and directory prefix). Returns pip command status code.
|
||||||
|
|
||||||
|
Note that calling this function will alter both sys.path and os.environ.
|
||||||
|
"""
|
||||||
|
@@ -183,6 +183,8 @@ def _bootstrap(*, root=None, upgrade=Fal
|
||||||
|
args = ["install", "--no-cache-dir", "--no-index", "--find-links", tmpdir]
|
||||||
|
if root:
|
||||||
|
args += ["--root", root]
|
||||||
|
+ if prefix:
|
||||||
|
+ args += ["--prefix", prefix]
|
||||||
|
if upgrade:
|
||||||
|
args += ["--upgrade"]
|
||||||
|
if user:
|
||||||
|
@@ -258,6 +260,11 @@ def _main(argv=None):
|
||||||
|
help="Install everything relative to this alternate root directory.",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
+ "--prefix",
|
||||||
|
+ default=None,
|
||||||
|
+ help="Install everything using this prefix.",
|
||||||
|
+ )
|
||||||
|
+ parser.add_argument(
|
||||||
|
"--altinstall",
|
||||||
|
action="store_true",
|
||||||
|
default=False,
|
||||||
|
@@ -276,6 +283,7 @@ def _main(argv=None):
|
||||||
|
|
||||||
|
return _bootstrap(
|
||||||
|
root=args.root,
|
||||||
|
+ prefix=args.prefix,
|
||||||
|
upgrade=args.upgrade,
|
||||||
|
user=args.user,
|
||||||
|
verbosity=args.verbosity,
|
||||||
|
--- a/Lib/test/test_ensurepip.py
|
||||||
|
+++ b/Lib/test/test_ensurepip.py
|
||||||
|
@@ -112,6 +112,17 @@ class TestBootstrap(EnsurepipMixin, unit
|
||||||
|
unittest.mock.ANY,
|
||||||
|
)
|
||||||
|
|
||||||
|
+ def test_bootstrapping_with_prefix(self):
|
||||||
|
+ ensurepip.bootstrap(prefix="/foo/bar/")
|
||||||
|
+ self.run_pip.assert_called_once_with(
|
||||||
|
+ [
|
||||||
|
+ "install", "--no-cache-dir", "--no-index", "--find-links",
|
||||||
|
+ unittest.mock.ANY, "--prefix", "/foo/bar/",
|
||||||
|
+ "setuptools", "pip",
|
||||||
|
+ ],
|
||||||
|
+ unittest.mock.ANY,
|
||||||
|
+ )
|
||||||
|
+
|
||||||
|
def test_bootstrapping_with_user(self):
|
||||||
|
ensurepip.bootstrap(user=True)
|
||||||
|
|
||||||
|
--- a/Makefile.pre.in
|
||||||
|
+++ b/Makefile.pre.in
|
||||||
|
@@ -1279,7 +1279,7 @@ install: @FRAMEWORKINSTALLFIRST@ commoni
|
||||||
|
install|*) ensurepip="" ;; \
|
||||||
|
esac; \
|
||||||
|
$(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
|
||||||
|
- $$ensurepip --root=$(DESTDIR)/ ; \
|
||||||
|
+ $$ensurepip --root=$(DESTDIR)/ --prefix=$(prefix) ; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
altinstall: commoninstall
|
||||||
|
@@ -1289,7 +1289,7 @@ altinstall: commoninstall
|
||||||
|
install|*) ensurepip="--altinstall" ;; \
|
||||||
|
esac; \
|
||||||
|
$(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
|
||||||
|
- $$ensurepip --root=$(DESTDIR)/ ; \
|
||||||
|
+ $$ensurepip --root=$(DESTDIR)/ --prefix=$(prefix) ; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
commoninstall: check-clean-src @FRAMEWORKALTINSTALLFIRST@ \
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/Misc/NEWS.d/next/Build/2019-12-16-17-50-42.bpo-31046.XA-Qfr.rst
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+A directory prefix can now be specified when using :mod:`ensurepip`.
|
15
distutils-reproducible-compile.patch
Normal file
15
distutils-reproducible-compile.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
Lib/distutils/util.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/Lib/distutils/util.py
|
||||||
|
+++ b/Lib/distutils/util.py
|
||||||
|
@@ -436,7 +436,7 @@ byte_compile(files, optimize=%r, force=%
|
||||||
|
else:
|
||||||
|
from py_compile import compile
|
||||||
|
|
||||||
|
- for file in py_files:
|
||||||
|
+ for file in sorted(py_files):
|
||||||
|
if file[-3:] != ".py":
|
||||||
|
# This lets us be lazy and not filter filenames in
|
||||||
|
# the "install_lib" command.
|
35
idle3.appdata.xml
Normal file
35
idle3.appdata.xml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!-- Copyright 2017 Zbigniew Jędrzejewski-Szmek -->
|
||||||
|
<application>
|
||||||
|
<id type="desktop">idle3.desktop</id>
|
||||||
|
<name>IDLE3</name>
|
||||||
|
<metadata_licence>CC0</metadata_licence>
|
||||||
|
<project_license>Python-2.0</project_license>
|
||||||
|
<summary>Python 3 Integrated Development and Learning Environment</summary>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
IDLE is Python’s Integrated Development and Learning Environment.
|
||||||
|
The GUI is uniform between Windows, Unix, and Mac OS X.
|
||||||
|
IDLE provides an easy way to start writing, running, and debugging
|
||||||
|
Python code.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
IDLE is written in pure Python, and uses the tkinter GUI toolkit.
|
||||||
|
It provides:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>a Python shell window (interactive interpreter) with colorizing of code input, output, and error messages,</li>
|
||||||
|
<li>a multi-window text editor with multiple undo, Python colorizing, smart indent, call tips, auto completion, and other features,</li>
|
||||||
|
<li>search within any window, replace within editor windows, and search through multiple files (grep),</li>
|
||||||
|
<li>a debugger with persistent breakpoints, stepping, and viewing of global and local namespaces.</li>
|
||||||
|
</ul>
|
||||||
|
</description>
|
||||||
|
<url type="homepage">https://docs.python.org/3/library/idle.html</url>
|
||||||
|
<screenshots>
|
||||||
|
<screenshot type="default">http://in.waw.pl/~zbyszek/fedora/idle3-appdata/idle3-main-window.png</screenshot>
|
||||||
|
<screenshot>http://in.waw.pl/~zbyszek/fedora/idle3-appdata/idle3-class-browser.png</screenshot>
|
||||||
|
<screenshot>http://in.waw.pl/~zbyszek/fedora/idle3-appdata/idle3-code-viewer.png</screenshot>
|
||||||
|
</screenshots>
|
||||||
|
<update_contact>zbyszek@in.waw.pl</update_contact>
|
||||||
|
</application>
|
12
idle3.desktop
Normal file
12
idle3.desktop
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=IDLE 3
|
||||||
|
GenericName=Python 3 IDE
|
||||||
|
Comment=Python 3 Integrated Development and Learning Environment
|
||||||
|
Exec=idle3 %F
|
||||||
|
TryExec=idle3
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Icon=idle3
|
||||||
|
Categories=Development;IDE;
|
||||||
|
MimeType=text/x-python;
|
7
import_failed.map
Normal file
7
import_failed.map
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
python39-curses: curses _curses _curses_panel
|
||||||
|
python39-dbm: dbm _dbm _gdbm
|
||||||
|
python39-idle: idlelib
|
||||||
|
python39-testsuite: test _ctypes_test _testbuffer _testcapi _testinternalcapi _testimportmultiple _testmultiphase xxlimited
|
||||||
|
python39-tk: tkinter _tkinter
|
||||||
|
python39-tools: turtledemo
|
||||||
|
python39: sqlite3 readline _sqlite3 nis
|
23
import_failed.py
Normal file
23
import_failed.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import sys, os
|
||||||
|
from sysconfig import get_path
|
||||||
|
|
||||||
|
failed_map_path = os.path.join(get_path('stdlib'), '_import_failed', 'import_failed.map')
|
||||||
|
|
||||||
|
if __spec__:
|
||||||
|
failed_name = __spec__.name
|
||||||
|
else:
|
||||||
|
failed_name = __name__
|
||||||
|
|
||||||
|
with open(failed_map_path) as fd:
|
||||||
|
for line in fd:
|
||||||
|
package = line.split(':')[0]
|
||||||
|
imports = line.split(':')[1]
|
||||||
|
if failed_name in imports:
|
||||||
|
raise ImportError(f"""Module '{failed_name}' is not installed.
|
||||||
|
Use:
|
||||||
|
sudo zypper install {package}
|
||||||
|
to install it.""")
|
||||||
|
|
||||||
|
raise ImportError(f"""Module '{failed_name}' is not installed.
|
||||||
|
It is supposed to be part of python3 distribution, but missing from failed import map.
|
||||||
|
Please file a bug on the SUSE Bugzilla.""")
|
28
macros.python3
Normal file
28
macros.python3
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
%have_python3 1
|
||||||
|
|
||||||
|
# commented out legacy macro definitions
|
||||||
|
#py3_prefix /usr
|
||||||
|
#py3_incdir /usr/include/python3.5m
|
||||||
|
#py3_ver 3.5
|
||||||
|
|
||||||
|
# these should now be provided by macros.python_all
|
||||||
|
#python3_sitearch /usr/lib64/python3.5/site-packages
|
||||||
|
#python3_sitelib /usr/lib/python3.5/site-packages
|
||||||
|
#python3_version 3.5
|
||||||
|
|
||||||
|
# hard to say if anyone ever used these?
|
||||||
|
#py3_soflags cpython-35m-x86_64-linux-gnu
|
||||||
|
#py3_abiflags m
|
||||||
|
%cpython3_soabi %(python3 -c "import sysconfig; print(sysconfig.get_config_var('SOABI'))")
|
||||||
|
%py3_soflags %cpython3_soabi
|
||||||
|
|
||||||
|
# compilation macros that might be in use somewhere
|
||||||
|
%py3_compile(O) \
|
||||||
|
find %1 -name '*.pyc' -exec rm -f {} ";"\
|
||||||
|
python3 -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1\
|
||||||
|
%{-O:\
|
||||||
|
find %1 -name '*.pyo' -exec rm -f {} ";"\
|
||||||
|
python3 -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1\
|
||||||
|
}
|
||||||
|
|
||||||
|
|
660
no-skipif-doctests.patch
Normal file
660
no-skipif-doctests.patch
Normal file
@ -0,0 +1,660 @@
|
|||||||
|
only in patch2:
|
||||||
|
unchanged:
|
||||||
|
--- a/Doc/conf.py
|
||||||
|
+++ b/Doc/conf.py
|
||||||
|
@@ -46,7 +46,7 @@ today_fmt = '%B %d, %Y'
|
||||||
|
highlight_language = 'python3'
|
||||||
|
|
||||||
|
# Minimum version of sphinx required
|
||||||
|
-needs_sphinx = '1.8'
|
||||||
|
+needs_sphinx = '1.7.6'
|
||||||
|
|
||||||
|
# Ignore any .rst files in the venv/ directory.
|
||||||
|
exclude_patterns = ['venv/*', 'README.rst']
|
||||||
|
--- a/Doc/library/turtle.rst
|
||||||
|
+++ b/Doc/library/turtle.rst
|
||||||
|
@@ -250,7 +250,6 @@ Turtle motion
|
||||||
|
turtle is headed.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.position()
|
||||||
|
(0.00,0.00)
|
||||||
|
@@ -277,7 +276,6 @@ Turtle motion
|
||||||
|
>>> turtle.goto(0, 0)
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.position()
|
||||||
|
(0.00,0.00)
|
||||||
|
@@ -296,13 +294,11 @@ Turtle motion
|
||||||
|
orientation depends on the turtle mode, see :func:`mode`.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
:hide:
|
||||||
|
|
||||||
|
>>> turtle.setheading(22)
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.heading()
|
||||||
|
22.0
|
||||||
|
@@ -321,13 +317,11 @@ Turtle motion
|
||||||
|
orientation depends on the turtle mode, see :func:`mode`.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
:hide:
|
||||||
|
|
||||||
|
>>> turtle.setheading(22)
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.heading()
|
||||||
|
22.0
|
||||||
|
@@ -350,13 +344,11 @@ Turtle motion
|
||||||
|
not change the turtle's orientation.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
:hide:
|
||||||
|
|
||||||
|
>>> turtle.goto(0, 0)
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> tp = turtle.pos()
|
||||||
|
>>> tp
|
||||||
|
@@ -380,13 +372,11 @@ Turtle motion
|
||||||
|
unchanged.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
:hide:
|
||||||
|
|
||||||
|
>>> turtle.goto(0, 240)
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.position()
|
||||||
|
(0.00,240.00)
|
||||||
|
@@ -402,13 +392,11 @@ Turtle motion
|
||||||
|
Set the turtle's second coordinate to *y*, leave first coordinate unchanged.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
:hide:
|
||||||
|
|
||||||
|
>>> turtle.goto(0, 40)
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.position()
|
||||||
|
(0.00,40.00)
|
||||||
|
@@ -435,7 +423,6 @@ Turtle motion
|
||||||
|
=================== ====================
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.setheading(90)
|
||||||
|
>>> turtle.heading()
|
||||||
|
@@ -448,14 +435,12 @@ Turtle motion
|
||||||
|
its start-orientation (which depends on the mode, see :func:`mode`).
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
:hide:
|
||||||
|
|
||||||
|
>>> turtle.setheading(90)
|
||||||
|
>>> turtle.goto(0, -10)
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.heading()
|
||||||
|
90.0
|
||||||
|
@@ -487,7 +472,6 @@ Turtle motion
|
||||||
|
calculated automatically. May be used to draw regular polygons.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.home()
|
||||||
|
>>> turtle.position()
|
||||||
|
@@ -516,7 +500,6 @@ Turtle motion
|
||||||
|
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.home()
|
||||||
|
>>> turtle.dot()
|
||||||
|
@@ -534,7 +517,6 @@ Turtle motion
|
||||||
|
it by calling ``clearstamp(stamp_id)``.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.color("blue")
|
||||||
|
>>> turtle.stamp()
|
||||||
|
@@ -550,7 +532,6 @@ Turtle motion
|
||||||
|
Delete stamp with given *stampid*.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.position()
|
||||||
|
(150.00,-0.00)
|
||||||
|
@@ -595,7 +576,6 @@ Turtle motion
|
||||||
|
undo actions is determined by the size of the undobuffer.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> for i in range(4):
|
||||||
|
... turtle.fd(50); turtle.lt(80)
|
||||||
|
@@ -628,7 +608,6 @@ Turtle motion
|
||||||
|
turtle turn instantly.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.speed()
|
||||||
|
3
|
||||||
|
@@ -649,7 +628,6 @@ Tell Turtle's state
|
||||||
|
Return the turtle's current location (x,y) (as a :class:`Vec2D` vector).
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.pos()
|
||||||
|
(440.00,-0.00)
|
||||||
|
@@ -665,7 +643,6 @@ Tell Turtle's state
|
||||||
|
orientation which depends on the mode - "standard"/"world" or "logo".
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.goto(10, 10)
|
||||||
|
>>> turtle.towards(0,0)
|
||||||
|
@@ -677,7 +654,6 @@ Tell Turtle's state
|
||||||
|
Return the turtle's x coordinate.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.home()
|
||||||
|
>>> turtle.left(50)
|
||||||
|
@@ -693,7 +669,6 @@ Tell Turtle's state
|
||||||
|
Return the turtle's y coordinate.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.home()
|
||||||
|
>>> turtle.left(60)
|
||||||
|
@@ -710,7 +685,6 @@ Tell Turtle's state
|
||||||
|
:func:`mode`).
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.home()
|
||||||
|
>>> turtle.left(67)
|
||||||
|
@@ -727,7 +701,6 @@ Tell Turtle's state
|
||||||
|
other turtle, in turtle step units.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.home()
|
||||||
|
>>> turtle.distance(30,40)
|
||||||
|
@@ -751,7 +724,6 @@ Settings for measurement
|
||||||
|
Default value is 360 degrees.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.home()
|
||||||
|
>>> turtle.left(90)
|
||||||
|
@@ -774,7 +746,6 @@ Settings for measurement
|
||||||
|
``degrees(2*math.pi)``.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.home()
|
||||||
|
>>> turtle.left(90)
|
||||||
|
@@ -785,7 +756,6 @@ Settings for measurement
|
||||||
|
1.5707963267948966
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
:hide:
|
||||||
|
|
||||||
|
>>> turtle.degrees(360)
|
||||||
|
@@ -821,7 +791,6 @@ Drawing state
|
||||||
|
thickness. If no argument is given, the current pensize is returned.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.pensize()
|
||||||
|
1
|
||||||
|
@@ -853,7 +822,6 @@ Drawing state
|
||||||
|
attributes in one statement.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
:options: +NORMALIZE_WHITESPACE
|
||||||
|
|
||||||
|
>>> turtle.pen(fillcolor="black", pencolor="red", pensize=10)
|
||||||
|
@@ -876,7 +844,6 @@ Drawing state
|
||||||
|
Return ``True`` if pen is down, ``False`` if it's up.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.penup()
|
||||||
|
>>> turtle.isdown()
|
||||||
|
@@ -917,7 +884,6 @@ Color control
|
||||||
|
newly set pencolor.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> colormode()
|
||||||
|
1.0
|
||||||
|
@@ -966,7 +932,6 @@ Color control
|
||||||
|
with the newly set fillcolor.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.fillcolor("violet")
|
||||||
|
>>> turtle.fillcolor()
|
||||||
|
@@ -1005,7 +970,6 @@ Color control
|
||||||
|
with the newly set colors.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.color("red", "green")
|
||||||
|
>>> turtle.color()
|
||||||
|
@@ -1022,7 +986,6 @@ Filling
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
:hide:
|
||||||
|
|
||||||
|
>>> turtle.home()
|
||||||
|
@@ -1032,7 +995,6 @@ Filling
|
||||||
|
Return fillstate (``True`` if filling, ``False`` else).
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.begin_fill()
|
||||||
|
>>> if turtle.filling():
|
||||||
|
@@ -1057,7 +1019,6 @@ Filling
|
||||||
|
above may be either all yellow or have some white regions.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.color("black", "red")
|
||||||
|
>>> turtle.begin_fill()
|
||||||
|
@@ -1075,7 +1036,6 @@ More drawing control
|
||||||
|
variables to the default values.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.goto(0,-22)
|
||||||
|
>>> turtle.left(100)
|
||||||
|
@@ -1127,7 +1087,6 @@ Visibility
|
||||||
|
drawing observably.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.hideturtle()
|
||||||
|
|
||||||
|
@@ -1138,7 +1097,6 @@ Visibility
|
||||||
|
Make the turtle visible.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.showturtle()
|
||||||
|
|
||||||
|
@@ -1169,7 +1127,6 @@ Appearance
|
||||||
|
deal with shapes see Screen method :func:`register_shape`.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.shape()
|
||||||
|
'classic'
|
||||||
|
@@ -1195,7 +1152,6 @@ Appearance
|
||||||
|
``resizemode("user")`` is called by :func:`shapesize` when used with arguments.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.resizemode()
|
||||||
|
'noresize'
|
||||||
|
@@ -1219,7 +1175,6 @@ Appearance
|
||||||
|
of the shapes's outline.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.shapesize()
|
||||||
|
(1.0, 1.0, 1)
|
||||||
|
@@ -1244,7 +1199,6 @@ Appearance
|
||||||
|
heading of the turtle are sheared.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.shape("circle")
|
||||||
|
>>> turtle.shapesize(5,2)
|
||||||
|
@@ -1261,7 +1215,6 @@ Appearance
|
||||||
|
change the turtle's heading (direction of movement).
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.reset()
|
||||||
|
>>> turtle.shape("circle")
|
||||||
|
@@ -1281,7 +1234,6 @@ Appearance
|
||||||
|
(direction of movement).
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.reset()
|
||||||
|
>>> turtle.shape("circle")
|
||||||
|
@@ -1307,7 +1259,6 @@ Appearance
|
||||||
|
turtle (its direction of movement).
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.reset()
|
||||||
|
>>> turtle.shape("circle")
|
||||||
|
@@ -1336,7 +1287,6 @@ Appearance
|
||||||
|
given matrix.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle = Turtle()
|
||||||
|
>>> turtle.shape("square")
|
||||||
|
@@ -1352,7 +1302,6 @@ Appearance
|
||||||
|
can be used to define a new shape or components of a compound shape.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.shape("square")
|
||||||
|
>>> turtle.shapetransform(4, -1, 0, 2)
|
||||||
|
@@ -1377,7 +1326,6 @@ Using events
|
||||||
|
procedural way:
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> def turn(x, y):
|
||||||
|
... left(180)
|
||||||
|
@@ -1398,7 +1346,6 @@ Using events
|
||||||
|
``None``, existing bindings are removed.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> class MyTurtle(Turtle):
|
||||||
|
... def glow(self,x,y):
|
||||||
|
@@ -1426,7 +1373,6 @@ Using events
|
||||||
|
mouse-click event on that turtle.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.ondrag(turtle.goto)
|
||||||
|
|
||||||
|
@@ -1454,7 +1400,6 @@ Special Turtle methods
|
||||||
|
Return the last recorded polygon.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.home()
|
||||||
|
>>> turtle.begin_poly()
|
||||||
|
@@ -1474,7 +1419,6 @@ Special Turtle methods
|
||||||
|
turtle properties.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> mick = Turtle()
|
||||||
|
>>> joe = mick.clone()
|
||||||
|
@@ -1487,7 +1431,6 @@ Special Turtle methods
|
||||||
|
return the "anonymous turtle":
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> pet = getturtle()
|
||||||
|
>>> pet.fd(50)
|
||||||
|
@@ -1501,7 +1444,6 @@ Special Turtle methods
|
||||||
|
TurtleScreen methods can then be called for that object.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> ts = turtle.getscreen()
|
||||||
|
>>> ts
|
||||||
|
@@ -1519,7 +1461,6 @@ Special Turtle methods
|
||||||
|
``None``, the undobuffer is disabled.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> turtle.setundobuffer(42)
|
||||||
|
|
||||||
|
@@ -1529,7 +1470,6 @@ Special Turtle methods
|
||||||
|
Return number of entries in the undobuffer.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> while undobufferentries():
|
||||||
|
... undo()
|
||||||
|
@@ -1552,7 +1492,6 @@ below:
|
||||||
|
For example:
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> s = Shape("compound")
|
||||||
|
>>> poly1 = ((0,0),(10,-5),(0,10),(-10,-5))
|
||||||
|
@@ -1563,7 +1502,6 @@ below:
|
||||||
|
3. Now add the Shape to the Screen's shapelist and use it:
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> register_shape("myshape", s)
|
||||||
|
>>> shape("myshape")
|
||||||
|
@@ -1583,7 +1521,6 @@ Most of the examples in this section ref
|
||||||
|
``screen``.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
:hide:
|
||||||
|
|
||||||
|
>>> screen = Screen()
|
||||||
|
@@ -1600,7 +1537,6 @@ Window control
|
||||||
|
Set or return background color of the TurtleScreen.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> screen.bgcolor("orange")
|
||||||
|
>>> screen.bgcolor()
|
||||||
|
@@ -1686,7 +1622,6 @@ Window control
|
||||||
|
distorted.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> screen.reset()
|
||||||
|
>>> screen.setworldcoordinates(-50,-7.5,50,7.5)
|
||||||
|
@@ -1697,7 +1632,6 @@ Window control
|
||||||
|
... left(45); fd(2) # a regular octagon
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
:hide:
|
||||||
|
|
||||||
|
>>> screen.reset()
|
||||||
|
@@ -1719,7 +1653,6 @@ Animation control
|
||||||
|
Optional argument:
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> screen.delay()
|
||||||
|
10
|
||||||
|
@@ -1741,7 +1674,6 @@ Animation control
|
||||||
|
:func:`delay`).
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> screen.tracer(8, 25)
|
||||||
|
>>> dist = 2
|
||||||
|
@@ -1778,7 +1710,6 @@ Using screen events
|
||||||
|
must have the focus. (See method :func:`listen`.)
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> def f():
|
||||||
|
... fd(50)
|
||||||
|
@@ -1799,7 +1730,6 @@ Using screen events
|
||||||
|
must have focus. (See method :func:`listen`.)
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> def f():
|
||||||
|
... fd(50)
|
||||||
|
@@ -1824,7 +1754,6 @@ Using screen events
|
||||||
|
named ``turtle``:
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> screen.onclick(turtle.goto) # Subsequently clicking into the TurtleScreen will
|
||||||
|
>>> # make the turtle move to the clicked point.
|
||||||
|
@@ -1844,7 +1773,6 @@ Using screen events
|
||||||
|
Install a timer that calls *fun* after *t* milliseconds.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> running = True
|
||||||
|
>>> def f():
|
||||||
|
@@ -1926,7 +1854,6 @@ Settings and special methods
|
||||||
|
============ ========================= ===================
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> mode("logo") # resets turtle heading to north
|
||||||
|
>>> mode()
|
||||||
|
@@ -1941,7 +1868,6 @@ Settings and special methods
|
||||||
|
values of color triples have to be in the range 0..\ *cmode*.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> screen.colormode(1)
|
||||||
|
>>> turtle.pencolor(240, 160, 80)
|
||||||
|
@@ -1962,7 +1888,6 @@ Settings and special methods
|
||||||
|
do with a Tkinter Canvas.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> cv = screen.getcanvas()
|
||||||
|
>>> cv
|
||||||
|
@@ -1974,7 +1899,6 @@ Settings and special methods
|
||||||
|
Return a list of names of all currently available turtle shapes.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> screen.getshapes()
|
||||||
|
['arrow', 'blank', 'circle', ..., 'turtle']
|
||||||
|
@@ -1998,7 +1922,6 @@ Settings and special methods
|
||||||
|
coordinates: Install the corresponding polygon shape.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> screen.register_shape("triangle", ((5,-3), (0,5), (-5,-3)))
|
||||||
|
|
||||||
|
@@ -2014,7 +1937,6 @@ Settings and special methods
|
||||||
|
Return the list of turtles on the screen.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> for turtle in screen.turtles():
|
||||||
|
... turtle.color("red")
|
||||||
|
@@ -2076,7 +1998,6 @@ Methods specific to Screen, not inherite
|
||||||
|
center window vertically
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> screen.setup (width=200, height=200, startx=0, starty=0)
|
||||||
|
>>> # sets window to 200x200 pixels, in upper left of screen
|
||||||
|
@@ -2092,7 +2013,6 @@ Methods specific to Screen, not inherite
|
||||||
|
Set title of turtle window to *titlestring*.
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> screen.title("Welcome to the turtle zoo!")
|
||||||
|
|
||||||
|
@@ -2163,7 +2083,6 @@ Public classes
|
||||||
|
Example:
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
|
||||||
|
>>> poly = ((0,0),(10,-5),(0,10),(-10,-5))
|
||||||
|
>>> s = Shape("compound")
|
||||||
|
@@ -2510,7 +2429,6 @@ Changes since Python 3.0
|
||||||
|
|
||||||
|
|
||||||
|
.. doctest::
|
||||||
|
- :skipif: _tkinter is None
|
||||||
|
:hide:
|
||||||
|
|
||||||
|
>>> for turtle in turtles():
|
78
pre_checkin.sh
Normal file
78
pre_checkin.sh
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export LC_ALL=C
|
||||||
|
|
||||||
|
master=python*.spec
|
||||||
|
|
||||||
|
# create import_failed.map from package definitions
|
||||||
|
pkgname=$(grep python_pkg_name $master |grep define |awk -F' ' '{print $3}')
|
||||||
|
MAPFILE=import_failed.map
|
||||||
|
function new_map_line () {
|
||||||
|
package=$1
|
||||||
|
package=$(echo $1 |sed -e "s:%{python_pkg_name}:$pkgname:")
|
||||||
|
modules=$2
|
||||||
|
if [ -z "$package" -o -z "$modules" ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
if [[ "$package" =~ "-base" ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
echo "$package:$modules" >> $MAPFILE.tmp
|
||||||
|
}
|
||||||
|
|
||||||
|
for spec in *.spec; do
|
||||||
|
basename=${spec%.spec}
|
||||||
|
package=
|
||||||
|
modules=
|
||||||
|
while read line; do
|
||||||
|
case $line in
|
||||||
|
"%files -n "*)
|
||||||
|
new_map_line $package "$modules"
|
||||||
|
package=${line#"%files -n "}
|
||||||
|
modules=
|
||||||
|
;;
|
||||||
|
"%files "*)
|
||||||
|
new_map_line $package "$modules"
|
||||||
|
package=$basename-${line#"%files "}
|
||||||
|
modules=
|
||||||
|
;;
|
||||||
|
"%files")
|
||||||
|
new_map_line $package "$modules"
|
||||||
|
package=$basename
|
||||||
|
modules=
|
||||||
|
;;
|
||||||
|
"%{sitedir}/config-"*)
|
||||||
|
# ignore
|
||||||
|
;;
|
||||||
|
"%{sitedir}/"*)
|
||||||
|
word=${line#"%{sitedir}/"}
|
||||||
|
if ! echo $word | grep -q /; then
|
||||||
|
modules="$modules $word"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"%{dynlib "*"}")
|
||||||
|
word=${line#"%{dynlib "}
|
||||||
|
word=${word%"}"}
|
||||||
|
modules="$modules $word"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done < $spec
|
||||||
|
new_map_line $package "$modules"
|
||||||
|
done
|
||||||
|
|
||||||
|
cat $MAPFILE.tmp |sort -u > $MAPFILE
|
||||||
|
rm $MAPFILE.tmp
|
||||||
|
|
||||||
|
# run test inclusion check
|
||||||
|
tar xJf Python-*.xz
|
||||||
|
python3 skipped_tests.py
|
||||||
|
|
||||||
|
# generate baselibs.conf
|
||||||
|
VERSION=$(grep ^Version $master|awk -F':' '{print $2}' |sed -e 's/ //g')
|
||||||
|
python_version=${VERSION:0:3} # 3.3
|
||||||
|
python_version_abitag=${python_version//./} # 33
|
||||||
|
python_version_soname=${python_version//./_} # 3_3
|
||||||
|
echo "$pkgname-base" > baselibs.conf
|
||||||
|
echo "$pkgname" >> baselibs.conf
|
||||||
|
echo "libpython$python_version_soname-1_0" >> baselibs.conf
|
||||||
|
|
25
python-3.3.0b1-fix_date_time_compiler.patch
Normal file
25
python-3.3.0b1-fix_date_time_compiler.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
Makefile.pre.in | 7 +++++++
|
||||||
|
1 file changed, 7 insertions(+)
|
||||||
|
|
||||||
|
--- a/Makefile.pre.in
|
||||||
|
+++ b/Makefile.pre.in
|
||||||
|
@@ -785,11 +785,18 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
|
||||||
|
$(DTRACE_OBJS) \
|
||||||
|
$(srcdir)/Modules/getbuildinfo.c
|
||||||
|
$(CC) -c $(PY_CORE_CFLAGS) \
|
||||||
|
+ -DDATE="\"`date -u -r Makefile.pre.in +"%b %d %Y"`\"" \
|
||||||
|
+ -DTIME="\"`date -u -r Makefile.pre.in +"%T"`\"" \
|
||||||
|
-DGITVERSION="\"`LC_ALL=C $(GITVERSION)`\"" \
|
||||||
|
-DGITTAG="\"`LC_ALL=C $(GITTAG)`\"" \
|
||||||
|
-DGITBRANCH="\"`LC_ALL=C $(GITBRANCH)`\"" \
|
||||||
|
-o $@ $(srcdir)/Modules/getbuildinfo.c
|
||||||
|
|
||||||
|
+Python/getcompiler.o: $(srcdir)/Python/getcompiler.c Makefile
|
||||||
|
+ $(CC) -c $(PY_CORE_CFLAGS) \
|
||||||
|
+ -DCOMPILER='"[GCC]"' \
|
||||||
|
+ -o $@ $(srcdir)/Python/getcompiler.c
|
||||||
|
+
|
||||||
|
Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
|
||||||
|
$(CC) -c $(PY_CORE_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
|
||||||
|
-DPREFIX='"$(prefix)"' \
|
11
python-3.3.0b1-localpath.patch
Normal file
11
python-3.3.0b1-localpath.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/Lib/site.py
|
||||||
|
+++ b/Lib/site.py
|
||||||
|
@@ -76,7 +76,7 @@ import _sitebuiltins
|
||||||
|
import io
|
||||||
|
|
||||||
|
# Prefixes for site-packages; add additional prefixes like /usr/local here
|
||||||
|
-PREFIXES = [sys.prefix, sys.exec_prefix]
|
||||||
|
+PREFIXES = [sys.prefix, sys.exec_prefix, '/usr/local']
|
||||||
|
# Enable per user site-packages directory
|
||||||
|
# set it to False to disable the feature or True to force the feature
|
||||||
|
ENABLE_USER_SITE = None
|
15
python-3.3.0b1-test-posix_fadvise.patch
Normal file
15
python-3.3.0b1-test-posix_fadvise.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
Lib/test/test_posix.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/Lib/test/test_posix.py
|
||||||
|
+++ b/Lib/test/test_posix.py
|
||||||
|
@@ -424,7 +424,7 @@ class PosixTester(unittest.TestCase):
|
||||||
|
def test_posix_fadvise(self):
|
||||||
|
fd = os.open(os_helper.TESTFN, os.O_RDONLY)
|
||||||
|
try:
|
||||||
|
- posix.posix_fadvise(fd, 0, 0, posix.POSIX_FADV_WILLNEED)
|
||||||
|
+ posix.posix_fadvise(fd, 0, 0, posix.POSIX_FADV_RANDOM)
|
||||||
|
finally:
|
||||||
|
os.close(fd)
|
||||||
|
|
11542
python.keyring
Normal file
11542
python.keyring
Normal file
File diff suppressed because it is too large
Load Diff
52
python3-imp-returntype.patch
Normal file
52
python3-imp-returntype.patch
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
From 7bd6f0e5500f778e940374237b94651f60ae1990 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Miss Islington (bot)"
|
||||||
|
<31488909+miss-islington@users.noreply.github.com>
|
||||||
|
Date: Fri, 6 Jul 2018 21:00:45 -0700
|
||||||
|
Subject: [PATCH] closes bpo-34056: Always return bytes from
|
||||||
|
_HackedGetData.get_data(). (GH-8130)
|
||||||
|
|
||||||
|
* Always return bytes from _HackedGetData.get_data().
|
||||||
|
|
||||||
|
Ensure the imp.load_source shim always returns bytes by reopening the file in
|
||||||
|
binary mode if needed. Hash-based pycs have to receive the source code in bytes.
|
||||||
|
|
||||||
|
It's tempting to change imp.get_suffixes() to always return 'rb' as a mode, but
|
||||||
|
that breaks some stdlib tests and likely 3rdparty code, too.
|
||||||
|
(cherry picked from commit b0274f2cddd36b49fe5080efbe160277ef546471)
|
||||||
|
|
||||||
|
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
||||||
|
---
|
||||||
|
Lib/test/test_imp.py | 14 ++++++++++
|
||||||
|
Misc/NEWS.d/next/Library/2018-07-05-22-45-46.bpo-34056.86isrU.rst | 3 ++
|
||||||
|
2 files changed, 17 insertions(+)
|
||||||
|
create mode 100644 Misc/NEWS.d/next/Library/2018-07-05-22-45-46.bpo-34056.86isrU.rst
|
||||||
|
|
||||||
|
--- a/Lib/test/test_imp.py
|
||||||
|
+++ b/Lib/test/test_imp.py
|
||||||
|
@@ -378,6 +378,20 @@ class ImportTests(unittest.TestCase):
|
||||||
|
mod = imp.load_module('mymod', file, path, description)
|
||||||
|
self.assertEqual(mod.x, 42)
|
||||||
|
|
||||||
|
+ def test_find_and_load_checked_pyc(self):
|
||||||
|
+ # issue 34056
|
||||||
|
+ with support.temp_cwd():
|
||||||
|
+ with open('mymod.py', 'wb') as fp:
|
||||||
|
+ fp.write(b'x = 42\n')
|
||||||
|
+ py_compile.compile(
|
||||||
|
+ 'mymod.py',
|
||||||
|
+ doraise=True,
|
||||||
|
+ invalidation_mode=py_compile.PycInvalidationMode.CHECKED_HASH,
|
||||||
|
+ )
|
||||||
|
+ file, path, description = imp.find_module('mymod', path=['.'])
|
||||||
|
+ mod = imp.load_module('mymod', file, path, description)
|
||||||
|
+ self.assertEqual(mod.x, 42)
|
||||||
|
+
|
||||||
|
|
||||||
|
class ReloadTests(unittest.TestCase):
|
||||||
|
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/Misc/NEWS.d/next/Library/2018-07-05-22-45-46.bpo-34056.86isrU.rst
|
||||||
|
@@ -0,0 +1,3 @@
|
||||||
|
+Ensure the loader shim created by ``imp.load_module`` always returns bytes
|
||||||
|
+from its ``get_data()`` function. This fixes using ``imp.load_module`` with
|
||||||
|
+:pep:`552` hash-based pycs.
|
2541
python3a.changes
Normal file
2541
python3a.changes
Normal file
File diff suppressed because it is too large
Load Diff
954
python3a.spec
Normal file
954
python3a.spec
Normal file
@ -0,0 +1,954 @@
|
|||||||
|
#
|
||||||
|
# spec file
|
||||||
|
#
|
||||||
|
# Copyright (c) 2021 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%{flavor}" == "doc"
|
||||||
|
%define psuffix -documentation
|
||||||
|
%bcond_without doc
|
||||||
|
%bcond_with base
|
||||||
|
%bcond_with general
|
||||||
|
%endif
|
||||||
|
%if "%{flavor}" == "base"
|
||||||
|
%define psuffix -core
|
||||||
|
%bcond_with doc
|
||||||
|
%bcond_without base
|
||||||
|
%bcond_with general
|
||||||
|
%endif
|
||||||
|
%if "%{flavor}" == ""
|
||||||
|
%define psuffix %{nil}
|
||||||
|
%bcond_with doc
|
||||||
|
%bcond_with base
|
||||||
|
%bcond_without general
|
||||||
|
%endif
|
||||||
|
%define _version %(c=%{version}; echo ${c/[a-z]*/})
|
||||||
|
%define tar_suffix %(c=%{_version}; echo ${c#%{_version}})
|
||||||
|
%define python_version %(echo %{_version}|cut -d. -f1-2)
|
||||||
|
# based on the current source tarball
|
||||||
|
%define python_version_abitag %(c=%{python_version}; echo ${c//./})
|
||||||
|
# FIXME %%define python_version_soname %%(c=%%{python_version}; echo ${c//./_})
|
||||||
|
%define python_version_soname 3_10
|
||||||
|
%if 0%(test -n "%{tar_suffix}" && echo 1)
|
||||||
|
%define _version %(echo "%{_version}~%{tar_suffix}")
|
||||||
|
%define tarversion %{version}
|
||||||
|
%else
|
||||||
|
%define tarversion %{version}
|
||||||
|
%endif
|
||||||
|
%define python_pkg_name python3a
|
||||||
|
# Will provide the python3-* provides
|
||||||
|
# Will do the /usr/bin/python3 and all the core links
|
||||||
|
%define primary_interpreter 0
|
||||||
|
# We don't process beta signs well
|
||||||
|
%define folderversion 3.10.0
|
||||||
|
%define tarname Python-%{tarversion}
|
||||||
|
%define sitedir %{_libdir}/python%{python_version}
|
||||||
|
# three possible ABI kinds: m - pymalloc, d - debug build; see PEP 3149
|
||||||
|
%define abi_kind %{nil}
|
||||||
|
# python ABI version - used in some file names
|
||||||
|
%define python_abi %{python_version}%{abi_kind}
|
||||||
|
# soname ABI tag defined in PEP 3149
|
||||||
|
%define abi_tag %{python_version_abitag}%{abi_kind}
|
||||||
|
# version part of "libpython" package
|
||||||
|
%define so_major 1
|
||||||
|
%define so_minor 0
|
||||||
|
%define so_version %{python_version_soname}%{abi_kind}-%{so_major}_%{so_minor}
|
||||||
|
# rpm and python have different ideas about what is an arch-dependent name, so:
|
||||||
|
%if "%{__isa_name}" == "ppc"
|
||||||
|
%define archname %(echo %{_arch} | sed s/ppc/powerpc/)
|
||||||
|
%else
|
||||||
|
%define archname %{_arch}
|
||||||
|
%endif
|
||||||
|
# our arm has Hardware-Floatingpoint
|
||||||
|
%if "%{_arch}" == "arm"
|
||||||
|
%define armsuffix hf
|
||||||
|
%endif
|
||||||
|
# pyexpat.cpython-35m-x86_64-linux-gnu
|
||||||
|
# pyexpat.cpython-35m-powerpc64le-linux-gnu
|
||||||
|
# pyexpat.cpython-35m-armv7-linux-gnueabihf
|
||||||
|
# _md5.cpython-38m-x86_64-linux-gnu.so
|
||||||
|
%define dynlib() %{sitedir}/lib-dynload/%{1}.cpython-%{abi_tag}-%{archname}-%{_os}%{?_gnu}%{?armsuffix}.so
|
||||||
|
# deadlocks on test_faulthandler and blocks the build
|
||||||
|
%if 0%{?qemu_user_space_build}
|
||||||
|
%bcond_with profileopt
|
||||||
|
%else
|
||||||
|
%bcond_without profileopt
|
||||||
|
%endif
|
||||||
|
Name: %{python_pkg_name}%{psuffix}
|
||||||
|
Version: 3.10.0b2
|
||||||
|
Release: 0
|
||||||
|
Summary: Python 3 Interpreter
|
||||||
|
License: Python-2.0
|
||||||
|
URL: https://www.python.org/
|
||||||
|
Source0: http://www.python.org/ftp/python/%{folderversion}/%{tarname}.tar.xz
|
||||||
|
Source1: http://www.python.org/ftp/python/%{folderversion}/%{tarname}.tar.xz.asc
|
||||||
|
Source2: baselibs.conf
|
||||||
|
Source3: README.SUSE
|
||||||
|
Source7: macros.python3
|
||||||
|
Source8: import_failed.py
|
||||||
|
Source9: import_failed.map
|
||||||
|
Source10: pre_checkin.sh
|
||||||
|
Source11: skipped_tests.py
|
||||||
|
Source19: idle3.desktop
|
||||||
|
Source20: idle3.appdata.xml
|
||||||
|
# content of bluez-devel:
|
||||||
|
# 1. sudo zypper --pkg-cache-dir /tmp install -f -d --no-recommends bluez-devel
|
||||||
|
# 2. rpm2cpio /tmp/*/*/bluez-devel-*.rpm|cpio -idu
|
||||||
|
# 3. mkdir Vendor && mv usr/include/* Vendor/
|
||||||
|
# 4. tar cJf bluez-devel-vendor.tar.xz Vendor/
|
||||||
|
Source21: bluez-devel-vendor.tar.xz
|
||||||
|
Source99: https://www.python.org/static/files/pubkeys.txt#/python.keyring
|
||||||
|
# The following files are not used in the build.
|
||||||
|
# They are listed here to work around missing functionality in rpmbuild,
|
||||||
|
# which would otherwise exclude them from distributed src.rpm files.
|
||||||
|
Source100: PACKAGING-NOTES
|
||||||
|
# PATCH-FEATURE-UPSTREAM F00251-change-user-install-location.patch bsc#[0-9]+ mcepl@suse.com
|
||||||
|
# Fix installation in /usr/local (boo#1071941), originally from Fedora
|
||||||
|
# https://src.fedoraproject.org/rpms/python3/blob/master/f/00251-change-user-install-location.patch
|
||||||
|
# Set values of prefix and exec_prefix in distutils install command
|
||||||
|
# to /usr/local if executable is /usr/bin/python* and RPM build
|
||||||
|
# is not detected to make pip and distutils install into separate location
|
||||||
|
Patch02: F00251-change-user-install-location.patch
|
||||||
|
# PATCH-FEATURE-UPSTREAM distutils-reproducible-compile.patch gh#python/cpython#8057 mcepl@suse.com
|
||||||
|
# Improve reproduceability
|
||||||
|
Patch06: distutils-reproducible-compile.patch
|
||||||
|
# support finding packages in /usr/local, install to /usr/local by default
|
||||||
|
Patch07: python-3.3.0b1-localpath.patch
|
||||||
|
# replace DATE, TIME and COMPILER by fixed definitions to aid reproducible builds
|
||||||
|
Patch08: python-3.3.0b1-fix_date_time_compiler.patch
|
||||||
|
# POSIX_FADV_WILLNEED throws EINVAL. Use a different constant in test
|
||||||
|
Patch09: python-3.3.0b1-test-posix_fadvise.patch
|
||||||
|
# Raise timeout value for test_subprocess
|
||||||
|
Patch15: subprocess-raise-timeout.patch
|
||||||
|
Patch25: python3-imp-returntype.patch
|
||||||
|
# PATCH-FEATURE-UPSTREAM bpo-31046_ensurepip_honours_prefix.patch bpo#31046 mcepl@suse.com
|
||||||
|
# ensurepip should honour the value of $(prefix)
|
||||||
|
Patch29: bpo-31046_ensurepip_honours_prefix.patch
|
||||||
|
# PATCH-FIX-SLE no-skipif-doctests.patch jsc#SLE-13738 mcepl@suse.com
|
||||||
|
# SLE-15 version of Sphinx doesn't know about skipif directive in doctests.
|
||||||
|
Patch33: no-skipif-doctests.patch
|
||||||
|
# PATCH-FIX-SLE skip-test_pyobject_freed_is_freed.patch mcepl@suse.com
|
||||||
|
# skip a test failing on SLE-15
|
||||||
|
Patch34: skip-test_pyobject_freed_is_freed.patch
|
||||||
|
BuildRequires: autoconf-archive
|
||||||
|
BuildRequires: automake
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: gmp-devel
|
||||||
|
BuildRequires: lzma-devel
|
||||||
|
BuildRequires: netcfg
|
||||||
|
BuildRequires: openssl-devel
|
||||||
|
BuildRequires: pkgconfig
|
||||||
|
BuildRequires: xz
|
||||||
|
BuildRequires: pkgconfig(bzip2)
|
||||||
|
BuildRequires: pkgconfig(expat)
|
||||||
|
BuildRequires: pkgconfig(libffi)
|
||||||
|
BuildRequires: pkgconfig(uuid)
|
||||||
|
BuildRequires: pkgconfig(zlib)
|
||||||
|
#!BuildIgnore: gdk-pixbuf-loader-rsvg
|
||||||
|
%if 0%{?suse_version} >= 1500
|
||||||
|
BuildRequires: pkgconfig(libnsl)
|
||||||
|
BuildRequires: pkgconfig(libtirpc)
|
||||||
|
%endif
|
||||||
|
%if %{with doc}
|
||||||
|
BuildRequires: python3-Sphinx
|
||||||
|
%if 0%{?suse_version} >= 1500
|
||||||
|
BuildRequires: python3-python-docs-theme
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
%if %{with general}
|
||||||
|
# required for idle3 (.desktop and .appdata.xml files)
|
||||||
|
BuildRequires: appstream-glib
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: gdbm-devel
|
||||||
|
BuildRequires: gettext
|
||||||
|
BuildRequires: readline-devel
|
||||||
|
BuildRequires: sqlite-devel
|
||||||
|
BuildRequires: timezone
|
||||||
|
BuildRequires: update-desktop-files
|
||||||
|
BuildRequires: pkgconfig(ncurses)
|
||||||
|
BuildRequires: pkgconfig(tk)
|
||||||
|
BuildRequires: pkgconfig(x11)
|
||||||
|
Requires: %{python_pkg_name}-base = %{version}
|
||||||
|
Recommends: %{python_pkg_name}-curses
|
||||||
|
Recommends: %{python_pkg_name}-dbm
|
||||||
|
Recommends: %{python_pkg_name}-pip
|
||||||
|
%if %{primary_interpreter}
|
||||||
|
Provides: python3 = %{python_version}
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description
|
||||||
|
Python 3 is modern interpreted, object-oriented programming language,
|
||||||
|
often compared to Tcl, Perl, Scheme, or Java. You can find an overview
|
||||||
|
of Python in the documentation and tutorials included in the python3-doc
|
||||||
|
package.
|
||||||
|
|
||||||
|
This package supplies rich command line features provided by readline,
|
||||||
|
and sqlite3 support for the interpreter core, thus forming a so called
|
||||||
|
"extended" runtime.
|
||||||
|
Installing "python3" is sufficient for the vast majority of usecases.
|
||||||
|
In addition, recommended packages provide UI toolkit support (python3-curses,
|
||||||
|
python3-tk), legacy UNIX database bindings (python3-dbm), and the IDLE
|
||||||
|
development environment (python3-idle).
|
||||||
|
|
||||||
|
%package -n %{python_pkg_name}-tk
|
||||||
|
Summary: TkInter, a Python Tk Interface
|
||||||
|
Requires: %{python_pkg_name} = %{version}
|
||||||
|
%if %{primary_interpreter}
|
||||||
|
Provides: python3-tk = %{version}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description -n %{python_pkg_name}-tk
|
||||||
|
Python interface to Tk. Tk is the GUI toolkit that comes with Tcl.
|
||||||
|
|
||||||
|
%package -n %{python_pkg_name}-curses
|
||||||
|
Summary: Python Interface to the (N)Curses Library
|
||||||
|
Requires: %{python_pkg_name} = %{version}
|
||||||
|
%if %{primary_interpreter}
|
||||||
|
Provides: python3-curses
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description -n %{python_pkg_name}-curses
|
||||||
|
An easy to use interface to the (n)curses CUI library. CUI stands for
|
||||||
|
Console User Interface.
|
||||||
|
|
||||||
|
%package -n %{python_pkg_name}-dbm
|
||||||
|
Summary: Python Interface to the GDBM Library
|
||||||
|
Requires: %{python_pkg_name} = %{version}
|
||||||
|
%if %{primary_interpreter}
|
||||||
|
Provides: python3-dbm
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description -n %{python_pkg_name}-dbm
|
||||||
|
An easy to use interface for Unix DBM databases, and more specifically,
|
||||||
|
the GNU implementation GDBM.
|
||||||
|
|
||||||
|
%package -n %{python_pkg_name}-idle
|
||||||
|
Summary: An Integrated Development Environment for Python
|
||||||
|
Requires: %{python_pkg_name} = %{version}
|
||||||
|
Requires: %{python_pkg_name}-tk
|
||||||
|
%if %{primary_interpreter}
|
||||||
|
Provides: python3-idle = %{version}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description -n %{python_pkg_name}-idle
|
||||||
|
IDLE is a Tkinter based integrated development environment for Python.
|
||||||
|
It features a multi-window text editor with multiple undo, Python
|
||||||
|
colorizing, and many other things, as well as a Python shell window and
|
||||||
|
a debugger.
|
||||||
|
|
||||||
|
%package -n %{python_pkg_name}-doc
|
||||||
|
Summary: Package Documentation for Python 3
|
||||||
|
Enhances: %{python_pkg_name} = %{python_version}
|
||||||
|
%if %{primary_interpreter}
|
||||||
|
Provides: python3-doc = %{version}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description -n %{python_pkg_name}-doc
|
||||||
|
Tutorial, Global Module Index, Language Reference, Library Reference,
|
||||||
|
Extending and Embedding Reference, Python/C API Reference, Documenting
|
||||||
|
Python, and Macintosh Module Reference in HTML format.
|
||||||
|
|
||||||
|
%package -n %{python_pkg_name}-doc-devhelp
|
||||||
|
Summary: Additional Package Documentation for Python 3 in devhelp format
|
||||||
|
%if %{primary_interpreter}
|
||||||
|
Provides: python3-doc-devhelp = %{version}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description -n %{python_pkg_name}-doc-devhelp
|
||||||
|
Tutorial, Global Module Index, Language Reference, Library Reference,
|
||||||
|
Extending and Embedding Reference, Python/C API Reference, Documenting
|
||||||
|
Python, and Macintosh Module Reference in format for devhelp.
|
||||||
|
|
||||||
|
%package -n %{python_pkg_name}-base
|
||||||
|
Summary: Python 3 Interpreter and Stdlib Core
|
||||||
|
Requires: libpython%{so_version} = %{version}
|
||||||
|
Recommends: %{python_pkg_name} = %{version}
|
||||||
|
#Recommends: python3-ensurepip
|
||||||
|
# python 3.1 didn't have a separate python-base, so it is wrongly
|
||||||
|
# not a conflict to have python3-3.1 and python3-base > 3.1
|
||||||
|
Obsoletes: python3 < 3.2
|
||||||
|
# no Provides, because python3 is obviously provided by package python3
|
||||||
|
# python 3.4 provides asyncio
|
||||||
|
Provides: %{python_pkg_name}-asyncio = %{version}
|
||||||
|
# python 3.6 provides typing
|
||||||
|
Provides: %{python_pkg_name}-typing = %{version}
|
||||||
|
# python3-xml was merged into python3, now moved into -base
|
||||||
|
Provides: %{python_pkg_name}-xml = %{version}
|
||||||
|
%if %{primary_interpreter}
|
||||||
|
Provides: python3-asyncio = %{version}
|
||||||
|
Obsoletes: python3-asyncio < %{version}
|
||||||
|
Provides: python3-base = %{version}
|
||||||
|
Obsoletes: python3-base < %{version}
|
||||||
|
Provides: python3-typing = %{version}
|
||||||
|
Obsoletes: python3-typing < %{version}
|
||||||
|
Provides: python3-xml = %{version}
|
||||||
|
Obsoletes: python3-xml < %{version}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description -n %{python_pkg_name}-base
|
||||||
|
Python is an interpreted, object-oriented programming language, and is
|
||||||
|
often compared to Tcl, Perl, Scheme, or Java. You can find an overview
|
||||||
|
of Python in the documentation and tutorials included in the python-doc
|
||||||
|
package.
|
||||||
|
|
||||||
|
This package contains the interpreter core and most commonly used modules
|
||||||
|
from the standard library. This is sufficient for many usecases, but it
|
||||||
|
excludes components that depend on external libraries, most notably XML,
|
||||||
|
database and UI toolkits support.
|
||||||
|
|
||||||
|
%package -n %{python_pkg_name}-tools
|
||||||
|
Summary: Python Utility and Demonstration Scripts
|
||||||
|
Requires: %{python_pkg_name}-base = %{version}
|
||||||
|
Provides: %{python_pkg_name}-2to3 = %{version}
|
||||||
|
Provides: %{python_pkg_name}-demo = %{version}
|
||||||
|
%if %{primary_interpreter}
|
||||||
|
Provides: python3-2to3 = %{version}
|
||||||
|
Provides: python3-demo = %{version}
|
||||||
|
Provides: python3-tools = %{version}
|
||||||
|
Obsoletes: python3-2to3 < %{version}
|
||||||
|
Obsoletes: python3-demo < %{version}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description -n %{python_pkg_name}-tools
|
||||||
|
A number of scripts that are useful for building, testing or extending Python,
|
||||||
|
and a set of demonstration programs.
|
||||||
|
|
||||||
|
%package -n %{python_pkg_name}-devel
|
||||||
|
Summary: Include Files and Libraries Mandatory for Building Python Modules
|
||||||
|
Requires: %{python_pkg_name}-base = %{version}
|
||||||
|
%if %{primary_interpreter}
|
||||||
|
Provides: python3-devel = %{version}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description -n %{python_pkg_name}-devel
|
||||||
|
The Python programming language's interpreter can be extended with
|
||||||
|
dynamically loaded extensions and can be embedded in other programs.
|
||||||
|
|
||||||
|
This package contains header files, a static library, and development
|
||||||
|
tools for building Python modules, extending the Python interpreter or
|
||||||
|
embedding Python in applications.
|
||||||
|
|
||||||
|
This also includes the Python distutils, which were in the Python
|
||||||
|
package up to version 2.2.2.
|
||||||
|
|
||||||
|
%package -n %{python_pkg_name}-testsuite
|
||||||
|
Summary: Unit tests for Python and its standard library
|
||||||
|
Requires: %{python_pkg_name} = %{version}
|
||||||
|
Requires: %{python_pkg_name}-tk = %{version}
|
||||||
|
%if %{primary_interpreter}
|
||||||
|
Provides: python3-testsuite = %{version}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description -n %{python_pkg_name}-testsuite
|
||||||
|
Unit tests that are useful for verifying integrity and functionality
|
||||||
|
of the installed Python interpreter and standard library.
|
||||||
|
They are a documented part of stdlib, as a module 'test'.
|
||||||
|
|
||||||
|
%package -n libpython%{so_version}
|
||||||
|
Summary: Python Interpreter shared library
|
||||||
|
Requires: %{python_pkg_name}-base >= %{version}
|
||||||
|
|
||||||
|
%description -n libpython%{so_version}
|
||||||
|
Python is an interpreted, object-oriented programming language, and is
|
||||||
|
often compared to Tcl, Perl, Scheme, or Java. You can find an overview
|
||||||
|
of Python in the documentation and tutorials included in the python-doc
|
||||||
|
(HTML) or python-doc-pdf (PDF) packages.
|
||||||
|
|
||||||
|
This package contains libpython3.2 shared library for embedding in
|
||||||
|
other applications.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{tarname}
|
||||||
|
%patch02 -p1
|
||||||
|
|
||||||
|
%patch06 -p1
|
||||||
|
%patch07 -p1
|
||||||
|
%patch08 -p1
|
||||||
|
%patch09 -p1
|
||||||
|
%patch15 -p1
|
||||||
|
%patch25 -p1
|
||||||
|
%patch29 -p1
|
||||||
|
%if 0%{?suse_version} <= 1500
|
||||||
|
%patch33 -p1
|
||||||
|
%endif
|
||||||
|
%if 0%{?sle_version} && 0%{?sle_version} <= 150300
|
||||||
|
%patch34 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# drop Autoconf version requirement
|
||||||
|
sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac
|
||||||
|
|
||||||
|
# fix shebangs - convert /usr/local/bin/python and /usr/bin/env/python to /usr/bin/python3
|
||||||
|
for dir in Lib Tools; do
|
||||||
|
# find *.py, filter to files that contain bad shebangs
|
||||||
|
# break up "/""usr" like this to prevent replacing with %%{_prefix}
|
||||||
|
find $dir -name '*.py' -type f -print0 \
|
||||||
|
| xargs -0 grep -lE '^#! *(/''usr/.*bin/(env +)?)?python' \
|
||||||
|
| xargs sed -r -i -e '1s@^#![[:space:]]*(/''usr/(local/)?bin/(env +)?)?python([0-9]+(\.[0-9]+)?)?@#!%{_bindir}/python3@'
|
||||||
|
done
|
||||||
|
|
||||||
|
# drop in-tree libffi and expat
|
||||||
|
rm -r Modules/_ctypes/libffi* Modules/_ctypes/darwin
|
||||||
|
rm -r Modules/expat
|
||||||
|
|
||||||
|
# drop duplicate README from site-packages
|
||||||
|
rm Lib/site-packages/README.txt
|
||||||
|
|
||||||
|
# Add vendored bluez-devel files
|
||||||
|
tar xvf %{SOURCE21}
|
||||||
|
|
||||||
|
%build
|
||||||
|
%if %{with doc}
|
||||||
|
TODAY_DATE=`date -r %{SOURCE0} "+%%B %%d, %%Y"`
|
||||||
|
# TODO use not date of tarball but date of latest patch
|
||||||
|
|
||||||
|
cd Doc
|
||||||
|
sed -i "s/^today = .*/today = '$TODAY_DATE'/" conf.py
|
||||||
|
%make_build -j1 html
|
||||||
|
|
||||||
|
# Build also devhelp files
|
||||||
|
sphinx-build -a -b devhelp . build/devhelp
|
||||||
|
rm -rfv build/devhelp/.doctrees
|
||||||
|
%else
|
||||||
|
%define _lto_cflags %{nil}
|
||||||
|
# use rpm_opt_flags
|
||||||
|
export OPT="%{optflags} -DOPENSSL_LOAD_CONF -fwrapv $(pkg-config --cflags-only-I libffi) -fno-semantic-interposition"
|
||||||
|
|
||||||
|
touch -r %{SOURCE0} Makefile.pre.in
|
||||||
|
|
||||||
|
autoreconf -fvi
|
||||||
|
|
||||||
|
%if 0%{?sles_version}
|
||||||
|
sed -e 's/-fprofile-correction//' -i Makefile.pre.in
|
||||||
|
%endif
|
||||||
|
|
||||||
|
export CFLAGS="%{optflags} -IVendor/"
|
||||||
|
|
||||||
|
%configure \
|
||||||
|
--with-platlibdir=%{_lib} \
|
||||||
|
--docdir=%{_docdir}/python \
|
||||||
|
--enable-ipv6 \
|
||||||
|
--enable-shared \
|
||||||
|
--with-ensurepip=no \
|
||||||
|
--with-system-ffi \
|
||||||
|
--with-system-expat \
|
||||||
|
--with-lto \
|
||||||
|
%if %{with profileopt}
|
||||||
|
--enable-optimizations \
|
||||||
|
%endif
|
||||||
|
--enable-loadable-sqlite-extensions
|
||||||
|
|
||||||
|
# prevent make from trying to rebuild PYTHON_FOR_GEN stuff
|
||||||
|
# %%make_build -t Python/Python-ast.c \
|
||||||
|
# Include/Python-ast.h \
|
||||||
|
# Objects/typeslots.inc \
|
||||||
|
# Python/opcode_targets.h \
|
||||||
|
# Include/opcode.h
|
||||||
|
%make_build
|
||||||
|
|
||||||
|
%if %{with general}
|
||||||
|
%make_build
|
||||||
|
%endif
|
||||||
|
%if %{with base}
|
||||||
|
%if %{with profileopt}
|
||||||
|
target=profile-opt
|
||||||
|
%else
|
||||||
|
target=all
|
||||||
|
%endif
|
||||||
|
LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH \
|
||||||
|
%make_build $target
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%check
|
||||||
|
%if %{with general}
|
||||||
|
# exclude test_gdb -- it doesn't run in buildservice anyway, and fails on missing debuginfos
|
||||||
|
# when you install gdb into your test env
|
||||||
|
EXCLUDE="test_gdb"
|
||||||
|
# we patch out the message to recommend zypper in and thus this would fail
|
||||||
|
EXCLUDE="$EXCLUDE test_pydoc"
|
||||||
|
|
||||||
|
%ifarch %{arm} s390x
|
||||||
|
# test_multiprocessing_forkserver is racy
|
||||||
|
EXCLUDE="$EXCLUDE test_multiprocessing_forkserver"
|
||||||
|
%endif
|
||||||
|
%ifarch ppc ppc64 ppc64le
|
||||||
|
# exclue test_faulthandler due to bnc#831629
|
||||||
|
EXCLUDE="$EXCLUDE test_faulthandler"
|
||||||
|
%endif
|
||||||
|
# some tests break in QEMU
|
||||||
|
%if 0%{?qemu_user_space_build}
|
||||||
|
EXCLUDE="$EXCLUDE test_multiprocessing_forkserver test_multiprocessing_spawn test_os test_posix test_signal test_socket test_subprocess"
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# This test (part of test_uuid) requires real network interfaces
|
||||||
|
# so that ifconfig output has "HWaddr <something>". Some kvm instances
|
||||||
|
# done have any such interface breaking the uuid module.
|
||||||
|
EXCLUDE="$EXCLUDE test_uuid"
|
||||||
|
|
||||||
|
# Limit virtual memory to avoid spurious failures
|
||||||
|
if test $(ulimit -v) = unlimited || test $(ulimit -v) -gt 10000000; then
|
||||||
|
ulimit -v 10000000 || :
|
||||||
|
fi
|
||||||
|
|
||||||
|
export PYTHONPATH="$(pwd -P)/Lib"
|
||||||
|
# Use timeout, like make target buildbottest
|
||||||
|
# We cannot run tests parallel, because osc build environment doesn’t
|
||||||
|
# have /dev/shm
|
||||||
|
%make_build -j1 test TESTOPTS="-u curses -v -x $EXCLUDE --timeout=3000"
|
||||||
|
# use network, be verbose:
|
||||||
|
#make test TESTOPTS="-l -u network -v"
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%install
|
||||||
|
%if %{with doc}
|
||||||
|
export PDOCS=%{buildroot}%{_docdir}/python%{python_version}
|
||||||
|
mkdir -p $PDOCS
|
||||||
|
# generated docs
|
||||||
|
rm Doc/build/*/.buildinfo
|
||||||
|
cp -r Doc/build/html $PDOCS
|
||||||
|
# misc
|
||||||
|
install -d -m 755 $PDOCS/Misc
|
||||||
|
rm Misc/README.AIX
|
||||||
|
for i in Misc/* ; do
|
||||||
|
[ -f $i ] && install -c -m 644 $i $PDOCS/Misc/
|
||||||
|
done
|
||||||
|
# devhelp
|
||||||
|
mkdir -p %{buildroot}%{_datadir}/gtk-doc/html
|
||||||
|
cp -r Doc/build/devhelp %{buildroot}%{_datadir}/gtk-doc/html/Python%{python_version}
|
||||||
|
rm -rf %{buildroot}%{_datadir}/gtk-doc/html/Python%{python_version}/.doctrees
|
||||||
|
%endif
|
||||||
|
%if %{with general}
|
||||||
|
%make_install
|
||||||
|
|
||||||
|
# clean out stuff that is in python-base and subpackages
|
||||||
|
|
||||||
|
find %{buildroot}%{_bindir} -mindepth 1 -not -name "*idle3*" -print -delete
|
||||||
|
rm %{buildroot}%{_libdir}/lib*
|
||||||
|
rm -r %{buildroot}%{_libdir}/pkgconfig
|
||||||
|
rm -r %{buildroot}%{_mandir}/*
|
||||||
|
rm -r %{buildroot}%{_includedir}/*
|
||||||
|
|
||||||
|
rm -r %{buildroot}%{sitedir}/config*
|
||||||
|
find %{buildroot}%{sitedir} -name "*.egg-info" -delete
|
||||||
|
rm -r %{buildroot}%{sitedir}/__pycache__
|
||||||
|
rm -r %{buildroot}%{sitedir}/site-packages
|
||||||
|
rm %{buildroot}%{sitedir}/*.*
|
||||||
|
|
||||||
|
for module in \
|
||||||
|
asyncio ctypes collections concurrent distutils email encodings \
|
||||||
|
ensurepip html http \
|
||||||
|
importlib json logging multiprocessing pydoc_data unittest \
|
||||||
|
urllib venv wsgiref lib2to3 test turtledemo \
|
||||||
|
xml xmlrpc zoneinfo
|
||||||
|
do
|
||||||
|
rm -r %{buildroot}%{sitedir}/$module
|
||||||
|
done
|
||||||
|
|
||||||
|
for library in \
|
||||||
|
array _asyncio audioop binascii _bisect _bz2 cmath _codecs_* \
|
||||||
|
_contextvars _crypt _csv _ctypes _datetime _decimal fcntl grp \
|
||||||
|
_hashlib _heapq _json _lsprof _lzma math mmap _multibytecodec \
|
||||||
|
_multiprocessing _opcode ossaudiodev _pickle _posixshmem \
|
||||||
|
_posixsubprocess _queue _random resource select _ssl _socket spwd \
|
||||||
|
_statistics _struct syslog termios _testbuffer _testimportmultiple \
|
||||||
|
_testmultiphase unicodedata zlib _ctypes_test _testinternalcapi _testcapi xxlimited \
|
||||||
|
_xxtestfuzz _xxsubinterpreters _elementtree pyexpat _md5 _sha1 \
|
||||||
|
_sha256 _sha512 _blake2 _sha3 _uuid _zoneinfo
|
||||||
|
do
|
||||||
|
eval rm "%{buildroot}%{sitedir}/lib-dynload/$library.*"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Idle is not packaged in base due to the appstream-glib dependency
|
||||||
|
# move idle config into /etc
|
||||||
|
install -d -m 755 %{buildroot}%{_sysconfdir}/idle%{python_version}
|
||||||
|
(
|
||||||
|
cd %{buildroot}/%{sitedir}/idlelib/
|
||||||
|
for file in *.def ; do
|
||||||
|
mv $file %{buildroot}%{_sysconfdir}/idle%{python_version}/
|
||||||
|
ln -sf %{_sysconfdir}/idle%{python_version}/$file %{buildroot}/%{sitedir}/idlelib/
|
||||||
|
done
|
||||||
|
)
|
||||||
|
|
||||||
|
# keep just idle3.X
|
||||||
|
rm %{buildroot}%{_bindir}/idle3
|
||||||
|
|
||||||
|
# install idle icons
|
||||||
|
for size in 16 32 48 ; do
|
||||||
|
install -m 644 -D Lib/idlelib/Icons/idle_${size}.png \
|
||||||
|
%{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps/idle%{python_version}.png
|
||||||
|
done
|
||||||
|
|
||||||
|
# install idle desktop file
|
||||||
|
cp %{SOURCE19} idle%{python_version}.desktop
|
||||||
|
sed -i -e 's:idle3:idle%{python_version}:g' idle%{python_version}.desktop
|
||||||
|
install -m 644 -D -t %{buildroot}%{_datadir}/applications idle%{python_version}.desktop
|
||||||
|
%suse_update_desktop_file idle%{python_version}
|
||||||
|
|
||||||
|
cp %{SOURCE20} idle%{python_version}.appdata.xml
|
||||||
|
sed -i -e 's:idle3.desktop:idle%{python_version}.desktop:g' idle%{python_version}.appdata.xml
|
||||||
|
install -m 644 -D -t %{buildroot}%{_datadir}/metainfo idle%{python_version}.appdata.xml
|
||||||
|
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/idle%{python_version}.appdata.xml
|
||||||
|
|
||||||
|
%fdupes %{buildroot}/%{_libdir}/python%{python_version}
|
||||||
|
%endif
|
||||||
|
%if %{with base}
|
||||||
|
%make_install
|
||||||
|
|
||||||
|
# remove .a
|
||||||
|
find %{buildroot} -name "*.a" -delete
|
||||||
|
|
||||||
|
# install "site-packages" and __pycache__ for third parties
|
||||||
|
install -d -m 755 %{buildroot}%{sitedir}/site-packages
|
||||||
|
install -d -m 755 %{buildroot}%{sitedir}/site-packages/__pycache__
|
||||||
|
# and their 32bit counterparts explicitly
|
||||||
|
mkdir -p %{buildroot}%{_prefix}/lib/python%{python_version}/site-packages/__pycache__
|
||||||
|
|
||||||
|
# cleanup parts that don't belong
|
||||||
|
for dir in curses dbm sqlite3 tkinter idlelib; do
|
||||||
|
find "%{buildroot}/%{sitedir}/$dir"/* -maxdepth 0 -name "test" -o -exec rm -rf {} +
|
||||||
|
done
|
||||||
|
rm -fv %{buildroot}%{dynlib nis}
|
||||||
|
|
||||||
|
# overwrite the copied binary with a link
|
||||||
|
ln -sf python%{python_version} %{buildroot}%{_bindir}/python3
|
||||||
|
|
||||||
|
# decide to ship python3 or just python3.X
|
||||||
|
%if !%{primary_interpreter}
|
||||||
|
# base
|
||||||
|
rm %{buildroot}%{_bindir}/python3
|
||||||
|
rm %{buildroot}%{_bindir}/pydoc3
|
||||||
|
rm %{buildroot}%{_mandir}/man1/python3.1
|
||||||
|
# devel
|
||||||
|
rm %{buildroot}%{_bindir}/python3-config
|
||||||
|
rm %{buildroot}%{_libdir}/libpython3.so
|
||||||
|
rm %{buildroot}%{_libdir}/pkgconfig/{python3,python3-embed}.pc
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# link shared library instead of static library that tools expect
|
||||||
|
ln -s ../../libpython%{python_abi}.so %{buildroot}%{_libdir}/python%{python_version}/config-%{python_abi}-%{archname}-%{_os}%{?_gnu}%{?armsuffix}/libpython%{python_abi}.so
|
||||||
|
|
||||||
|
# delete idle3, which has to many packaging dependencies for base
|
||||||
|
rm %{buildroot}%{_bindir}/idle3*
|
||||||
|
|
||||||
|
# delete the generic 2to3 binary if we are not primary
|
||||||
|
%if !%{primary_interpreter}
|
||||||
|
rm %{buildroot}%{_bindir}/2to3
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# replace duplicate .pyo/.pyc with hardlinks
|
||||||
|
%fdupes %{buildroot}/%{sitedir}
|
||||||
|
|
||||||
|
# documentation
|
||||||
|
export PDOCS=%{buildroot}%{_docdir}/%{name}
|
||||||
|
install -d -m 755 $PDOCS
|
||||||
|
install -c -m 644 %{SOURCE3} $PDOCS/
|
||||||
|
install -c -m 644 README.rst $PDOCS/
|
||||||
|
|
||||||
|
# tools
|
||||||
|
for x in `find Tools/ \( -not -name Makefile \) -print | sort` ; do
|
||||||
|
test -d $x && ( install -c -m 755 -d $PDOCS/$x ) \
|
||||||
|
|| ( install -c -m 644 $x $PDOCS/$x )
|
||||||
|
done
|
||||||
|
# gdb script is shipped with devel subpackage
|
||||||
|
rm -r $PDOCS/Tools/gdb
|
||||||
|
# clean up the bat files
|
||||||
|
find "$PDOCS" -name "*.bat" -delete
|
||||||
|
|
||||||
|
# put gdb helper script into place
|
||||||
|
install -m 755 -D Tools/gdb/libpython.py %{buildroot}%{_datadir}/gdb/auto-load/%{_libdir}/libpython%{python_abi}.so.%{so_major}.%{so_minor}-gdb.py
|
||||||
|
|
||||||
|
# install devel files to /config
|
||||||
|
#cp Makefile Makefile.pre.in Makefile.pre $RPM_BUILD_ROOT%{sitedir}/config-%{python_abi}/
|
||||||
|
|
||||||
|
# RPM macros
|
||||||
|
%if %{primary_interpreter}
|
||||||
|
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/
|
||||||
|
install -m 644 %{SOURCE7} %{buildroot}%{_rpmconfigdir}/macros.d/ # macros.python3
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# import_failed hooks
|
||||||
|
FAILDIR=%{buildroot}/%{sitedir}/_import_failed
|
||||||
|
mkdir $FAILDIR
|
||||||
|
install -m 644 %{SOURCE8} %{SOURCE9} $FAILDIR # import_failed.*
|
||||||
|
LD_LIBRARY_PATH=. ./python -c "from py_compile import compile; compile('$FAILDIR/import_failed.py', dfile='%{sitedir}/_import_failed/import_failed.py')"
|
||||||
|
LD_LIBRARY_PATH=. ./python -O -c "from py_compile import compile; compile('$FAILDIR/import_failed.py', dfile='%{sitedir}/_import_failed/import_failed.py')"
|
||||||
|
(
|
||||||
|
cd $FAILDIR
|
||||||
|
while read package modules; do
|
||||||
|
for module in $modules; do
|
||||||
|
ln import_failed.py $module.py
|
||||||
|
pushd __pycache__
|
||||||
|
for i in import_failed*; do
|
||||||
|
ln $i "$module${i#import_failed}"
|
||||||
|
done
|
||||||
|
popd
|
||||||
|
done
|
||||||
|
done < %{SOURCE9}
|
||||||
|
)
|
||||||
|
echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-import-failed-hooks.pth
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with general}
|
||||||
|
%files -n %{python_pkg_name}-tk
|
||||||
|
%defattr(644, root, root, 755)
|
||||||
|
%{sitedir}/tkinter
|
||||||
|
%exclude %{sitedir}/tkinter/test
|
||||||
|
%{dynlib _tkinter}
|
||||||
|
|
||||||
|
%files -n %{python_pkg_name}-curses
|
||||||
|
%defattr(644, root, root, 755)
|
||||||
|
%{sitedir}/curses
|
||||||
|
%{dynlib _curses}
|
||||||
|
%{dynlib _curses_panel}
|
||||||
|
|
||||||
|
%files -n %{python_pkg_name}-dbm
|
||||||
|
%defattr(644, root, root, 755)
|
||||||
|
%{sitedir}/dbm
|
||||||
|
%{dynlib _dbm}
|
||||||
|
%{dynlib _gdbm}
|
||||||
|
|
||||||
|
%files -n %{python_pkg_name}
|
||||||
|
%defattr(644, root, root, 755)
|
||||||
|
%dir %{sitedir}
|
||||||
|
%dir %{sitedir}/lib-dynload
|
||||||
|
%{sitedir}/sqlite3
|
||||||
|
%exclude %{sitedir}/sqlite3/test
|
||||||
|
%{dynlib readline}
|
||||||
|
%{dynlib _sqlite3}
|
||||||
|
%{dynlib nis}
|
||||||
|
|
||||||
|
%files -n %{python_pkg_name}-idle
|
||||||
|
%defattr(644, root, root, 755)
|
||||||
|
%{sitedir}/idlelib
|
||||||
|
%dir %{_sysconfdir}/idle%{python_version}
|
||||||
|
%config %{_sysconfdir}/idle%{python_version}/*
|
||||||
|
%doc Lib/idlelib/NEWS.txt
|
||||||
|
%doc Lib/idlelib/README.txt
|
||||||
|
%doc Lib/idlelib/TODO.txt
|
||||||
|
%doc Lib/idlelib/extend.txt
|
||||||
|
%doc Lib/idlelib/ChangeLog
|
||||||
|
%{_bindir}/idle%{python_version}
|
||||||
|
%{_datadir}/applications/idle%{python_version}.desktop
|
||||||
|
%{_datadir}/metainfo/idle%{python_version}.appdata.xml
|
||||||
|
%{_datadir}/icons/hicolor/*/apps/idle%{python_version}.png
|
||||||
|
%dir %{_datadir}/icons/hicolor
|
||||||
|
%dir %{_datadir}/icons/hicolor/16x16
|
||||||
|
%dir %{_datadir}/icons/hicolor/32x32
|
||||||
|
%dir %{_datadir}/icons/hicolor/48x48
|
||||||
|
%dir %{_datadir}/icons/hicolor/*/apps
|
||||||
|
%attr(755, root, root) %{_bindir}/idle%{python_version}
|
||||||
|
# endif for if general
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with doc}
|
||||||
|
%files -n %{python_pkg_name}-doc
|
||||||
|
%dir %{_docdir}/python%{python_version}
|
||||||
|
%doc %{_docdir}/python%{python_version}/Misc
|
||||||
|
%doc %{_docdir}/python%{python_version}/html
|
||||||
|
|
||||||
|
%files -n %{python_pkg_name}-doc-devhelp
|
||||||
|
%dir %{_datadir}/gtk-doc
|
||||||
|
%dir %{_datadir}/gtk-doc/html
|
||||||
|
%doc %{_datadir}/gtk-doc/html/Python%{python_version}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with base}
|
||||||
|
%post -n libpython%{so_version} -p /sbin/ldconfig
|
||||||
|
%postun -n libpython%{so_version} -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%files -n libpython%{so_version}
|
||||||
|
%defattr(644, root,root)
|
||||||
|
%{_libdir}/libpython%{python_abi}.so.%{so_major}.%{so_minor}
|
||||||
|
|
||||||
|
%files -n %{python_pkg_name}-tools
|
||||||
|
%defattr(644, root, root, 755)
|
||||||
|
%{sitedir}/turtledemo
|
||||||
|
%if %{primary_interpreter}
|
||||||
|
%{_bindir}/2to3
|
||||||
|
%endif
|
||||||
|
%attr(755, root, root)%{_bindir}/2to3-%{python_version}
|
||||||
|
%doc %{_docdir}/%{name}/Tools
|
||||||
|
|
||||||
|
%files -n %{python_pkg_name}-devel
|
||||||
|
%defattr(644, root, root, 755)
|
||||||
|
%{_libdir}/libpython%{python_abi}.so
|
||||||
|
%if %{primary_interpreter}
|
||||||
|
%{_libdir}/libpython3.so
|
||||||
|
%endif
|
||||||
|
%{_libdir}/pkgconfig/*
|
||||||
|
%{_includedir}/python%{python_abi}
|
||||||
|
%{sitedir}/config-%{python_abi}-*
|
||||||
|
%defattr(755, root, root)
|
||||||
|
%{_bindir}/python%{python_abi}-config
|
||||||
|
%if %{primary_interpreter}
|
||||||
|
%{_bindir}/python3-config
|
||||||
|
%endif
|
||||||
|
# Own these directories to not depend on gdb
|
||||||
|
%dir %{_datadir}/gdb
|
||||||
|
%dir %{_datadir}/gdb/auto-load
|
||||||
|
%dir %{_datadir}/gdb/auto-load%{_prefix}
|
||||||
|
%dir %{_datadir}/gdb/auto-load%{_libdir}
|
||||||
|
%{_datadir}/gdb/auto-load/%{_libdir}/libpython%{python_abi}.so.%{so_major}.%{so_minor}-gdb.py
|
||||||
|
|
||||||
|
%files -n %{python_pkg_name}-testsuite
|
||||||
|
%defattr(644, root, root, 755)
|
||||||
|
%{sitedir}/test
|
||||||
|
%{sitedir}/*/test
|
||||||
|
%{sitedir}/*/tests
|
||||||
|
%{dynlib _ctypes_test}
|
||||||
|
%{dynlib _testbuffer}
|
||||||
|
%{dynlib _testcapi}
|
||||||
|
%{dynlib _testinternalcapi}
|
||||||
|
%{dynlib _testimportmultiple}
|
||||||
|
%{dynlib _testmultiphase}
|
||||||
|
%{dynlib xxlimited}
|
||||||
|
# workaround for missing packages
|
||||||
|
%dir %{sitedir}/sqlite3
|
||||||
|
%dir %{sitedir}/tkinter
|
||||||
|
|
||||||
|
%files -n %{python_pkg_name}-base
|
||||||
|
%defattr(644, root, root, 755)
|
||||||
|
# docs
|
||||||
|
%dir %{_docdir}/%{name}
|
||||||
|
%doc %{_docdir}/%{name}/README.rst
|
||||||
|
%license LICENSE
|
||||||
|
%doc %{_docdir}/%{name}/README.SUSE
|
||||||
|
%if %{primary_interpreter}
|
||||||
|
%{_mandir}/man1/python3.1%{?ext_man}
|
||||||
|
%endif
|
||||||
|
%{_mandir}/man1/python%{python_version}.1%{?ext_man}
|
||||||
|
# license text, not a doc because the code can use it at run-time
|
||||||
|
%{sitedir}/LICENSE.txt
|
||||||
|
# RPM macros
|
||||||
|
%if %{primary_interpreter}
|
||||||
|
%{_rpmconfigdir}/macros.d/macros.python3
|
||||||
|
%endif
|
||||||
|
# binary parts
|
||||||
|
%dir %{sitedir}/lib-dynload
|
||||||
|
%{dynlib array}
|
||||||
|
%{dynlib _asyncio}
|
||||||
|
%{dynlib audioop}
|
||||||
|
%{dynlib binascii}
|
||||||
|
%{dynlib _bisect}
|
||||||
|
%{dynlib _bz2}
|
||||||
|
%{dynlib cmath}
|
||||||
|
%{dynlib _codecs_cn}
|
||||||
|
%{dynlib _codecs_hk}
|
||||||
|
%{dynlib _codecs_iso2022}
|
||||||
|
%{dynlib _codecs_jp}
|
||||||
|
%{dynlib _codecs_kr}
|
||||||
|
%{dynlib _codecs_tw}
|
||||||
|
%{dynlib _contextvars}
|
||||||
|
%{dynlib _crypt}
|
||||||
|
%{dynlib _csv}
|
||||||
|
%{dynlib _ctypes}
|
||||||
|
%{dynlib _datetime}
|
||||||
|
%{dynlib _decimal}
|
||||||
|
%{dynlib _elementtree}
|
||||||
|
%{dynlib fcntl}
|
||||||
|
%{dynlib grp}
|
||||||
|
%{dynlib _hashlib}
|
||||||
|
%{dynlib _heapq}
|
||||||
|
%{dynlib _json}
|
||||||
|
%{dynlib _lsprof}
|
||||||
|
%{dynlib _lzma}
|
||||||
|
%{dynlib math}
|
||||||
|
%{dynlib mmap}
|
||||||
|
%{dynlib _multibytecodec}
|
||||||
|
%{dynlib _multiprocessing}
|
||||||
|
%{dynlib _opcode}
|
||||||
|
%{dynlib ossaudiodev}
|
||||||
|
%{dynlib _pickle}
|
||||||
|
%{dynlib _posixshmem}
|
||||||
|
%{dynlib _posixsubprocess}
|
||||||
|
%{dynlib pyexpat}
|
||||||
|
%{dynlib _queue}
|
||||||
|
%{dynlib _random}
|
||||||
|
%{dynlib resource}
|
||||||
|
%{dynlib select}
|
||||||
|
%{dynlib _socket}
|
||||||
|
%{dynlib spwd}
|
||||||
|
%{dynlib _ssl}
|
||||||
|
%{dynlib _statistics}
|
||||||
|
%{dynlib _struct}
|
||||||
|
%{dynlib syslog}
|
||||||
|
%{dynlib termios}
|
||||||
|
%{dynlib unicodedata}
|
||||||
|
%{dynlib _uuid}
|
||||||
|
%{dynlib _xxsubinterpreters}
|
||||||
|
%{dynlib _xxtestfuzz}
|
||||||
|
%{dynlib xxlimited_35}
|
||||||
|
%{dynlib zlib}
|
||||||
|
%{dynlib _zoneinfo}
|
||||||
|
# hashlib fallback modules
|
||||||
|
%{dynlib _blake2}
|
||||||
|
%{dynlib _md5}
|
||||||
|
%{dynlib _sha1}
|
||||||
|
%{dynlib _sha256}
|
||||||
|
%{dynlib _sha512}
|
||||||
|
%{dynlib _sha3}
|
||||||
|
# python parts
|
||||||
|
%dir %{_prefix}/lib/python%{python_version}
|
||||||
|
%dir %{_prefix}/lib/python%{python_version}/site-packages
|
||||||
|
%dir %{_prefix}/lib/python%{python_version}/site-packages/__pycache__
|
||||||
|
%dir %{sitedir}
|
||||||
|
%dir %{sitedir}/site-packages
|
||||||
|
%dir %{sitedir}/site-packages/__pycache__
|
||||||
|
%exclude %{sitedir}/*/test
|
||||||
|
%exclude %{sitedir}/*/tests
|
||||||
|
%{sitedir}/*.py
|
||||||
|
%{sitedir}/asyncio
|
||||||
|
%{sitedir}/ctypes
|
||||||
|
%{sitedir}/collections
|
||||||
|
%{sitedir}/concurrent
|
||||||
|
%{sitedir}/distutils
|
||||||
|
%{sitedir}/email
|
||||||
|
%{sitedir}/encodings
|
||||||
|
%{sitedir}/ensurepip
|
||||||
|
%{sitedir}/html
|
||||||
|
%{sitedir}/http
|
||||||
|
%{sitedir}/importlib
|
||||||
|
%{sitedir}/json
|
||||||
|
%{sitedir}/lib2to3
|
||||||
|
%{sitedir}/logging
|
||||||
|
%{sitedir}/multiprocessing
|
||||||
|
%{sitedir}/pydoc_data
|
||||||
|
%{sitedir}/unittest
|
||||||
|
%{sitedir}/urllib
|
||||||
|
%{sitedir}/venv
|
||||||
|
%{sitedir}/wsgiref
|
||||||
|
%{sitedir}/xml
|
||||||
|
%{sitedir}/xmlrpc
|
||||||
|
%{sitedir}/zoneinfo
|
||||||
|
%{sitedir}/__pycache__
|
||||||
|
# import-failed hooks
|
||||||
|
%{sitedir}/_import_failed
|
||||||
|
%{sitedir}/site-packages/zzzz-import-failed-hooks.pth
|
||||||
|
# symlinks
|
||||||
|
%if %{primary_interpreter}
|
||||||
|
%{_bindir}/python3
|
||||||
|
%{_bindir}/pydoc3
|
||||||
|
%endif
|
||||||
|
# executables
|
||||||
|
%attr(755, root, root) %{_bindir}/pydoc%{python_version}
|
||||||
|
# %%attr(755, root, root) %%{_bindir}/python%%{python_abi}
|
||||||
|
%attr(755, root, root) %{_bindir}/python%{python_version}
|
||||||
|
# endif for if base
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%changelog
|
14
skip-test_pyobject_freed_is_freed.patch
Normal file
14
skip-test_pyobject_freed_is_freed.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
Lib/test/test_capi.py | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
--- a/Lib/test/test_capi.py
|
||||||
|
+++ b/Lib/test/test_capi.py
|
||||||
|
@@ -794,6 +794,7 @@ class PyMemDebugTests(unittest.TestCase)
|
||||||
|
def test_pyobject_forbidden_bytes_is_freed(self):
|
||||||
|
self.check_pyobject_is_freed('check_pyobject_forbidden_bytes_is_freed')
|
||||||
|
|
||||||
|
+ @unittest.skip('Failing on Leap 15.*')
|
||||||
|
def test_pyobject_freed_is_freed(self):
|
||||||
|
self.check_pyobject_is_freed('check_pyobject_freed_is_freed')
|
||||||
|
|
69
skipped_tests.py
Normal file
69
skipped_tests.py
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
"""
|
||||||
|
Simple regexp-based skipped test checker.
|
||||||
|
It lists tests that are mentioned (presumably for exclusion)
|
||||||
|
in BASE, and in MAIN (presumably for inclusion)
|
||||||
|
and reports discrepancies.
|
||||||
|
|
||||||
|
This will have a number of
|
||||||
|
"""
|
||||||
|
|
||||||
|
MAIN = "python39.spec"
|
||||||
|
|
||||||
|
import glob
|
||||||
|
import re
|
||||||
|
from os.path import basename
|
||||||
|
|
||||||
|
alltests = set()
|
||||||
|
qemu_exclusions = set()
|
||||||
|
|
||||||
|
for item in glob.glob("Python-*/Lib/test/test_*"):
|
||||||
|
testname = basename(item)
|
||||||
|
if testname.endswith(".py"):
|
||||||
|
testname = testname[:-3]
|
||||||
|
alltests.add(testname)
|
||||||
|
|
||||||
|
testre = re.compile(r'[\s"](test_\w+)\b')
|
||||||
|
|
||||||
|
def find_tests_in_spec(specname):
|
||||||
|
global qemu_exclusions
|
||||||
|
|
||||||
|
found_tests = set()
|
||||||
|
with open(specname) as spec:
|
||||||
|
in_qemu = False
|
||||||
|
for line in spec:
|
||||||
|
line = line.strip()
|
||||||
|
if "#" in line:
|
||||||
|
line = line[:line.index("#")]
|
||||||
|
tests = set(testre.findall(line))
|
||||||
|
found_tests |= tests
|
||||||
|
if line == "%if 0%{?qemu_user_space_build} > 0":
|
||||||
|
in_qemu = True
|
||||||
|
if in_qemu:
|
||||||
|
if line == "%endif":
|
||||||
|
in_qemu = False
|
||||||
|
qemu_exclusions |= tests
|
||||||
|
return found_tests
|
||||||
|
|
||||||
|
excluded = find_tests_in_spec(MAIN)
|
||||||
|
|
||||||
|
#print("--- excluded tests:", " ".join(sorted(excluded)))
|
||||||
|
#print("--- included tests:", " ".join(sorted(included)))
|
||||||
|
|
||||||
|
mentioned = excluded
|
||||||
|
nonexistent = mentioned - alltests
|
||||||
|
missing = excluded - qemu_exclusions
|
||||||
|
|
||||||
|
print("--- the following tests are excluded for QEMU and not tested in python")
|
||||||
|
print("--- (that probably means we don't need to worry about them)")
|
||||||
|
for test in sorted(qemu_exclusions - excluded):
|
||||||
|
print(test)
|
||||||
|
|
||||||
|
print("--- the following tests might be excluded in python:")
|
||||||
|
for test in sorted(missing):
|
||||||
|
print(test)
|
||||||
|
|
||||||
|
if nonexistent:
|
||||||
|
print("--- the following tests don't exist:")
|
||||||
|
for test in sorted(nonexistent):
|
||||||
|
print(test)
|
16
subprocess-raise-timeout.patch
Normal file
16
subprocess-raise-timeout.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
Lib/test/test_subprocess.py | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/Lib/test/test_subprocess.py
|
||||||
|
+++ b/Lib/test/test_subprocess.py
|
||||||
|
@@ -261,7 +261,8 @@ class ProcessTestCase(BaseTestCase):
|
||||||
|
"time.sleep(3600)"],
|
||||||
|
# Some heavily loaded buildbots (sparc Debian 3.x) require
|
||||||
|
# this much time to start and print.
|
||||||
|
- timeout=3)
|
||||||
|
+ # OBS might require even more
|
||||||
|
+ timeout=10)
|
||||||
|
self.fail("Expected TimeoutExpired.")
|
||||||
|
self.assertEqual(c.exception.output, b'BDFL')
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user