[Happydoc-checkins] CVS: HappyDoc/happydoclib happydocset.py,1.11,1.12
Brought to you by:
doughellmann,
krlosaqp
From: Doug H. <dou...@us...> - 2002-11-16 19:50:18
|
Update of /cvsroot/happydoc/HappyDoc/happydoclib In directory usw-pr-cvs1:/tmp/cvs-serv31614/happydoclib Modified Files: happydocset.py Log Message: Get the README file for a package from the first name in the package contents list. If the name is a directory, use the directory. If it is a file, use the parent directory of the file. Index: happydocset.py =================================================================== RCS file: /cvsroot/happydoc/HappyDoc/happydoclib/happydocset.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** happydocset.py 8 Oct 2002 13:03:37 -0000 1.11 --- happydocset.py 16 Nov 2002 19:50:14 -0000 1.12 *************** *** 453,466 **** description_dir = '.' if self._contained_names: first_name = self._contained_names[0] ! if happydoclib.path.isdir(first_name): description_dir = first_name elif happydoclib.path.exists(first_name): description_dir = happydoclib.path.dirname(first_name) description_filename = happydoclib.path.join( description_dir, self._description_filename ) ! self.statusMessage('Looking for docset description in %s' % \ ! description_filename, 3) description_file = self.getExternalDocumentationFile(description_filename) --- 453,472 ---- description_dir = '.' if self._contained_names: + happydoclib.TRACE.writeVar(contained_names=self._contained_names) first_name = self._contained_names[0] ! if (len(self._contained_names) == 1 ! and ! happydoclib.path.isdir(first_name) ! ): ! happydoclib.TRACE.write('Taking description dir from first name') description_dir = first_name elif happydoclib.path.exists(first_name): + happydoclib.TRACE.write('Taking description dir from directory of first name') description_dir = happydoclib.path.dirname(first_name) description_filename = happydoclib.path.join( description_dir, self._description_filename ) ! self.statusMessage('Looking for docset description for %s in %s' % \ ! (name, description_filename), 3) description_file = self.getExternalDocumentationFile(description_filename) *************** *** 649,653 **** files.append(f) return files ! def processFiles(self, fileNames, --- 655,664 ---- files.append(f) return files ! ! def hasContents(self): ! """Returns boolean indicating whether the directory contains anything interesting. ! """ ! return len(self._contained_names) ! def processFiles(self, fileNames, *************** *** 695,699 **** # init_file = happydoclib.path.join( file_name, '__init__.py' ) ! if happydoclib.path.exists( init_file ) and self._use_packages: self.statusMessage('Detected package %s' % file_name, 2 ) happydoclib.TRACE.write('Detected package %s' % file_name) --- 706,711 ---- # init_file = happydoclib.path.join( file_name, '__init__.py' ) ! #if happydoclib.path.exists( init_file ) and self._use_packages: ! if self._use_packages: self.statusMessage('Detected package %s' % file_name, 2 ) happydoclib.TRACE.write('Detected package %s' % file_name) |