1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
8 version = %{major_ver}.2
10 thisapp = Python-%{version}
12 groups = Development/Languages
13 url = http://www.python.org
15 summary = An interpreted, interactive, object-oriented programming language.
18 Python is an interpreted, interactive, object-oriented programming
19 language often compared to Tcl, Perl, Scheme or Java. Python includes
20 modules, classes, exceptions, very high level dynamic data types and
21 dynamic typing. Python supports interfaces to many system calls and
22 libraries, as well as to various windowing systems.
25 source_dl = http://python.org/ftp/python/%{version}/
26 sources = %{thisapp}.tar.xz
46 export CFLAGS += -D_GNU_SOURCE -fwrapv
49 # Apply patches for x86_64.
50 if [ "$(uname -m)" = "x86_64" ]; then
51 patch -Np1 -i %{DIR_SOURCE}/python-2.7.1-lib64.patch
52 patch -Np1 -i %{DIR_SOURCE}/python-2.7-lib64-sysconfig.patch
55 # Remove embedded copies of expat, zlib and libffi
56 rm -rf Modules/{expat,zlib}
57 rm -rf Modules/_ctypes/{darwin,libffi,libffi_arm_wince,libffi_msvc,libffi_osx}
59 # Remove autoconf version check and reconfigure
60 sed -e "s/^version_required.*//" -i configure.in
64 configure_options += \
66 --enable-unicode=ucs4 \
72 export CPPFLAGS=$(pkg-config --cflags-only-I libffi)
78 make %{PARALLELISMFLAGS}
82 # All *.py files don't need to be executeable...
83 find %{BUILDROOT}%{libdir}/python*/ -name "*.py" | xargs -r chmod a-x -v
85 # Create symlink for shared lib.
86 ln -svf ../../libpython%{major_ver}.so %{BUILDROOT}%{libdir}/python%{major_ver}/config/
92 # Define python-abi manually.
94 python-abi = %{major_ver}
102 !%{libdir}/python*/config/Makefile \
103 !%{includedir}/python*/pyconfig.h
106 package %{name}-debuginfo