]> git.ipfire.org Git - ipfire-3.x.git/blob - python/python.nm
python-setuputils: Update to 40.4.3
[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}.12
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 ncurses-devel
39 openssl-devel
40 pakfire-builder >= 0.9.23-4
41 readline-devel
42 sqlite-devel
43 tar
44 util-linux
45 zlib-devel
46 end
47
48 export CFLAGS += -D_GNU_SOURCE -fwrapv
49 export CPPFLAGS = %(pkg-config --cflags-only-I libffi)
50 export OPT = %{CFLAGS}
51
52 if "%{lib}" == "lib64"
53 patches += %{DIR_SOURCE}/python-2.7.12-lib64.patch
54 patches += %{DIR_SOURCE}/python-2.7-lib64-sysconfig.patch
55 end
56
57 prepare_cmds
58 # Remove embedded copies of expat, zlib and libffi
59 rm -rf Modules/{expat,zlib}
60 rm -rf Modules/_ctypes/{darwin,libffi,libffi_arm_wince,libffi_msvc,libffi_osx}
61
62 # Reconfigure
63 autoreconf --force
64 end
65
66 configure_options += \
67 --enable-ipv6 \
68 --enable-unicode=ucs4 \
69 --with-system-expat \
70 --with-system-ffi \
71 --enable-shared
72
73 test
74 WITHIN_PYTHON_RPM_BUILD= EXTRATESTOPTS="--verbose" make test || :
75 end
76
77 install_cmds
78 # All *.py files don't need to be executeable...
79 find %{BUILDROOT}%{libdir}/python*/ -name "*.py" | xargs -r chmod a-x -v
80
81 # Create symlink for shared lib.
82 ln -svf ../../libpython%{major_ver}.so %{BUILDROOT}%{libdir}/python%{major_ver}/config/
83 end
84 end
85
86 packages
87 package %{name}
88 # Define python-abi manually.
89 provides
90 python-abi = %{major_ver}
91 end
92 end
93
94 package %{name}-devel
95 template DEVEL
96
97 files += \
98 !%{libdir}/python*/config/Makefile \
99 !%{includedir}/python*/pyconfig.h
100 end
101
102 package %{name}-debuginfo
103 template DEBUGINFO
104 end
105 end