summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-08-18 13:32:30 (GMT)
committerGitHub <noreply@github.com>2022-08-18 13:32:30 (GMT)
commit504da3ce8025a94c14d31cc8df74fb801852a7be (patch)
treed36708f4a19cba57bf0a6d51cd8ce91da0804d63
parent36c114ab11d478c9ede246035606c12fc080e6ff (diff)
downloadcpython-504da3ce8025a94c14d31cc8df74fb801852a7be.zip
cpython-504da3ce8025a94c14d31cc8df74fb801852a7be.tar.gz
cpython-504da3ce8025a94c14d31cc8df74fb801852a7be.tar.bz2
gh-95957: Add instructions for Tcl/Tk and OpenSSL on RHEL/CentOS 7 (GH-95964)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> (cherry picked from commit ab4d72954f3c3fe4bdf51dc6a9cf0ed38f210a68) Co-authored-by: Christian Heimes <christian@python.org>
-rw-r--r--Doc/whatsnew/3.11.rst19
-rw-r--r--Misc/NEWS.d/next/Documentation/2022-08-13-20-34-51.gh-issue-95957.W9ZZAx.rst2
-rw-r--r--Misc/rhel7/README.md19
-rw-r--r--Misc/rhel7/openssl.pc3
-rw-r--r--Misc/rhel7/tcl.pc4
-rw-r--r--Misc/rhel7/tk.pc5
6 files changed, 46 insertions, 6 deletions
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 2fd8ee3..cda9e97 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -1631,16 +1631,23 @@ Build Changes
* Build dependencies, compiler flags, and linker flags for most stdlib
extension modules are now detected by :program:`configure`. libffi, libnsl,
- libsqlite3, zlib, bzip2, liblzma, libcrypt, Tcl/Tk libs, and uuid flags
- are detected by ``pkg-config`` (when available).
+ libsqlite3, zlib, bzip2, liblzma, libcrypt, Tcl/Tk, and uuid flags
+ are detected by ``pkg-config`` (when available). :mod:`tkinter` now
+ requires ``pkg-config`` command to detect development settings for Tcl/Tk
+ headers and libraries.
(Contributed by Christian Heimes and Erlend Egeberg Aasland in
:issue:`45847`, :issue:`45747`, and :issue:`45763`.)
.. note::
- Use the environment variables ``TCLTK_CFLAGS`` and ``TCLTK_LIBS`` to
- manually specify the location of Tcl/Tk headers and libraries.
- The :program:`configure` options ``--with-tcltk-includes`` and
- ``--with-tcltk-libs`` have been removed.
+ Use the environment variables :envvar:`TCLTK_CFLAGS` and
+ :envvar:`TCLTK_LIBS` to manually specify the location of Tcl/Tk headers
+ and libraries. The :program:`configure` options ``--with-tcltk-includes``
+ and ``--with-tcltk-libs`` have been removed.
+
+ On RHEL 7 and CentOS 7 the development packages do not provide ``tcl.pc``
+ and ``tk.pc``, use :envvar:`TCLTK_LIBS="-ltk8.5 -ltkstub8.5 -ltcl8.5"`.
+ The directory ``Misc/rhel7`` contains ``.pc`` files and instructions
+ how to build Python with RHEL 7's and CentOS 7's Tcl/Tk and OpenSSL.
* CPython now has :pep:`11` tier 3 support for cross compiling to WebAssembly
platform ``wasm32-unknown-emscripten`` (Python in the browser). The effort
diff --git a/Misc/NEWS.d/next/Documentation/2022-08-13-20-34-51.gh-issue-95957.W9ZZAx.rst b/Misc/NEWS.d/next/Documentation/2022-08-13-20-34-51.gh-issue-95957.W9ZZAx.rst
new file mode 100644
index 0000000..c617bd4
--- /dev/null
+++ b/Misc/NEWS.d/next/Documentation/2022-08-13-20-34-51.gh-issue-95957.W9ZZAx.rst
@@ -0,0 +1,2 @@
+What's New 3.11 now has instructions for how to provide compiler and
+linker flags for Tcl/Tk and OpenSSL on RHEL 7 and CentOS 7.
diff --git a/Misc/rhel7/README.md b/Misc/rhel7/README.md
new file mode 100644
index 0000000..8642e7c
--- /dev/null
+++ b/Misc/rhel7/README.md
@@ -0,0 +1,19 @@
+# pkg-config overrides for RHEL 7 and CentOS 7
+
+RHEL 7 and CentOS 7 do not provide pkg-config `.pc` files for Tcl/Tk. The
+ OpenSSL 1.1.1 pkg-config file is named `openssl11.pc` and not picked up
+ by Python's `configure` script.
+
+To build Python with system Tcl/Tk libs and OpenSSL 1.1 package, first
+install the developer packages and the `pkgconfig` package with `pkg-config`
+command.
+
+```shell
+sudo yum install pkgconfig 'tcl-devel >= 8.5.12' 'tk-devel >= 8.5.12' openssl11-devel
+```
+
+The run `configure` with `PKG_CONFIG_PATH` environment variable.
+
+```shell
+PKG_CONFIG_PATH=Misc/rhel7 ./configure -C
+```
diff --git a/Misc/rhel7/openssl.pc b/Misc/rhel7/openssl.pc
new file mode 100644
index 0000000..ffccd36
--- /dev/null
+++ b/Misc/rhel7/openssl.pc
@@ -0,0 +1,3 @@
+Name: OpenSSL
+Version: 1.1.1k
+Requires: libssl11 libcrypto11
diff --git a/Misc/rhel7/tcl.pc b/Misc/rhel7/tcl.pc
new file mode 100644
index 0000000..922eb51
--- /dev/null
+++ b/Misc/rhel7/tcl.pc
@@ -0,0 +1,4 @@
+Name: Tool Command Language
+Version: 8.5.12
+Libs: -ltcl8.5 -ltclstub8.5
+# Libs.private: -ldl -lz -lpthread -lm
diff --git a/Misc/rhel7/tk.pc b/Misc/rhel7/tk.pc
new file mode 100644
index 0000000..67cebb2
--- /dev/null
+++ b/Misc/rhel7/tk.pc
@@ -0,0 +1,5 @@
+Name: The Tk Toolkit
+Version: 8.5.12
+Requires: tcl >= 8.5.12
+Libs: -ltk8.5 -ltkstub8.5
+# Libs.private: -lXft -lfontconfig -lfreetype -lfontconfig -lX11