############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = python major_ver = 2.7 version = %{major_ver}.15 release = 1 thisapp = Python-%{version} groups = Development/Languages url = http://www.python.org license = Python summary = An interpreted, interactive, object-oriented programming language. description Python is an interpreted, interactive, object-oriented programming language often compared to Tcl, Perl, Scheme or Java. Python includes modules, classes, exceptions, very high level dynamic data types and dynamic typing. Python supports interfaces to many system calls and libraries, as well as to various windowing systems. end source_dl = http://python.org/ftp/python/%{version}/ sources = %{thisapp}.tar.xz build requires autoconf automake bzip2-devel expat-devel gdbm-devel glibc-headers >= 2.16-4 libdb-devel libffi-devel ncurses-devel openssl-devel pakfire-builder >= 0.9.23-4 readline-devel sqlite-devel tar util-linux zlib-devel end export CFLAGS += -D_GNU_SOURCE -fwrapv export CPPFLAGS = %(pkg-config --cflags-only-I libffi) export OPT = %{CFLAGS} export CC = gcc export LINKCC = gcc if "%{lib}" == "lib64" patches += %{DIR_SOURCE}/python-2.7.13-lib64.patch patches += %{DIR_SOURCE}/python-2.7-lib64-sysconfig.patch end prepare_cmds # Remove embedded copies of expat, zlib and libffi rm -rf Modules/{expat,zlib} rm -rf Modules/_ctypes/{darwin,libffi,libffi_arm_wince,libffi_msvc,libffi_osx} # Reconfigure autoreconf --force end configure_options += \ --enable-ipv6 \ --enable-unicode=ucs4 \ --with-system-expat \ --with-system-ffi \ --enable-shared test WITHIN_PYTHON_RPM_BUILD= EXTRATESTOPTS="--verbose" make test || : end install_cmds # All *.py files don't need to be executeable... find %{BUILDROOT}%{libdir}/python*/ -name "*.py" | xargs -r chmod a-x -v # Create symlink for shared lib. ln -svf ../../libpython%{major_ver}.so %{BUILDROOT}%{libdir}/python%{major_ver}/config/ end end packages package %{name} # Define python-abi manually. provides python-abi = %{major_ver} end end package %{name}-devel template DEVEL files += \ !%{libdir}/python*/config/Makefile \ !%{includedir}/python*/pyconfig.h end package %{name}-debuginfo template DEBUGINFO end end