]> git.pld-linux.org Git - SPECS.git/blob - pypy.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / pypy.spec
1 # TODO:
2 # - Reviow commented patch
3 # - Chack why libffi-static needed ? Now there is only libffi-devel
4
5 # Conditional build:
6 %bcond_with     tests           # do perform tests
7 %bcond_with     bootstrap       # use Python2 instead of PyPy
8
9 %if %{without bootstrap}
10 %define __python pypy
11 %endif
12
13 Summary:        PyPy - a fast, alternative implementation of the Python language
14 Name:           pypy
15 Version:        1.9
16 Release:        6
17 License:        distributable
18 Group:          Development/Languages/Python
19 Source0:        https://bitbucket.org/pypy/pypy/get/release-%{version}.tar.bz2
20 # Source0-md5:  f92c0171a9578a3e4a0f74947ec596ab
21 Patch0:         %{name}-curses.patch
22 Patch1:         %{name}-cldflags.patch
23 Patch2:         006-always-log-stdout.patch
24 Patch3:         007-remove-startup-message.patch
25 Patch4:         008-fix-dynamic-symbols-script.patch
26 Patch5:         pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch
27 URL:            http://pypy.org
28 BuildRequires:  libffi-devel
29 BuildRequires:  ncurses-devel
30 BuildRequires:  openssl-devel
31 BuildRequires:  python-devel-tools
32 BuildRequires:  rpm-pythonprov
33 %if %{with bootstrap}
34 BuildRequires:  python-modules
35 %else
36 BuildRequires:  pypy
37 %endif
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %define pypy_libdir %{_libdir}/%{name}-%{version}
41
42 %description
43 PyPy is a fast, compliant alternative implementation of the Python
44 language (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
60 # %setup -q -n %{name}-%{name}-release-%{version}
61 %setup -q -n %{name}-%{name}-341e1e3821ff
62 %patch0 -p1
63 # %patch1 -p1
64 %patch2 -p1
65 %patch3 -p1
66 %patch4 -p1
67 %patch5 -p1
68
69 %build
70
71 cd pypy/translator/goal
72 CC="%{__cc}" \
73 CFLAGS="%{rpmcflags}" \
74 LDFLAGS="%{rpmldflags}" \
75 %{__python} translate.py \
76         -Ojit \
77         --make-jobs=1 \
78         --batch \
79         --gcrootfinder=shadowstack
80 cd ../../..
81
82 %if %{with tests}
83 pypy/translator/goal/pypy-c ./pytest.py
84 %endif
85
86 %install
87 rm -rf $RPM_BUILD_ROOT
88
89 install -d $RPM_BUILD_ROOT{%{pypy_libdir},%{_bindir}}
90
91 cp -R ctypes_configure demo dotviewer include lib_pypy lib-python py pypy \
92         site-packages $RPM_BUILD_ROOT%{pypy_libdir}
93
94 rm -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
101 find $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
104 ln -s %{pypy_libdir}/pypy/translator/goal/pypy-c $RPM_BUILD_ROOT%{_bindir}/pypy
105
106 %clean
107 rm -rf $RPM_BUILD_ROOT
108
109 %files
110 %defattr(644,root,root,755)
111 %doc README LICENSE pypy/doc
112 %attr(755,root,root) %{_bindir}/pypy
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
140 %attr(755,root,root) %{pypy_libdir}/pypy/translator/goal/pypy-c
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
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.220536 seconds and 3 git commands to generate.