@@ -339,7 +339,7 @@ def __iter__(self):
339339
340340 @staticmethod
341341 def check_configuration (option , value ):
342- return True if configuration .get (option ) == value else None
342+ return True if value in configuration .get (option , []) else None
343343
344344 def initialize_options (self ):
345345 self .disable_platform_guessing = self .check_configuration (
@@ -354,7 +354,7 @@ def initialize_options(self):
354354 setattr (self , f"vendor_{ x } " , self .check_configuration (x , "vendor" ))
355355 if self .check_configuration ("debug" , "true" ):
356356 self .debug = True
357- self .parallel = configuration .get ("parallel" )
357+ self .parallel = configuration .get ("parallel" , [ None ])[ - 1 ]
358358
359359 def finalize_options (self ):
360360 build_ext .finalize_options (self )
@@ -402,9 +402,6 @@ def finalize_options(self):
402402 raise ValueError (msg )
403403 _dbg ("Using vendored version of %s" , x )
404404 self .feature .vendor .add (x )
405- if x == "raqm" :
406- _dbg ("--vendor-raqm implies --enable-raqm" )
407- self .feature .required .add (x )
408405
409406 def _update_extension (self , name , libraries , define_macros = None , sources = None ):
410407 for extension in self .extensions :
@@ -1004,11 +1001,7 @@ def debug_build():
10041001# parse configuration from _custom_build/backend.py
10051002while len (sys .argv [1 ]) >= 2 and sys .argv [1 ].startswith ("--pillow-configuration=" ):
10061003 _ , key , value = sys .argv [1 ].split ("=" , 2 )
1007- old = configuration .get (key )
1008- if old is not None :
1009- msg = f"Conflicting options: '-C { key } ={ old } ' and '-C { key } ={ value } '"
1010- raise ValueError (msg )
1011- configuration [key ] = value
1004+ configuration .setdefault (key , []).append (value )
10121005 del sys .argv [1 ]
10131006
10141007try :
0 commit comments