Ejemplo n.º 1
0
    def package_index_wiki(self):
        """Return Package Index page in Wiki format"""
        installed_tools = [('SciTE', '3.3.7')]

        def get_tool_path(relpath, checkfunc):
            if self.simulation:
                for dirname in self.toolsdirs:
                    path = dirname + relpath.replace(r'\tools', '')
                    if checkfunc(path):
                        return path
            else:
                path = self.winpydir + relpath
                if checkfunc(path):
                    return path
        gccpath = get_tool_path(self.MINGW32_PATH, osp.isdir)
        if gccpath is not None:
            gccver = utils.get_gcc_version(gccpath)
            installed_tools += [('MinGW32', gccver)]

        rpath = get_tool_path(self.R_PATH, osp.isdir)
        if rpath is not None:
            rver = utils.get_r_version(rpath)
            installed_tools += [('R', rver)]

        juliapath = get_tool_path(self.JULIA_PATH, osp.isdir)
        if juliapath is not None:
            juliaver = utils.get_julia_version(juliapath)
            installed_tools += [('Julia', juliaver)]

        tools = []
        for name, ver in installed_tools:
            metadata = wppm.get_package_metadata('tools.ini', name)
            url, desc = metadata['url'], metadata['description']
            tools += ['[%s](%s) | %s | %s' % (name, url, ver, desc)]
        packages = ['[%s](%s) | %s | %s'
                    % (pack.name, pack.url, pack.version, pack.description)
                    for pack in sorted(self.installed_packages,
                                       key=lambda p: p.name.lower())]
        python_desc = 'Python programming language with standard library'
        return """## WinPython %s

The following packages are included in WinPython v%s%s.

### Tools

Name | Version | Description
-----|---------|------------
%s

### Python packages

Name | Version | Description
-----|---------|------------
[Python](http://www.python.org/) | %s | %s
%s""" % (self.winpyver, self.winpyver, self.flavor, '\n'.join(tools),
         self.python_fullversion, python_desc, '\n'.join(packages))
Ejemplo n.º 2
0
    def package_index_wiki(self):
        """Return Package Index page in Wiki format"""
        installed_tools = [('gettext', '0.14.4'), ('SciTE', '3.3.7')]

        def get_tool_path(relpath, checkfunc):
            if self.simulation:
                for dirname in self.toolsdirs:
                    path = dirname + relpath.replace(r'\tools', '')
                    if checkfunc(path):
                        return path
            else:
                path = self.winpydir + relpath
                if checkfunc(path):
                    return path

        thgpath = get_tool_path(self.THG_PATH, osp.isfile)
        if thgpath is not None:
            thgver = utils.get_thg_version(osp.dirname(thgpath))
            installed_tools += [('TortoiseHg', thgver)]
        if get_tool_path(self.WINMERGE_PATH, osp.isfile) is not None:
            installed_tools += [('WinMerge', '2.12.4')]
        gccpath = get_tool_path(self.MINGW32_PATH, osp.isdir)
        if gccpath is not None:
            gccver = utils.get_gcc_version(gccpath)
            installed_tools += [('MinGW32', gccver)]
        tools = []
        for name, ver in installed_tools:
            metadata = wppm.get_package_metadata('tools.ini', name)
            url, desc = metadata['url'], metadata['description']
            tools += ['|| [%s %s] || %s || %s ||' % (url, name, ver, desc)]
        packages = [
            '|| [%s %s] || %s || %s ||' %
            (pack.url, pack.name, pack.version, pack.description)
            for pack in sorted(self.installed_packages,
                               key=lambda p: p.name.lower())
        ]
        python_desc = 'Python programming language with standard library'
        return """== WinPython %s ==

The following packages are included in WinPython v%s.

=== Tools ===

%s

=== Python packages ===

|| [http://www.python.org/ Python] || %s || %s ||

%s""" % (self.winpyver, self.winpyver, '\n'.join(tools),
         self.python_fullversion, python_desc, '\n'.join(packages))
