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

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: Final update with merge against current naclports.py Created 6 years, 8 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
« no previous file with comments | « ports/python_modules/matplotlib/modules.list ('k') | ports/python_modules/matplotlib/pkg_info » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2531255
52 --- /dev/null
53 +++ b/setup.cfg
54 @@ -0,0 +1,84 @@
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 +webagg = False
125 +
126 +[rc_options]
127 +# User-configurable options
128 +#
129 +# Default backend, one of: Agg, Cairo, CocoaAgg, GTK, GTKAgg, GTKCairo,
130 +# FltkAgg, MacOSX, Pdf, Ps, QtAgg, Qt4Agg, SVG, TkAgg, WX, WXAgg.
131 +#
132 +# The Agg, Ps, Pdf and SVG backends do not require external
133 +# dependencies. Do not choose GTK, GTKAgg, GTKCairo, MacOSX, or TkAgg
134 +# if you have disabled the relevent extension modules. Agg will be used
135 +# by default.
136 +#
137 +backend = Agg
138 +#
139 diff --git a/setupext.py b/setupext.py
140 index 4e304d9..53e72ba 100644
141 --- a/setupext.py
142 +++ b/setupext.py
143 @@ -60,10 +60,12 @@ options = {
144 'basedirlist': None
145 }
146
147 -
148 +defaults = {}
149 +if os.environ.get("NACL_BUILD_TREE") is not None:
150 + defaults["basedirlist"] = os.environ["NACL_BUILD_TREE"]
151 setup_cfg = os.environ.get('MPLSETUPCFG', 'setup.cfg')
152 if os.path.exists(setup_cfg):
153 - config = configparser.SafeConfigParser()
154 + config = configparser.SafeConfigParser(defaults)
155 config.read(setup_cfg)
156
157 try:
158 @@ -1064,7 +1066,8 @@ class Tornado(SetupPackage):
159 return "using tornado version %s" % tornado.version
160
161 def get_install_requires(self):
162 - return ['tornado']
163 + # Manually force *not* to require tornado.
164 + return []
165
166
167 class Pyparsing(SetupPackage):
OLDNEW
« no previous file with comments | « ports/python_modules/matplotlib/modules.list ('k') | ports/python_modules/matplotlib/pkg_info » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698