Sync with pypy

This commit is contained in:
Miro Hrončok 2015-06-11 11:40:02 +02:00
parent 908d523efb
commit a7f7d048aa
1 changed files with 29 additions and 29 deletions

View File

@ -116,7 +116,7 @@ URL: http://pypy.org/
# Easy way to turn off the selftests: # Easy way to turn off the selftests:
%global run_selftests 1 %global run_selftests 1
%global pypyprefix %{_libdir}/pypy3-%{version} %global pypyprefix %{_libdir}/%{name}-%{version}
%global pylibver 3 %global pylibver 3
# We refer to this subdir of the source tree in a few places during the build: # We refer to this subdir of the source tree in a few places during the build:
@ -129,11 +129,11 @@ URL: http://pypy.org/
%(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
# Source and patches: # Source and patches:
Source0: https://bitbucket.org/pypy/pypy/downloads/pypy3-2.4.0-src.tar.bz2 Source0: https://bitbucket.org/pypy/pypy/downloads/%{name}-%{version}-src.tar.bz2
# Supply various useful RPM macros for building python modules against pypy: # Supply various useful RPM macros for building python modules against pypy:
# __pypy, pypy_sitelib, pypy_sitearch # __pypy, pypy_sitelib, pypy_sitearch
Source2: macros.pypy3 Source2: macros.%{name}
# By default, if built at a tty, the translation process renders a Mandelbrot # By default, if built at a tty, the translation process renders a Mandelbrot
# set to indicate progress. # set to indicate progress.
@ -217,7 +217,7 @@ BuildRequires: emacs
BuildRequires: git BuildRequires: git
# Metadata for the core package (the JIT build): # Metadata for the core package (the JIT build):
Requires: pypy3-libs%{?_isa} = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description %description
PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU PyPy's implementation of Python 3, featuring a Just-In-Time compiler on some CPU
@ -249,7 +249,7 @@ Libraries required by the various PyPy implementations of Python 3.
%package devel %package devel
Group: Development/Languages Group: Development/Languages
Summary: Development tools for working with PyPy3 Summary: Development tools for working with PyPy3
Requires: pypy3%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel %description devel
Header files for building C extension modules against PyPy3 Header files for building C extension modules against PyPy3
@ -259,13 +259,13 @@ Header files for building C extension modules against PyPy3
%package stackless %package stackless
Group: Development/Languages Group: Development/Languages
Summary: Stackless Python interpreter built using PyPy3 Summary: Stackless Python interpreter built using PyPy3
Requires: pypy3-libs%{?_isa} = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description stackless %description stackless
Build of PyPy3 with support for micro-threads for massive concurrency Build of PyPy3 with support for micro-threads for massive concurrency
%endif %endif
%prep %prep
%autosetup -n pypy3-2.4.0-src -p1 -S git %autosetup -n %{name}-%{version}-src -p1 -S git
# Replace /usr/local/bin/python shebangs with /usr/bin/python: # Replace /usr/local/bin/python shebangs with /usr/bin/python:
find -name "*.py" -exec \ find -name "*.py" -exec \
@ -410,7 +410,7 @@ BuildPyPy() {
} }
BuildPyPy \ BuildPyPy \
pypy3 \ %{name} \
%if 0%{with_jit} %if 0%{with_jit}
"-Ojit" \ "-Ojit" \
%else %else
@ -420,7 +420,7 @@ BuildPyPy \
%if 0%{with_stackless} %if 0%{with_stackless}
BuildPyPy \ BuildPyPy \
pypy3-stackless \ %{name}-stackless \
"--stackless" "--stackless"
%endif %endif
@ -466,10 +466,10 @@ InstallPyPy() {
mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{pypyprefix} mkdir -p %{buildroot}/%{pypyprefix}
InstallPyPy pypy3 InstallPyPy %{name}
%if 0%{with_stackless} %if 0%{with_stackless}
InstallPyPy pypy3-stackless InstallPyPy %{name}-stackless
%endif %endif
@ -572,16 +572,16 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages
# Note that some of the test files deliberately contain syntax errors, so # Note that some of the test files deliberately contain syntax errors, so
# we pass 0 for the second argument ("errors_terminate"): # we pass 0 for the second argument ("errors_terminate"):
/usr/lib/rpm/brp-python-bytecompile \ /usr/lib/rpm/brp-python-bytecompile \
%{buildroot}/%{_bindir}/pypy3 \ %{buildroot}/%{_bindir}/%{name} \
0 0
%{buildroot}/%{pypyprefix}/pypy3 -c 'import _tkinter' %{buildroot}/%{pypyprefix}/%{name} -c 'import _tkinter'
%{buildroot}/%{pypyprefix}/pypy3 -c 'import tkinter' %{buildroot}/%{pypyprefix}/%{name} -c 'import tkinter'
%{buildroot}/%{pypyprefix}/pypy3 -c 'import _sqlite3' %{buildroot}/%{pypyprefix}/%{name} -c 'import _sqlite3'
%{buildroot}/%{pypyprefix}/pypy3 -c 'import _curses' %{buildroot}/%{pypyprefix}/%{name} -c 'import _curses'
%{buildroot}/%{pypyprefix}/pypy3 -c 'import curses' %{buildroot}/%{pypyprefix}/%{name} -c 'import curses'
%{buildroot}/%{pypyprefix}/pypy3 -c 'import syslog' %{buildroot}/%{pypyprefix}/%{name} -c 'import syslog'
%{buildroot}/%{pypyprefix}/pypy3 -c 'from _sqlite3 import *' %{buildroot}/%{pypyprefix}/%{name} -c 'from _sqlite3 import *'
# Header files for C extension modules. # Header files for C extension modules.
# Upstream's packaging process (pypy/tool/release/package.py) # Upstream's packaging process (pypy/tool/release/package.py)
@ -645,8 +645,8 @@ find \
# Install the JIT trace mode for Emacs: # Install the JIT trace mode for Emacs:
%if %{with_emacs} %if %{with_emacs}
mkdir -p %{buildroot}/%{_emacs_sitelispdir} mkdir -p %{buildroot}/%{_emacs_sitelispdir}
cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.el cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/%{name}trace-mode.el
cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.elc cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/%{name}trace-mode.elc
%endif %endif
# Install macros for rpm: # Install macros for rpm:
@ -775,10 +775,10 @@ CheckPyPy() {
#pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log #pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log
%if %{run_selftests} %if %{run_selftests}
CheckPyPy pypy3 CheckPyPy %{name}
%if 0%{with_stackless} %if 0%{with_stackless}
CheckPyPy pypy3-stackless CheckPyPy %{name}-stackless
%endif %endif
%endif # run_selftests %endif # run_selftests
@ -800,26 +800,26 @@ CheckPyPy pypy3-stackless
%{pypyprefix}/lib_pypy/ %{pypyprefix}/lib_pypy/
%{pypyprefix}/site-packages/ %{pypyprefix}/site-packages/
%if %{with_emacs} %if %{with_emacs}
%{_emacs_sitelispdir}/pypy3trace-mode.el %{_emacs_sitelispdir}/%{name}trace-mode.el
%{_emacs_sitelispdir}/pypy3trace-mode.elc %{_emacs_sitelispdir}/%{name}trace-mode.elc
%endif %endif
%files %files
%license LICENSE %license LICENSE
%doc README.rst %doc README.rst
%{_bindir}/pypy3 %{_bindir}/%{name}
%{pypyprefix}/pypy3 %{pypyprefix}/%{name}
%files devel %files devel
%dir %{pypy_include_dir} %dir %{pypy_include_dir}
%{pypy_include_dir}/*.h %{pypy_include_dir}/*.h
%{_rpmconfigdir}/macros.d/macros.pypy3 %{_rpmconfigdir}/macros.d/macros.%{name}
%if 0%{with_stackless} %if 0%{with_stackless}
%files stackless %files stackless
%license LICENSE %license LICENSE
%doc README.rst %doc README.rst
%{_bindir}/pypy-stackless %{_bindir}/%{name}-stackless
%endif %endif