Ejemplo n.º 3
0
    def package_index_wiki(self):
        """Return Package Index page in Wiki format"""
        installed_tools = [('gettext', '0.14.4'), ('SciTE', '3.3.7')]        
        def get_tool_path(relpath, checkfunc):
            if self.simulation:
                for dirname in self.toolsdirs:
                    path = dirname + relpath.replace(r'\tools', '')
                    if checkfunc(path):
                        return path
            else:
                path = self.winpydir + relpath
                if checkfunc(path):
                    return path
        thgpath = get_tool_path(self.THG_PATH, osp.isfile)
        if thgpath is not None:
            thgver = utils.get_thg_version(osp.dirname(thgpath))
            installed_tools += [('TortoiseHg', thgver)]
        if get_tool_path(self.WINMERGE_PATH, osp.isfile) is not None:
            installed_tools += [('WinMerge', '2.12.4')]
        gccpath = get_tool_path(self.MINGW32_PATH, osp.isdir)
        if gccpath is not None:
            gccver = utils.get_gcc_version(gccpath)
            installed_tools += [('MinGW32', gccver)]
        tools = []
        for name, ver in installed_tools:
            metadata = wppm.get_package_metadata('tools.ini', name)
            url, desc = metadata['url'], metadata['description']
            tools += ['|| [%s %s] || %s || %s ||' % (url, name, ver, desc)]
        packages = ['|| [%s %s] || %s || %s ||'
                    % (pack.url, pack.name, pack.version, pack.description)
                    for pack in sorted(self.installed_packages,
                                       key=lambda p: p.name.lower())]
        python_desc = 'Python programming language with standard library'
        return """== WinPython %s ==

The following packages are included in WinPython v%s.

=== Tools ===

%s

=== Python packages ===

|| [http://www.python.org/ Python] || %s || %s ||

%s""" % (self.winpyver, self.winpyver, '\n'.join(tools),
         self.python_fullversion, python_desc, '\n'.join(packages))
Ejemplo n.º 4
0
    def package_index_wiki(self):
        """Return Package Index page in Wiki format"""
        installed_tools = []

        def get_tool_path(relpath, checkfunc):
            if self.simulation:
                for dirname in self.toolsdirs:
                    path = dirname + relpath.replace(r"\tools", "")
                    if checkfunc(path):
                        return path
            else:
                path = self.winpydir + relpath
                if checkfunc(path):
                    return path

        if get_tool_path(r"\tools\SciTE.exe", osp.isfile):
            installed_tools += [("SciTE", "3.3.7")]

        gccpath = get_tool_path(self.MINGW32_PATH, osp.isdir)
        if gccpath is not None:
            gccver = utils.get_gcc_version(gccpath)
            installed_tools += [("MinGW32", gccver)]

        rpath = get_tool_path(self.R_PATH, osp.isdir)
        if rpath is not None:
            rver = utils.get_r_version(rpath)
            installed_tools += [("R", rver)]

        juliapath = get_tool_path(self.JULIA_PATH, osp.isdir)
        if juliapath is not None:
            juliaver = utils.get_julia_version(juliapath)
            installed_tools += [("Julia", juliaver)]

        pandocexe = get_tool_path(r"\tools\pandoc.exe", osp.isfile)
        if pandocexe is not None:
            pandocver = utils.get_pandoc_version(osp.dirname(pandocexe))
            installed_tools += [("Pandoc", pandocver)]

        tools = []
        for name, ver in installed_tools:
            metadata = wppm.get_package_metadata("tools.ini", name)
            url, desc = metadata["url"], metadata["description"]
            tools += ["[%s](%s) | %s | %s" % (name, url, ver, desc)]

        # get all packages installed in the changelog, whatever the method
        self.installed_packages = []
        self.installed_packages = self.distribution.get_installed_packages()

        packages = [
            "[%s](%s) | %s | %s" % (pack.name, pack.url, pack.version, pack.description)
            for pack in sorted(self.installed_packages, key=lambda p: p.name.lower())
        ]
        python_desc = "Python programming language with standard library"
        return """## WinPython %s 

The following packages are included in WinPython v%s%s.

### Tools

Name | Version | Description
-----|---------|------------
%s

### Python packages

Name | Version | Description
-----|---------|------------
[Python](http://www.python.org/) | %s | %s
%s""" % (
            self.winpyver2 + self.flavor,
            self.winpyver2 + self.flavor,
            (" %s" % self.release_level),
            "\n".join(tools),
            self.python_fullversion,
            python_desc,
            "\n".join(packages),
        )