#1 Make sure to bytecompile the files and ship .pyc files (#1519238)
Merged 6 years ago by mcyprian. Opened 6 years ago by churchyard.
rpms/ churchyard/pypy bytecompile  into  master

file modified
+28 -1
@@ -2,7 +2,7 @@ 

  

  Name:           pypy

  Version:        5.9.0

- Release:        1%{?dist}

+ Release:        2%{?dist}

  Summary:        Python implementation with a Just-In-Time compiler

  

  Group:          Development/Languages
@@ -482,6 +482,30 @@ 

  

  execstack --clear-execstack %{buildroot}/%{pypyprefix}/bin/pypy

  

+ # Bytecompile all of the .py files we ship, using our pypy binary, giving us

+ # .pyc files for pypy.  The script actually does the work twice (passing in -O

+ # the second time) but it's simplest to reuse that script.

+ #

+ # The script has special-casing for .py files below

+ #    /usr/lib{64}/python[0-9].[0-9]

+ # but given that we're installing into a different path, the supplied "default"

+ # implementation gets used instead.

+ #

+ # Note that some of the test files deliberately contain syntax errors, so

+ # we pass 0 for the second argument ("errors_terminate"):

+ /usr/lib/rpm/brp-python-bytecompile \

+   %{buildroot}%{pypyprefix}/bin/%{name} \

+   0

+ 

+ %{buildroot}%{pypyprefix}/bin/%{name} -c 'import _tkinter'

+ %{buildroot}%{pypyprefix}/bin/%{name} -c 'import Tkinter'

+ %{buildroot}%{pypyprefix}/bin/%{name} -c 'import _sqlite3'

+ %{buildroot}%{pypyprefix}/bin/%{name} -c 'import _curses'

+ %{buildroot}%{pypyprefix}/bin/%{name} -c 'import curses'

+ %{buildroot}%{pypyprefix}/bin/%{name} -c 'import syslog'

+ %{buildroot}%{pypyprefix}/bin/%{name} -c 'from _sqlite3 import *'

+ 

+ 

  # Header files for C extension modules.

  # Upstream's packaging process (pypy/tool/release/package.py)

  # creates an "include" subdir and copies all *.h/*.inl from "include" there
@@ -725,6 +749,9 @@ 

  

  

  %changelog

+ * Thu Nov 30 2017 Miro Hrončok <mhroncok@redhat.com> - 5.9.0-2

+ - Make sure to bytecompile the files and ship .pyc files (#1519238)

+ 

  * Mon Oct 23 2017 Michal Cyprian <mcyprian@redhat.com> - 5.9.0-1

  - Update to 5.9.0

  

Pull-Request has been merged by mcyprian

6 years ago

Will you please backport this?

Metadata