|
8 | 8 | """
|
9 | 9 |
|
10 | 10 | # This dict will be updated as we try to select the best option during
|
11 |
| -# the build process. However, values in setup.cfg will be used, if |
| 11 | +# the build process. However, values in setup.cfg will be used, if |
12 | 12 | # defined.
|
13 | 13 | rc = {'backend':'Agg', 'numerix':'numpy'}
|
14 | 14 |
|
|
36 | 36 |
|
37 | 37 | if major==2 and minor1<3 or major<2:
|
38 | 38 | raise SystemExit("""matplotlib requires Python 2.3 or later.""")
|
39 |
| - |
| 39 | + |
40 | 40 | import glob
|
41 | 41 | from distutils.core import setup
|
42 | 42 | from setupext import build_agg, build_gtkagg, build_tkagg, build_wxagg,\
|
|
112 | 112 | subprocess_dir = os.path.dirname(subprocess.__file__)
|
113 | 113 | if subprocess_dir.endswith('.egg/subprocess'):
|
114 | 114 | havesubprocess = False
|
115 |
| - |
| 115 | + |
116 | 116 | if not havesubprocess:
|
117 | 117 | packages.append('subprocess')
|
118 | 118 | if sys.platform == 'win32':
|
119 | 119 | build_subprocess(ext_modules, packages)
|
120 | 120 |
|
121 | 121 | if not check_for_freetype():
|
122 | 122 | sys.exit(1)
|
123 |
| - |
| 123 | + |
124 | 124 | build_ft2font(ext_modules, packages)
|
125 | 125 | build_ttconv(ext_modules, packages)
|
126 | 126 | build_contour(ext_modules, packages)
|
|
145 | 145 | build_windowing(ext_modules, packages)
|
146 | 146 |
|
147 | 147 | # the options can be True, False, or 'auto'. If True, try to build
|
148 |
| -# regardless of the lack of dependencies. If auto, silently skip |
| 148 | +# regardless of the lack of dependencies. If auto, silently skip |
149 | 149 | # when dependencies are missing.
|
150 | 150 | if options['build_tkagg']:
|
151 | 151 | if check_for_tk() or (options['build_tkagg'] is True):
|
|
188 | 188 |
|
189 | 189 | if hasdatetime: # dates require python23 datetime
|
190 | 190 | # only install pytz and dateutil if the user hasn't got them
|
191 |
| - |
| 191 | + |
192 | 192 | def add_pytz():
|
193 | 193 | packages.append('pytz')
|
194 | 194 | resources = ['zone.tab', 'locales/pytz.pot']
|
195 | 195 | # install pytz subdirs
|
196 |
| - for dirpath, dirname, filenames in os.walk(os.path.join('lib', 'pytz', |
| 196 | + for dirpath, dirname, filenames in os.walk(os.path.join('lib', 'pytz', |
197 | 197 | 'zoneinfo')):
|
198 | 198 | if '.svn' not in dirpath:
|
199 | 199 | # remove the 'lib/pytz' part of the path
|
@@ -237,12 +237,8 @@ def add_dateutil():
|
237 | 237 | print_line()
|
238 | 238 |
|
239 | 239 | # Write the default matplotlibrc file
|
240 |
| -if sys.platform=='win32': |
241 |
| - rc['backend'] = 'TkAgg' |
242 |
| - rc['numerix'] = 'numpy' |
243 |
| -else: |
244 |
| - if options['backend']: rc['backend'] = options['backend'] |
245 |
| - if options['numerix']: rc['numerix'] = options['numerix'] |
| 240 | +if options['backend']: rc['backend'] = options['backend'] |
| 241 | +if options['numerix']: rc['numerix'] = options['numerix'] |
246 | 242 | template = file('matplotlibrc.template').read()
|
247 | 243 | file('lib/matplotlib/mpl-data/matplotlibrc', 'w').write(template%rc)
|
248 | 244 |
|
|
0 commit comments