###############################################################################
name = python3
-major_ver = 3.6
-version = %{major_ver}.4
+major_ver = 3.11
+version = %{major_ver}.0
release = 1
thisapp = Python-%{version}
libraries, as well as to various windowing systems.
end
-source_dl = http://python.org/ftp/python/%{version}/
+source_dl = https://python.org/ftp/python/%{version}/
sources = %{thisapp}.tar.xz
pylibdir = %{libdir}/python%{major_ver}
findutils
gdbm-devel >= 1.10
gcc-c++
- glibc-devel
+ glibc-devel >= 2.26
gmp-devel
libdb-devel
libffi-devel
zlib-devel
end
- export CFLAGS += -D_GNU_SOURCE -fwrapv
- export CXXFLAGS += -D_GNU_SOURCE -fwrapv
export OPT = %{CFLAGS}
export LINKCC = gcc
prepare_cmds
- if [ "%{lib}" = "lib64" ]; then
- patch -Np1 -i %{DIR_SOURCE}/python-3.6.0-lib64.patch
- fi
-
# Remove embedded copies of expat and libffi
rm -rf Modules/{expat,zlib}
rm -rf Modules/_ctypes/{darwin,libffi,libffi_arm_wince,libffi_msvc,libffi_osx}
# Make all source files owned by root.
chown root.root -R .
-
- autoreconf --force
end
configure_options += \
+ --with-platlibdir=%{lib} \
--enable-ipv6 \
+ --enable-shared \
--with-computed-gotos=yes \
--with-dbmliborder=gdbm:ndbm:bdb \
--with-system-expat \
--with-system-ffi \
+ --with-system-libmpdec \
+ --with-lto \
+ --with-ssl-default-suites=openssl \
--enable-loadable-sqlite-extensions \
- --enable-shared \
--without-ensurepip
- test
- LD_LIBRARY_PATH=$(pwd) $(pwd)/python \
- -m test.regrtest \
- --verbose \
- --findleaks \
- -x test_distutils \
- -x test_faulthandler \
- -x test_gdb \
- -x test_email \
- -x test_subprocess \
- -x test_float \
- -x test_cmath \
- -x test_asynchat \
- -x test_asyncore
-
- # # test_subprocess won't work on grsecurity-enabled kernels
- # # test_float and test_cmath do not work on armv5tel (soft FPU)
- end
+ #test
+ # make test
+ #end
install_cmds
install -d -m 0755 %{BUILDROOT}%{pylibdir}/site-packages/__pycache__
install -d -m 0755 %{BUILDROOT}/usr/lib/python${major_ver}/site-packages/__pycache__
- # Development tools
- mv -v %{BUILDROOT}%{bindir}/{,python3-}2to3
- install -m 755 -d %{BUILDROOT}%{pylibdir}/Tools
- install Tools/README %{BUILDROOT}%{pylibdir}/Tools/
- cp -avr Tools/{freeze,i18n,pynche,scripts} %{BUILDROOT}%{pylibdir}/Tools/
-
- rm -vf %{BUILDROOT}%{pylibdir}/email/test/data/audiotest.au %{BUILDROOT}%{pylibdir}/test/audiotest.au
-
# Switch all shebangs to refer to the specific Python version.
LD_LIBRARY_PATH=. ./python Tools/scripts/pathfix.py \
-i "%{bindir}/python%{major_ver}" \
-perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \
-exec chmod a-x {} \; \) \)
- # .xpm and .xbm files should not be executable:
- find %{BUILDROOT} \
- \( -name \*.xbm -o -name \*.xpm -o -name \*.xpm.1 \) \
- -exec chmod a-x {} \;
-
- # Remove executable flag from files that shouldn't have it:
- chmod a-x \
- %{BUILDROOT}%{pylibdir}/distutils/tests/Setup.sample \
- %{BUILDROOT}%{pylibdir}/Tools/README
-
- # Get rid of DOS batch files:
- find %{BUILDROOT} -name \*.bat -exec rm {} \;
-
# Get rid of backup files:
find %{BUILDROOT}/ -name "*~" -exec rm -f {} \;
rm -f %{BUILDROOT}%{pylibdir}/LICENSE.txt
-
- # Junk, no point in putting in -test sub-pkg
- rm -f %{BUILDROOT}%{pylibdir}/idlelib/testcode.py*
-
- # Fix end-of-line encodings:
- find %{BUILDROOT}/ -name \*.py -exec sed -i 's/\r//' {} \;
-
- # Do bytecompilation with the newly installed interpreter.
- # compile *.pyo
- find %{BUILDROOT} -type f -a -name "*.py" -print0 | \
- LD_LIBRARY_PATH="%{BUILDROOT}%{dynload_dir}:%{BUILDROOT}%{libdir}" \
- PYTHONPATH="%{BUILDROOT}%{libdir}python%{major_ver} %{BUILDROOT}/%{libdir}python%{major_ver}/site-packages" \
- xargs -0 %{BUILDROOT}%{bindir}/python%{major_ver} -O -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("%{BUILDROOT}")[2]) for f in sys.argv[1:]]' || :
- # compile *.pyc
- find %{BUILDROOT} -type f -a -name "*.py" -print0 | \
- LD_LIBRARY_PATH="%{BUILDROOT}%{dynload_dir}:%{BUILDROOT}%{libdir}" \
- PYTHONPATH="%{BUILDROOT}%{libdir}python%{major_ver} %{BUILDROOT}/%{libdir}python%{major_ver}/site-packages" \
- xargs -0 %{BUILDROOT}%{bindir}/python%{major_ver} -O -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("%{BUILDROOT}")[2], optimize=0) for f in sys.argv[1:]]' || :
-
- # Fixup permissions for shared libraries from non-standard 555 to standard 755:
- find %{BUILDROOT} -perm 555 -exec chmod 755 {} \;
end
end
requires
expat >= 2.1.0
end
-
- files += %{dynload_dir}
end
package %{name}-devel
template DEVEL
- requires += %{name}-libs = %{thisver}
+ requires
+ %{name} = %{thisver}
+ %{name}-libs = %{thisver}
+ end
files += \
!%{libdir}/python*/config*/Makefile \
- !%{includedir}/python*/pyconfig.h
+ !%{includedir}/python*/pyconfig.h \
+ !%{pylibdir}/lib-dynload
end
package %{name}-test