3538 programming language. |
3538 programming language. |
3539 |
3539 |
3540 @return default extension (including the dot) (string) |
3540 @return default extension (including the dot) (string) |
3541 """ |
3541 """ |
3542 lang = self.pdata["PROGLANGUAGE"] |
3542 lang = self.pdata["PROGLANGUAGE"] |
3543 if lang == "": |
3543 if lang in ("", "Python"): |
3544 lang = "Python3" |
|
3545 elif lang == "Python": |
|
3546 lang = "Python3" |
3544 lang = "Python3" |
3547 return self.__sourceExtensions(lang)[0] |
3545 return self.__sourceExtensions(lang)[0] |
3548 |
3546 |
3549 def getProjectPath(self): |
3547 def getProjectPath(self): |
3550 """ |
3548 """ |
3794 @param group group to check (string) |
3792 @param group group to check (string) |
3795 @return flag indicating membership (boolean) |
3793 @return flag indicating membership (boolean) |
3796 """ |
3794 """ |
3797 newfn = os.path.abspath(fn) |
3795 newfn = os.path.abspath(fn) |
3798 newfn = self.getRelativePath(newfn) |
3796 newfn = self.getRelativePath(newfn) |
3799 if newfn in self.pdata[group]: |
3797 if ( |
3800 return True |
3798 newfn in self.pdata[group] or |
3801 elif ( |
3799 (group == "OTHERS" and |
3802 group == "OTHERS" and |
3800 any(newfn.startswith(entry) for entry in self.pdata[group])) |
3803 any(newfn.startswith(entry) for entry in self.pdata[group]) |
|
3804 ): |
3801 ): |
3805 return True |
3802 return True |
3806 |
3803 |
3807 if Utilities.isWindowsPlatform(): |
3804 if Utilities.isWindowsPlatform(): |
3808 # try the above case-insensitive |
3805 # try the above case-insensitive |
4721 (filetype == "PROTOCOLS" and |
4718 (filetype == "PROTOCOLS" and |
4722 fn not in self.pdata["PROTOCOLS"]) or |
4719 fn not in self.pdata["PROTOCOLS"]) or |
4723 (filetype == "RESOURCES" and |
4720 (filetype == "RESOURCES" and |
4724 fn not in self.pdata["RESOURCES"]) or |
4721 fn not in self.pdata["RESOURCES"]) or |
4725 (filetype == "OTHERS" and |
4722 (filetype == "OTHERS" and |
4726 fn not in self.pdata["OTHERS"]) |
4723 fn not in self.pdata["OTHERS"]) or |
4727 ): |
4724 (filetype == "TRANSLATIONS" and |
4728 if autoInclude and AI: |
4725 fn not in self.pdata["TRANSLATIONS"] and |
4729 self.appendFile(ns) |
4726 (fnmatch.fnmatch(ns, pattern) or |
4730 else: |
4727 fnmatch.fnmatch(ns, binpattern))) |
4731 newFiles.append(ns) |
|
4732 elif ( |
|
4733 filetype == "TRANSLATIONS" and |
|
4734 fn not in self.pdata["TRANSLATIONS"] and |
|
4735 (fnmatch.fnmatch(ns, pattern) or |
|
4736 fnmatch.fnmatch(ns, binpattern)) |
|
4737 ): |
4728 ): |
4738 if autoInclude and AI: |
4729 if autoInclude and AI: |
4739 self.appendFile(ns) |
4730 self.appendFile(ns) |
4740 else: |
4731 else: |
4741 newFiles.append(ns) |
4732 newFiles.append(ns) |