1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
8 version = %{major_ver}.5
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
35 glibc-headers >= 2.16-4
41 pakfire-builder >= 0.9.23-4
49 export CFLAGS += -D_GNU_SOURCE -fwrapv
50 export CPPFLAGS = %(pkg-config --cflags-only-I libffi)
51 export OPT = %{CFLAGS}
53 if "%{lib}" == "lib64"
54 patches += %{DIR_SOURCE}/python-2.7.3-lib64.patch
55 patches += %{DIR_SOURCE}/python-2.7-lib64-sysconfig.patch
59 # Remove embedded copies of expat, zlib and libffi
60 rm -rf Modules/{expat,zlib}
61 rm -rf Modules/_ctypes/{darwin,libffi,libffi_arm_wince,libffi_msvc,libffi_osx}
67 configure_options += \
69 --enable-unicode=ucs4 \
75 WITHIN_PYTHON_RPM_BUILD= EXTRATESTOPTS="--verbose" make test || :
79 # All *.py files don't need to be executeable...
80 find %{BUILDROOT}%{libdir}/python*/ -name "*.py" | xargs -r chmod a-x -v
82 # Create symlink for shared lib.
83 ln -svf ../../libpython%{major_ver}.so %{BUILDROOT}%{libdir}/python%{major_ver}/config/
89 # Define python-abi manually.
91 python-abi = %{major_ver}
99 !%{libdir}/python*/config/Makefile \
100 !%{includedir}/python*/pyconfig.h
103 package %{name}-debuginfo