]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - python/python.nm
pdns: Update to version 3.4.7
[people/amarx/ipfire-3.x.git] / python / python.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = python
7 major_ver = 2.7
8 version = %{major_ver}.5
9 release = 2
10 thisapp = Python-%{version}
11
12 groups = Development/Languages
13 url = http://www.python.org
14 license = Python
15 summary = An interpreted, interactive, object-oriented programming language.
16
17 description
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.
23 end
24
25 source_dl = http://python.org/ftp/python/%{version}/
26 sources = %{thisapp}.tar.xz
27
28 build
29 requires
30 autoconf
31 automake
32 bzip2-devel
33 expat-devel
34 gdbm-devel
35 glibc-headers >= 2.16-4
36 libdb-devel
37 libffi-devel
38 libselinux-devel
39 ncurses-devel
40 openssl-devel
41 pakfire-builder >= 0.9.23-4
42 readline-devel
43 sqlite-devel
44 tar
45 util-linux
46 zlib-devel
47 end
48
49 export CFLAGS += -D_GNU_SOURCE -fwrapv
50 export CPPFLAGS = %(pkg-config --cflags-only-I libffi)
51 export OPT = %{CFLAGS}
52
53 if "%{lib}" == "lib64"
54 patches += %{DIR_SOURCE}/python-2.7.3-lib64.patch
55 patches += %{DIR_SOURCE}/python-2.7-lib64-sysconfig.patch
56 end
57
58 prepare_cmds
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}
62
63 # Reconfigure
64 autoreconf --force
65 end
66
67 configure_options += \
68 --enable-ipv6 \
69 --enable-unicode=ucs4 \
70 --with-system-expat \
71 --with-system-ffi \
72 --enable-shared
73
74 test
75 WITHIN_PYTHON_RPM_BUILD= EXTRATESTOPTS="--verbose" make test || :
76 end
77
78 install_cmds
79 # All *.py files don't need to be executeable...
80 find %{BUILDROOT}%{libdir}/python*/ -name "*.py" | xargs -r chmod a-x -v
81
82 # Create symlink for shared lib.
83 ln -svf ../../libpython%{major_ver}.so %{BUILDROOT}%{libdir}/python%{major_ver}/config/
84 end
85 end
86
87 packages
88 package %{name}
89 # Define python-abi manually.
90 provides
91 python-abi = %{major_ver}
92 end
93 end
94
95 package %{name}-devel
96 template DEVEL
97
98 files += \
99 !%{libdir}/python*/config/Makefile \
100 !%{includedir}/python*/pyconfig.h
101 end
102
103 package %{name}-debuginfo
104 template DEBUGINFO
105 end
106 end