From 3147c849ec12e7bea062fc1390a4b22ccfcc3037 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Sat, 28 May 2022 17:25:48 +0200 Subject: [PATCH] - really prefer python3 over python2 --- postgresql-python3.patch | 11 +++++++++++ postgresql.spec | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 postgresql-python3.patch diff --git a/postgresql-python3.patch b/postgresql-python3.patch new file mode 100644 index 0000000..1bb24e4 --- /dev/null +++ b/postgresql-python3.patch @@ -0,0 +1,11 @@ +--- postgresql-14.3/config/python.m4 2022-05-09 23:14:45.000000000 +0200 ++++ postgresql-14.3/config/python.m4 2022-05-28 17:13:50.058076647 +0200 +@@ -16,7 +16,7 @@ + # "python2" and "python3", in which case it's reasonable to prefer the + # newer version. + AC_DEFUN([PGAC_PATH_PYTHON], +-[PGAC_PATH_PROGS(PYTHON, [python python3 python2]) ++[PGAC_PATH_PROGS(PYTHON, [python3 python2 python]) + AC_ARG_VAR(PYTHON, [Python program])dnl + if test x"$PYTHON" = x""; then + AC_MSG_ERROR([Python not found]) diff --git a/postgresql.spec b/postgresql.spec index 0c75352..361e0d8 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -29,7 +29,7 @@ Summary(uk.UTF-8): PostgreSQL - система керування базами Summary(zh_CN.UTF-8): PostgreSQL 客户端程序和库文件 Name: postgresql-%{pgsqlversion} Version: %{pgsqlversion}.3 -Release: 1 +Release: 2 License: BSD Group: Applications/Databases Source0: http://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2 @@ -48,6 +48,7 @@ Patch5: postgresql-heimdal.patch Patch6: postgresql-link.patch Patch7: socket-dir-fixes.patch Patch8: postgresql-autoconf.patch +Patch9: postgresql-python3.patch URL: http://www.postgresql.org/ BuildRequires: autoconf >= 2.69 BuildRequires: automake @@ -601,6 +602,7 @@ Różne moduły dołączone do PostgreSQL-a. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 # force rebuild of bison/flex files find src -name \*.l -o -name \*.y | xargs touch -- 2.46.0