@@ -143,9 +143,9 @@ def get_base_dirs():
143
143
return options ['basedirlist' ]
144
144
145
145
basedir_map = {
146
- 'win32' : ['win32_static' , ],
146
+ 'win32' : ['win32_static' ],
147
147
'darwin' : ['/usr/local/' , '/usr' , '/usr/X11' , '/opt/local' ],
148
- 'sunos5' : [os .getenv ('MPLIB_BASE' ) or '/usr/local' , ],
148
+ 'sunos5' : [os .getenv ('MPLIB_BASE' ) or '/usr/local' ],
149
149
'gnu0' : ['/usr' ],
150
150
'aix5' : ['/usr/local' ],
151
151
}
@@ -588,8 +588,7 @@ def get_py_modules(self):
588
588
589
589
def get_package_data (self ):
590
590
return {
591
- 'matplotlib' :
592
- [
591
+ 'matplotlib' : [
593
592
'mpl-data/fonts/afm/*.afm' ,
594
593
'mpl-data/fonts/pdfcorefonts/*.afm' ,
595
594
'mpl-data/fonts/pdfcorefonts/*.txt' ,
@@ -610,8 +609,9 @@ def get_package_data(self):
610
609
'backends/web_backend/jquery/css/themes/base/*.*' ,
611
610
'backends/web_backend/jquery/css/themes/base/images/*' ,
612
611
'backends/web_backend/css/*.*' ,
613
- 'backends/Matplotlib.nib/*'
614
- ]}
612
+ 'backends/Matplotlib.nib/*' ,
613
+ ],
614
+ }
615
615
616
616
617
617
class SampleData (OptionalPackage ):
@@ -707,8 +707,8 @@ def check(self):
707
707
708
708
ext = make_extension ('test' , [])
709
709
ext .include_dirs .append (numpy .get_include ())
710
- if not has_include_file (
711
- ext . include_dirs , os .path .join ("numpy" , "arrayobject.h" )):
710
+ if not has_include_file (ext . include_dirs ,
711
+ os .path .join ("numpy" , "arrayobject.h" )):
712
712
raise CheckFailed (
713
713
"The C headers for numpy could not be found. You"
714
714
"may need to install the development package." )
@@ -768,12 +768,12 @@ def check(self):
768
768
def add_flags (self , ext ):
769
769
if self .found_external and not 'sdist' in sys .argv :
770
770
support_dir = os .path .normpath (
771
- os .path .join (
772
- sys .prefix ,
773
- 'share' ,
774
- 'python%d.%d' % (
775
- sys . version_info [ 0 ], sys . version_info [ 1 ]),
776
- 'CXX' ) )
771
+ os .path .join (
772
+ sys .prefix ,
773
+ 'share' ,
774
+ 'python%d.%d' % (sys . version_info [ 0 ], sys . version_info [ 1 ]),
775
+ 'CXX' )
776
+ )
777
777
if not os .path .exists (support_dir ):
778
778
# On Fedora 17, these files are installed in /usr/share/CXX
779
779
support_dir = '/usr/src/CXX'
@@ -1197,7 +1197,7 @@ def parse_tcl_config(self, tcl_lib_dir, tk_lib_dir):
1197
1197
"/usr/lib/tcl" + str (Tkinter .TclVersion ),
1198
1198
"/usr/lib" ]
1199
1199
tk_poss = [tk_lib_dir ,
1200
- os .path .normpath (os .path .join (tk_lib_dir , '..' )),
1200
+ os .path .normpath (os .path .join (tk_lib_dir , '..' )),
1201
1201
"/usr/lib/tk" + str (Tkinter .TkVersion ),
1202
1202
"/usr/lib" ]
1203
1203
for ptcl , ptk in zip (tcl_poss , tk_poss ):
@@ -1265,9 +1265,9 @@ def guess_tcl_config(self, tcl_lib_dir, tk_lib_dir, tk_ver):
1265
1265
1266
1266
if not os .path .exists (tcl_inc ):
1267
1267
# this is a hack for suse linux, which is broken
1268
- if ( sys .platform .startswith ('linux' ) and
1269
- os .path .exists ('/usr/include/tcl.h' ) and
1270
- os .path .exists ('/usr/include/tk.h' )):
1268
+ if all ([ sys .platform .startswith ('linux' ),
1269
+ os .path .exists ('/usr/include/tcl.h' ),
1270
+ os .path .exists ('/usr/include/tk.h' )] ):
1271
1271
tcl_inc = '/usr/include'
1272
1272
tk_inc = '/usr/include'
1273
1273
@@ -1469,9 +1469,9 @@ def getoutput(s):
1469
1469
(flag .startswith ('-l' ) or flag .startswith ('-L' ))])
1470
1470
1471
1471
# visual studio doesn't need the math library
1472
- if ( sys .platform == 'win32' and
1473
- win32_compiler == 'msvc' and
1474
- 'm' in ext .libraries ):
1472
+ if all ([ sys .platform == 'win32' ,
1473
+ win32_compiler == 'msvc' ,
1474
+ 'm' in ext .libraries ] ):
1475
1475
ext .libraries .remove ('m' )
1476
1476
1477
1477
elif sys .platform != 'win32' :
0 commit comments