#17 Check NeedsCompilation for arch dependence if available.
Merged 9 days ago by pingou. Opened a year ago by qulogic.
qulogic/r2spec needs-compilation  into  master

file modified
+12 -4

@@ -92,11 +92,19 @@ 

      def determine_arch(self):

          """ Determine if the package is arch or noarch by looking at the

          sources.

-         Set arch to True if the package is arch dependant.

+         Set arch to True if the package is arch dependent.

          Set arch to False if the package is noarch.

          Let arch to None if could not determine.

          """

-         self.log.info('Determining if the package is arch dependant or not')

+         self.log.info('Determining if the package is arch dependent or not')

+         try:

+             self.arch = self.description['NeedsCompilation'].lower() != 'no'

+         except KeyError:

+             pass

+         else:

+             self.log.info('Package is %sarch dependent',

+                           '' if self.arch else 'not ')

+             return

          extensions = ['c', 'C', 'cp', 'cpp', 'h', 'H',]

          if os.path.exists(self.name):

              for root, dirs, files in os.walk(self.name):

@@ -107,10 +115,10 @@ 

                                  or 'f' in extension \

                                  or 'F' in extension:

                              self.arch = True

-                             self.log.info('Package is arch dependant')

+                             self.log.info('Package is arch dependent')

                              return

              self.arch = False

-             self.log.info('Package is not arch dependant')

+             self.log.info('Package is not arch dependent')

              return

          else:

              self.log.info(

no initial comment

rebased onto 400a368

18 days ago

rebased onto ae63caa

18 days ago

rebased onto 48eea90

10 days ago

Rebased on #16 for quicker merge.

rebased onto a609dfb

9 days ago

Pull-Request has been merged by pingou

9 days ago
Metadata