Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Side by Side Diff: ports/python_modules/matplotlib/nacl.patch

Issue 138913004: Build system for statically-linked Python. (Closed) Base URL: https://naclports.googlecode.com/svn/trunk/src
Patch Set: Responding to comments Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 diff --git a/lib/matplotlib/mpl-data/matplotlibrc b/lib/matplotlib/mpl-data/matp lotlibrc
2 index ef09a5e..41351db 100644
3 --- a/lib/matplotlib/mpl-data/matplotlibrc
4 +++ b/lib/matplotlib/mpl-data/matplotlibrc
5 @@ -29,7 +29,7 @@
6 # You can also deploy your own backend outside of matplotlib by
7 # referring to the module name (which must be in the PYTHONPATH) as
8 # 'module://my_backend'
9 -backend : qt4agg
10 +backend : Agg
11
12 # If you are using the Qt4Agg backend, you can choose here
13 # to use the PyQt4 bindings or the newer PySide bindings to
14 diff --git a/lib/matplotlib/tri/_tri.cpp b/lib/matplotlib/tri/_tri.cpp
15 index 9dd538a..8dbe107 100644
16 --- a/lib/matplotlib/tri/_tri.cpp
17 +++ b/lib/matplotlib/tri/_tri.cpp
18 @@ -2177,14 +2177,14 @@ TrapezoidMapTriFinder::Trapezoid::set_upper_right(Trapez oid* upper_right_)
19
20
21 RandomNumberGenerator::RandomNumberGenerator(unsigned long seed)
22 - : _M(21870), _A(1291), _C(4621), _seed(seed % _M)
23 + : _m(21870), _a(1291), _c(4621), _seed(seed % _m)
24 {}
25
26 unsigned long
27 RandomNumberGenerator::operator()(unsigned long max_value)
28 {
29 - _seed = (_seed*_A + _C) % _M;
30 - return (_seed*max_value) / _M;
31 + _seed = (_seed*_a + _c) % _m;
32 + return (_seed*max_value) / _m;
33 }
34
35
36 diff --git a/lib/matplotlib/tri/_tri.h b/lib/matplotlib/tri/_tri.h
37 index 3662678..c923411 100644
38 --- a/lib/matplotlib/tri/_tri.h
39 +++ b/lib/matplotlib/tri/_tri.h
40 @@ -818,7 +818,7 @@ public:
41 unsigned long operator()(unsigned long max_value);
42
43 private:
44 - const unsigned long _M, _A, _C;
45 + const unsigned long _m, _a, _c;
46 unsigned long _seed;
47 };
48
49 diff --git a/setup.cfg b/setup.cfg
50 new file mode 100644
51 index 0000000..664acf6
52 --- /dev/null
53 +++ b/setup.cfg
54 @@ -0,0 +1,83 @@
55 +# Rename this file to setup.cfg to modify matplotlib's
56 +# build options.
57 +
58 +[egg_info]
59 +
60 +[directories]
61 +# Uncomment to override the default basedir in setupext.py.
62 +# This can be a single directory or a comma-delimited list of directories.
63 +# This will be set inside setupext.py if we are inside a NaCl build.
64 +#basedirlist=%(NACLPORTS_PREFIX)s
65 +
66 +[status]
67 +# To suppress display of the dependencies and their versions
68 +# at the top of the build log, uncomment the following line:
69 +#suppress = False
70 +
71 +[packages]
72 +# There are a number of subpackages of matplotlib that are considered
73 +# optional. They are all installed by default, but they may be turned
74 +# off here.
75 +#
76 +#tests = True
77 +#sample_data = True
78 +toolkits = False
79 +
80 +[gui_support]
81 +# Matplotlib supports multiple GUI toolkits, including Cocoa,
82 +# GTK, Fltk, MacOSX, Qt, Qt4, Tk, and WX. Support for many of
83 +# these toolkits requires AGG, the Anti-Grain Geometry library,
84 +# which is provided by matplotlib and built by default.
85 +#
86 +# Some backends are written in pure Python, and others require
87 +# extension code to be compiled. By default, matplotlib checks for
88 +# these GUI toolkits during installation and, if present, compiles the
89 +# required extensions to support the toolkit.
90 +#
91 +# - GTK 2.x support of any kind requires the GTK runtime environment
92 +# headers and PyGTK.
93 +# - Tk support requires Tk development headers and Tkinter.
94 +# - Mac OSX backend requires the Cocoa headers included with XCode.
95 +# - Windowing is MS-Windows specific, and requires the "windows.h"
96 +# header.
97 +#
98 +# The other GUI toolkits do not require any extension code, and can be
99 +# used as long as the libraries are installed on your system --
100 +# therefore they are installed unconditionally.
101 +#
102 +# You can uncomment any the following lines to change this
103 +# behavior. Acceptible values are:
104 +#
105 +# True: build the extension. Exits with a warning if the
106 +# required dependencies are not available
107 +# False: do not build the extension
108 +# auto: build if the required dependencies are available,
109 +# otherwise skip silently. This is the default
110 +# behavior
111 +#
112 +agg = True
113 +cairo = False
114 +gtk = False
115 +gtk3agg = False
116 +gtk3cairo = False
117 +gtkagg = False
118 +macosx = False
119 +pyside = False
120 +qt4agg = False
121 +tkagg = False
122 +windowing = False
123 +wxagg = False
124 +
125 +[rc_options]
126 +# User-configurable options
127 +#
128 +# Default backend, one of: Agg, Cairo, CocoaAgg, GTK, GTKAgg, GTKCairo,
129 +# FltkAgg, MacOSX, Pdf, Ps, QtAgg, Qt4Agg, SVG, TkAgg, WX, WXAgg.
130 +#
131 +# The Agg, Ps, Pdf and SVG backends do not require external
132 +# dependencies. Do not choose GTK, GTKAgg, GTKCairo, MacOSX, or TkAgg
133 +# if you have disabled the relevent extension modules. Agg will be used
134 +# by default.
135 +#
136 +backend = Agg
137 +#
138 diff --git a/setupext.py b/setupext.py
139 index 4e304d9..7458873 100644
140 --- a/setupext.py
141 +++ b/setupext.py
142 @@ -60,10 +60,12 @@ options = {
143 'basedirlist': None
144 }
145
146 -
147 +defaults = {}
148 +if os.environ.get("NACL_BUILD_TREE") is not None:
149 + defaults["basedirlist"] = os.environ["NACL_BUILD_TREE"]
150 setup_cfg = os.environ.get('MPLSETUPCFG', 'setup.cfg')
151 if os.path.exists(setup_cfg):
152 - config = configparser.SafeConfigParser()
153 + config = configparser.SafeConfigParser(defaults)
154 config.read(setup_cfg)
155
156 try:
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698