• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/python3/python3-004-old-stdlib-cache.patch
Thomas PetazzoniThomas Petazzoni committed 0d327c267a518 Feb 2014
Raw file
Source viewDiff to previous
 
1
python3: Fix pyc-only related runtime exceptions
2
​
3
Python3 changes the pyc lookup strategy, ignoring the
4
__pycache__ directory if the .py file is missing. Change
5
install location to enable use of .pyc without their parent .py
6
​
7
See http://www.python.org/dev/peps/pep-3147
8
​
9
Signed-off-by: Daniel Nelson <daniel@sigpwr.com>
10
​
11
Index: b/configure.ac
12
===================================================================
13
--- a/configure.ac
14
+++ b/configure.ac
15
@@ -349,6 +349,23 @@
16
 AC_SUBST(FRAMEWORKUNIXTOOLSPREFIX)
17
 AC_SUBST(FRAMEWORKINSTALLAPPSPREFIX)
18
 
19
+STDLIB_CACHE_FLAGS=
20
+AC_MSG_CHECKING(for --enable-old-stdlib-cache)
21
+AC_ARG_ENABLE(old-stdlib-cache,
22
+    AS_HELP_STRING([--enable-old-stdlib-cache], [enable pre-pep3147 stdlib cache]),
23
+[
24
+    if test "$enableval" = "yes"
25
+    then
26
+        STDLIB_CACHE_FLAGS="-b"
27
+    else
28
+        STDLIB_CACHE_FLAGS="" 
29
+    fi
30
+],
31
+[
32
+    STDLIB_CACHE_FLAGS="" 
33
+])
34
+AC_SUBST(STDLIB_CACHE_FLAGS)
35
+
36
 ##AC_ARG_WITH(dyld,
37
 ##            AS_HELP_STRING([--with-dyld],
38
 ##                           [Use (OpenStep|Rhapsody) dynamic linker]))
39
Index: b/Makefile.pre.in
40
===================================================================
41
--- a/Makefile.pre.in
42
+++ b/Makefile.pre.in
43
@@ -157,6 +157,9 @@
44
 # Options to enable prebinding (for fast startup prior to Mac OS X 10.3)
45
 OTHER_LIBTOOL_OPT=@OTHER_LIBTOOL_OPT@
46
 
47
+# Option to enable old-style precompiled stdlib
48
+STDLIB_CACHE_FLAGS=@STDLIB_CACHE_FLAGS@
49
+
50
 # Environment to run shared python without installed libraries
51
 RUNSHARED=       @RUNSHARED@
52
 
53
@@ -1231,21 +1234,21 @@
54
    fi
55
    -PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
56
        $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
57
-       -d $(LIBDEST) -f \
58
+       -d $(LIBDEST) -f $(STDLIB_CACHE_FLAGS) \
59
        -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
60
        $(DESTDIR)$(LIBDEST)
61
    -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
62
        $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
63
-       -d $(LIBDEST) -f \
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.