############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = python version = 2.7.1 release = 4 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 = sources = %{thisapp}.tgz build requires autoconf automake bzip2-devel db4-devel expat-devel gdbm-devel libffi-devel libselinux-devel ncurses-devel openssl-devel pkg-config readline-devel sqlite-devel tar zlib-devel end export CFLAGS += -D_GNU_SOURCE -fwrapv prepare_cmds sed -e "s/#*shared*/*shared*/g" -i Modules/Setup.dist # 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} # Remove autoconf version check and reconfigure sed -e "s/^version_required.*//" -i configure.in autoreconf --force end build export CPPFLAGS=$(pkg-config --cflags-only-I libffi) OPT="%{CFLAGS}" \ ./configure \ --prefix=/usr \ --enable-ipv6 \ --with-system-expat \ --with-system-ffi \ --enable-shared make %{PARALLELISMFLAGS} end install_cmds # All *.py files don't need to be executeable... find %{BUILDROOT}/usr/lib/python*/ -name "*.py" | xargs chmod a-x -v end end packages package %{name} package %{name}-devel template DEVEL files += \ !/usr/lib/python*/config/Makefile \ !/usr/include/python*/pyconfig.h end end