]> git.pld-linux.org Git - packages/pypy.git/blob - pypy.spec
abd5310999979854e3c88266e6437366c0cc7fa9
[packages/pypy.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:        2
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 URL:            http://pypy.org
24 BuildRequires:  libffi-devel
25 BuildRequires:  ncurses-devel
26 BuildRequires:  openssl-devel
27 BuildRequires:  python-devel-tools
28 BuildRequires:  rpm-pythonprov
29 %if %{with bootstrap}
30 BuildRequires:  python-modules
31 %else
32 BuildRequires:  pypy
33 %endif
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %define pypy_libdir %{_libdir}/%{name}-%{version}
37
38 %description
39 PyPy is a fast, compliant alternative implementation of the Python
40 language (2.7.1). It has several advantages and distinct features:
41
42 - Speed: thanks to its Just-in-Time compiler, Python programs often
43   run faster on PyPy. (What is a JIT compiler?)
44 - Memory usage: large, memory-hungry Python programs might end up
45   taking less space than they do in CPython.
46 - Compatibility: PyPy is highly compatible with existing python code.
47   It supports ctypes and can run popular python libraries like twisted
48   and django.
49 - Sandboxing: PyPy provides the ability to run untrusted code in a
50   fully secure way.
51 - Stackless: PyPy can be configured to run in stackless mode,
52   providing micro-threads for massive concurrency.
53 - As well as other features.
54
55 %prep
56 # %setup -q -n %{name}-%{name}-release-%{version}
57 %setup -q -n %{name}-%{name}-341e1e3821ff
58 %patch0 -p1
59 # %patch1 -p1
60
61 %build
62
63 cd pypy/translator/goal
64 CC="%{__cc}" \
65 CFLAGS="%{rpmcflags}" \
66 LDFLAGS="%{rpmldflags}" \
67 %{__python} translate.py -Ojit --make-jobs=1
68 cd ../../..
69
70 %if %{with tests}
71 pypy/translator/goal/pypy-c ./pytest.py
72 %endif
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76
77 install -d $RPM_BUILD_ROOT{%{pypy_libdir},%{_bindir}}
78
79 cp -R ctypes_configure demo dotviewer include lib_pypy lib-python py pypy \
80         site-packages $RPM_BUILD_ROOT%{pypy_libdir}
81
82 rm -rf  $RPM_BUILD_ROOT%{pypy_libdir}/pypy/doc \
83         $RPM_BUILD_ROOT%{pypy_libdir}/pypy/translator/goal/*.bat \
84         $RPM_BUILD_ROOT%{pypy_libdir}/pypy/translator/goal/test2 \
85         $RPM_BUILD_ROOT%{pypy_libdir}/pypy/translator/goal/win32 \
86         $RPM_BUILD_ROOT%{pypy_libdir}/site-packages/README
87
88 # do not require other python in installed scripts
89 find $RPM_BUILD_ROOT%{pypy_libdir} -name '*.py' | xargs \
90         sed -i -r -e'1s@^#! ?(/usr/bin/env python|/usr(/local)?/bin/python)@#!%{_bindir}/pypy@'
91
92 ln -s %{pypy_libdir}/pypy/translator/goal/pypy-c $RPM_BUILD_ROOT%{_bindir}/pypy
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %files
98 %defattr(644,root,root,755)
99 %doc README LICENSE pypy/doc
100 %attr(755,root,root) %{_bindir}/pypy
101 %dir %{pypy_libdir}
102 %{pypy_libdir}/ctypes_configure
103 %{pypy_libdir}/demo
104 %{pypy_libdir}/dotviewer
105 %{pypy_libdir}/include
106 %{pypy_libdir}/lib-python
107 %{pypy_libdir}/lib_pypy
108 %{pypy_libdir}/py
109 %dir %{pypy_libdir}/pypy
110 %{pypy_libdir}/pypy/_cache
111 %{pypy_libdir}/pypy/annotation
112 %{pypy_libdir}/pypy/bin
113 %{pypy_libdir}/pypy/config
114 %{pypy_libdir}/pypy/interpreter
115 %{pypy_libdir}/pypy/jit
116 %{pypy_libdir}/pypy/module
117 %{pypy_libdir}/pypy/objspace
118 %{pypy_libdir}/pypy/rlib
119 %{pypy_libdir}/pypy/rpython
120 %{pypy_libdir}/pypy/tool
121 %dir %{pypy_libdir}/pypy/translator
122 %{pypy_libdir}/pypy/translator/backendopt
123 %{pypy_libdir}/pypy/translator/c
124 %{pypy_libdir}/pypy/translator/cli
125 %dir %{pypy_libdir}/pypy/translator/goal
126 %{pypy_libdir}/pypy/translator/goal/*.py
127 %{pypy_libdir}/pypy/translator/goal/*.pyc
128 %attr(755,root,root) %{pypy_libdir}/pypy/translator/goal/pypy-c
129 %{pypy_libdir}/pypy/translator/jvm
130 %{pypy_libdir}/pypy/translator/llsupport
131 %{pypy_libdir}/pypy/translator/microbench
132 %{pypy_libdir}/pypy/translator/oosupport
133 %{pypy_libdir}/pypy/translator/platform
134 %{pypy_libdir}/pypy/translator/sandbox
135 %{pypy_libdir}/pypy/translator/test
136 %{pypy_libdir}/pypy/translator/tool
137 %{pypy_libdir}/pypy/translator/*.py
138 %{pypy_libdir}/pypy/translator/*.pyc
139 %{pypy_libdir}/pypy/translator/goal/launch-bench-cronjob.sh
140 %{pypy_libdir}/pypy/*.py
141 %{pypy_libdir}/pypy/*.pyc
142 %{pypy_libdir}/pypy/*.cfg
143 %dir %{pypy_libdir}/site-packages
This page took 0.059657 seconds and 2 git commands to generate.