From 66bcf34f0b81787e5c6fe59a7523df7bd2c0cc15 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 31 Jan 2025 15:43:16 +0000 Subject: [PATCH] Add .gitignore and .gitea/workflows/ci.yml --- .gitea/workflows/ci.yml | 1 + python3.11.spec | 82 ++++++++++++++++++++++++----------------- 2 files changed, 49 insertions(+), 34 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index d5b8b48..dd7cf08 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -13,4 +13,5 @@ jobs: with: CI_DEPLOY: ${{ secrets.CI_DEPLOY }} PUBLICATOR: ${{ secrets.PUBLICATOR }} + REPO_DEPLOY: ${{ secrets.REPO_DEPLOY }} diff --git a/python3.11.spec b/python3.11.spec index be821f9..8b1afd5 100644 --- a/python3.11.spec +++ b/python3.11.spec @@ -32,40 +32,40 @@ # pyc/pyo files) %define _python_bytecompile_build 0 -Summary: An interpreted, interactive object-oriented programming language -Name: python3.11 -Version: 3.11.4 -Release: 3 -License: Modified CNRI Open Source License -Group: Development/Python +Summary: An interpreted, interactive object-oriented programming language +Name: python3.11 +Version: 3.11.4 +Release: 3 +License: Modified CNRI Open Source License +Group: Development/Python -Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz -Source1: https://docs.python.org/3/archives/python-%{version}-docs-html.tar.bz2 -Source2: python3.11.macros -Source4: import_all_modules.py -Source5: python3.11-shebang-sanity.sh -Source100: %{name}.rpmlintrc +Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz +Source1: https://docs.python.org/3/archives/python-%{version}-docs-html.tar.bz2 +Source2: python3.11.macros +Source4: import_all_modules.py +Source5: python3.11-shebang-sanity.sh +Source100: %{name}.rpmlintrc # 00001 # # Fixup distutils/unixccompiler.py to remove standard library path from rpath: # Was Patch0 in ivazquez' python3000 specfile: -Patch1: 00001-rpath.patch -Patch2: Python-3.8.0-c++.patch -Patch3: python-3.8.0-c++atomics.patch -Patch4: 0005-Improve-distutils-C-support.patch -Patch5: 00201-fix-memory-leak-in-gdbm.patch +Patch1: 00001-rpath.patch +Patch2: Python-3.8.0-c++.patch +Patch3: python-3.8.0-c++atomics.patch +Patch4: 0005-Improve-distutils-C-support.patch +Patch5: 00201-fix-memory-leak-in-gdbm.patch # 00251 # 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 -Patch251: 00251-change-user-install-location.patch +# Patch251: 00251-change-user-install-location.patch # 00328 # # Restore pyc to TIMESTAMP invalidation mode as default in rpmbubild # See https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/57#comment-27426 -Patch328: 00328-pyc-timestamp-invalidation-mode.patch +# Patch328: 00328-pyc-timestamp-invalidation-mode.patch # For more info see: # https://bodhi.fedoraproject.org/updates/FEDORA-2021-e152ce5f31 @@ -81,7 +81,7 @@ Patch506: python3-3.6.2-python3-config-LIBPLUSED-cmp0004-error.patch Patch508: fix-attribute-e2k.patch -URL: http://www.python.org/ +URL: http://www.python.org Requires: %{lib_name} = %{EVRD} BuildRequires: automake BuildRequires: autoconf-archive @@ -97,21 +97,22 @@ BuildRequires: pkgconfig(ncursesw) BuildRequires: glibc-devel # build ssl module fail with error SSLV3_method not found #BuildRequires: pkgconfig(openssl) -BuildRequires: openssl-devel +#BuildRequires: openssl-devel +BuildRequires: pkgconfig(openssl3.3) BuildRequires: readline-devel BuildRequires: tcl tcl-devel BuildRequires: tk tk-devel BuildRequires: autoconf BuildRequires: bzip2-devel BuildRequires: sqlite3-devel -BuildRequires: xz-devel +BuildRequires: xz BuildRequires: uuid-devel %if %{with valgrind} BuildRequires: valgrind-devel %endif %if %{with rewheel} -BuildRequires: python3-setuptools -BuildRequires: python3-pip +BuildRequires: python38-setuptools +BuildRequires: python38-pip %endif Provides: python(abi) = %{dirver} @@ -229,6 +230,11 @@ find . -type f -print0 | xargs -0 perl -p -i -e 's@/usr/local/bin/python@/usr/bi %build +/usr/libexec/python3.8 -m venv . +. bin/activate + +export LD_LIBRARY_PATH=/opt/openssl3.3/lib:${LD_LIBRARY_PATH} + rm -f Modules/Setup.local export OPT="%{optflags} -g" @@ -240,18 +246,26 @@ export CPPFLAGS="%{optflags} -I/usr/include/ncursesw" autoreconf -vfi # Remove -Wl,--no-undefined %define _disable_ld_no_undefined 1 + +#configure --help +#exit 1 + +#unset PYTHONPATH +#unset PYTHONHOME + %configure --with-threads \ - --enable-ipv6 \ - --with-dbmliborder=gdbm \ - --with-system-expat \ - --with-system-ffi \ - --enable-shared \ - --without-ensurepip \ - --without-static-libpython \ - --with-platlibdir=%{_lib} \ - --with-ssl-default-suites=openssl \ + --enable-ipv6 \ + --with-dbmliborder=gdbm \ + --with-system-expat \ + --with-system-ffi \ + --enable-shared \ + --without-ensurepip \ + --without-static-libpython \ + --with-platlibdir=%{_lib} \ + --with-ssl-default-suites=openssl \ + --with-openssl=/opt/openssl3.3 \ %if %{with valgrind} - --with-valgrind + --with-valgrind %endif