]> git.pld-linux.org Git - packages/pypy.git/blame - pypy.spec
- rel 5; some sane patches from FC; set gcrootfinder to be shadowstack which is suppo...
[packages/pypy.git] / pypy.spec
CommitLineData
cd5c7a23
MK
1# TODO:
2# - Reviow commented patch
5bcb8431 3# - Chack why libffi-static needed ? Now there is only libffi-devel
cd5c7a23 4
d5e52ae4 5# Conditional build:
8eee9219 6%bcond_with tests # do perform tests
879c193f 7%bcond_with bootstrap # use Python2 instead of PyPy
d5e52ae4
JK
8
9%if %{without bootstrap}
10%define __python pypy
11%endif
12
13Summary: PyPy - a fast, alternative implementation of the Python language
14Name: pypy
cd5c7a23 15Version: 1.9
d928d70a 16Release: 5
d5e52ae4
JK
17License: distributable
18Group: Development/Languages/Python
868e0e21 19Source0: https://bitbucket.org/pypy/pypy/get/release-%{version}.tar.bz2
cd5c7a23 20# Source0-md5: f92c0171a9578a3e4a0f74947ec596ab
9cf3b6ee 21Patch0: %{name}-curses.patch
92ff825a 22Patch1: %{name}-cldflags.patch
d928d70a
AM
23Patch2: 006-always-log-stdout.patch
24Patch3: 007-remove-startup-message.patch
25Patch4: 008-fix-dynamic-symbols-script.patch
26Patch5: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch
d5e52ae4 27URL: http://pypy.org
5bcb8431 28BuildRequires: libffi-devel
d32f720c
MK
29BuildRequires: ncurses-devel
30BuildRequires: openssl-devel
868e0e21 31BuildRequires: python-devel-tools
32BuildRequires: rpm-pythonprov
d5e52ae4
JK
33%if %{with bootstrap}
34BuildRequires: python-modules
35%else
879c193f 36BuildRequires: pypy
d5e52ae4
JK
37%endif
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
8eee9219
JK
40%define pypy_libdir %{_libdir}/%{name}-%{version}
41
d5e52ae4
JK
42%description
43PyPy is a fast, compliant alternative implementation of the Python
44language (2.7.1). It has several advantages and distinct features:
45
46- Speed: thanks to its Just-in-Time compiler, Python programs often
47 run faster on PyPy. (What is a JIT compiler?)
48- Memory usage: large, memory-hungry Python programs might end up
49 taking less space than they do in CPython.
50- Compatibility: PyPy is highly compatible with existing python code.
51 It supports ctypes and can run popular python libraries like twisted
52 and django.
53- Sandboxing: PyPy provides the ability to run untrusted code in a
54 fully secure way.
55- Stackless: PyPy can be configured to run in stackless mode,
56 providing micro-threads for massive concurrency.
57- As well as other features.
58
59%prep
cd5c7a23
MK
60# %setup -q -n %{name}-%{name}-release-%{version}
61%setup -q -n %{name}-%{name}-341e1e3821ff
9cf3b6ee 62%patch0 -p1
cd5c7a23 63# %patch1 -p1
d928d70a
AM
64%patch2 -p1
65%patch3 -p1
66%patch4 -p1
67%patch5 -p1
d5e52ae4
JK
68
69%build
cd5c7a23 70
d5e52ae4
JK
71cd pypy/translator/goal
72CC="%{__cc}" \
73CFLAGS="%{rpmcflags}" \
92ff825a 74LDFLAGS="%{rpmldflags}" \
d928d70a
AM
75%{__python} translate.py \
76 -Ojit \
77 --make-jobs=1 \
78 --batch \
79 --gcrootfinder=shadowstack
8eee9219
JK
80cd ../../..
81
82%if %{with tests}
83pypy/translator/goal/pypy-c ./pytest.py
84%endif
d5e52ae4
JK
85
86%install
87rm -rf $RPM_BUILD_ROOT
88
8eee9219
JK
89install -d $RPM_BUILD_ROOT{%{pypy_libdir},%{_bindir}}
90
91cp -R ctypes_configure demo dotviewer include lib_pypy lib-python py pypy \
92 site-packages $RPM_BUILD_ROOT%{pypy_libdir}
93
94rm -rf $RPM_BUILD_ROOT%{pypy_libdir}/pypy/doc \
95 $RPM_BUILD_ROOT%{pypy_libdir}/pypy/translator/goal/*.bat \
96 $RPM_BUILD_ROOT%{pypy_libdir}/pypy/translator/goal/test2 \
97 $RPM_BUILD_ROOT%{pypy_libdir}/pypy/translator/goal/win32 \
98 $RPM_BUILD_ROOT%{pypy_libdir}/site-packages/README
99
100# do not require other python in installed scripts
101find $RPM_BUILD_ROOT%{pypy_libdir} -name '*.py' | xargs \
102 sed -i -r -e'1s@^#! ?(/usr/bin/env python|/usr(/local)?/bin/python)@#!%{_bindir}/pypy@'
103
104ln -s %{pypy_libdir}/pypy/translator/goal/pypy-c $RPM_BUILD_ROOT%{_bindir}/pypy
105
d5e52ae4
JK
106%clean
107rm -rf $RPM_BUILD_ROOT
108
109%files
110%defattr(644,root,root,755)
8eee9219 111%doc README LICENSE pypy/doc
d9d48c2c 112%attr(755,root,root) %{_bindir}/pypy
8eee9219
JK
113%dir %{pypy_libdir}
114%{pypy_libdir}/ctypes_configure
115%{pypy_libdir}/demo
116%{pypy_libdir}/dotviewer
117%{pypy_libdir}/include
118%{pypy_libdir}/lib-python
119%{pypy_libdir}/lib_pypy
120%{pypy_libdir}/py
121%dir %{pypy_libdir}/pypy
122%{pypy_libdir}/pypy/_cache
123%{pypy_libdir}/pypy/annotation
124%{pypy_libdir}/pypy/bin
125%{pypy_libdir}/pypy/config
126%{pypy_libdir}/pypy/interpreter
127%{pypy_libdir}/pypy/jit
128%{pypy_libdir}/pypy/module
129%{pypy_libdir}/pypy/objspace
130%{pypy_libdir}/pypy/rlib
131%{pypy_libdir}/pypy/rpython
132%{pypy_libdir}/pypy/tool
133%dir %{pypy_libdir}/pypy/translator
134%{pypy_libdir}/pypy/translator/backendopt
135%{pypy_libdir}/pypy/translator/c
136%{pypy_libdir}/pypy/translator/cli
137%dir %{pypy_libdir}/pypy/translator/goal
138%{pypy_libdir}/pypy/translator/goal/*.py
139%{pypy_libdir}/pypy/translator/goal/*.pyc
6c5c8f95 140%attr(755,root,root) %{pypy_libdir}/pypy/translator/goal/pypy-c
8eee9219
JK
141%{pypy_libdir}/pypy/translator/jvm
142%{pypy_libdir}/pypy/translator/llsupport
143%{pypy_libdir}/pypy/translator/microbench
144%{pypy_libdir}/pypy/translator/oosupport
145%{pypy_libdir}/pypy/translator/platform
146%{pypy_libdir}/pypy/translator/sandbox
8eee9219
JK
147%{pypy_libdir}/pypy/translator/test
148%{pypy_libdir}/pypy/translator/tool
149%{pypy_libdir}/pypy/translator/*.py
150%{pypy_libdir}/pypy/translator/*.pyc
151%{pypy_libdir}/pypy/translator/goal/launch-bench-cronjob.sh
152%{pypy_libdir}/pypy/*.py
153%{pypy_libdir}/pypy/*.pyc
154%{pypy_libdir}/pypy/*.cfg
155%dir %{pypy_libdir}/site-packages
This page took 0.08335 seconds and 4 git commands to generate.