示例#1
0
    def make(self):
        assert sys.platform != "win32", "'webdist' not implemented for win32"
        build_dir = join(self.dir, "build", "webdist")
        zip_dir = join(build_dir, "go")
        if exists(build_dir):
            sh.rm(build_dir)
        os.makedirs(zip_dir)

        # Copy the webdist bits to the build tree.
        manifest = [
            "src/trentm.com/project-info.xml",
            "src/trentm.com/index.markdown",
            "LICENSE.txt",
            "lib/go.py",
            "src/trentm.com/logo.jpg",
        ]
        for src in manifest:
            sh.cp(src, dstdir=zip_dir, log=self.log.info)

        # Zip up the webdist contents.
        dist_dir = join(self.dir, "dist")
        bit = abspath(join(dist_dir, "go-%s.web" % _get_version()))
        if exists(bit):
            os.remove(bit)
        if not exists(dist_dir):
            os.makedirs(dist_dir)
        sh.run_in_dir("zip -r %s go" % bit, build_dir, self.log.info)
示例#2
0
 def make(self):
     project_info_xml = join("src", "trentm.com", "project-info.xml")
     index_markdown = join("src", "trentm.com", "index.markdown")
     sh.run_in_dir("projinfo -f %s -R -o README.txt --force"
                   % project_info_xml, self.dir)
     sh.run_in_dir("projinfo -f %s --index-markdown -o %s --force"
                   % (project_info_xml, index_markdown), self.dir)
示例#3
0
    def make(self):
        sh.run_in_dir(
            "%spython setup.py sdist --formats zip upload" %
            _setup_command_prefix(), self.dir, self.log.debug)

        url = "http://pypi.python.org/pypi/sources/"
        import webbrowser
        webbrowser.open_new(url)
示例#4
0
    def make(self):
        sh.run_in_dir("%spython setup.py sdist --formats zip upload"
                % _setup_command_prefix(),
            self.dir, self.log.debug)

        url = "http://pypi.python.org/pypi/appdirs/"
        import webbrowser
        webbrowser.open_new(url)
示例#5
0
    def make(self):
        sh.run_in_dir(
            "%spython setup.py sdist --formats zip upload" %
            _setup_command_prefix(), self.dir, self.log.debug)

        sys.path.insert(0, join(self.dir, "lib"))
        url = "http://pypi.python.org/pypi/mk/"
        import webbrowser
        webbrowser.open_new(url)
示例#6
0
    def make(self):
        tasks = sys.platform == "win32" and "bdist_wininst upload" or "sdist --formats zip upload"
        run_in_dir("%spython setup.py %s" % (_setup_command_prefix(), tasks), self.dir, self.log.debug)

        sys.path.insert(0, join(self.dir, "lib"))
        url = "http://pypi.python.org/pypi/markdown2/"
        import webbrowser

        webbrowser.open_new(url)
示例#7
0
    def make(self):
        sh.run_in_dir("%spython setup.py sdist --formats zip upload"
                % _setup_command_prefix(),
            self.dir, self.log.debug)

        sys.path.insert(0, join(self.dir, "lib"))
        url = "http://pypi.python.org/pypi/testlib/"
        import webbrowser
        webbrowser.open_new(url)
示例#8
0
    def make(self):
        tasks = (sys.platform == "win32" and "bdist_wininst upload"
                 or "sdist --formats zip upload")
        run_in_dir("%spython setup.py %s" % (_setup_command_prefix(), tasks),
                   self.dir, self.log.debug)

        sys.path.insert(0, join(self.dir, "lib"))
        url = "http://pypi.python.org/pypi/markdown2/"
        import webbrowser
        webbrowser.open_new(url)
示例#9
0
 def make(self):
     for ver, python in self._gen_pythons():
         if ver < (2,4):
             # Don't support Python <= 2.3.
             continue
         ver_str = "%s.%s" % ver
         print "-- test with Python %s (%s)" % (ver_str, python)
         assert ' ' not in python
         sh.run_in_dir("%s test.py" % python,
                       join(self.dir, "test"))
示例#10
0
 def make(self):
     for ver, python in self._gen_pythons():
         if ver < (2, 3):
             # Don't support Python < 2.3.
             continue
         elif ver >= (3, 0):
             # Don't yet support Python 3.
             continue
         ver_str = "%s.%s" % ver
         print "-- test with Python %s (%s)" % (ver_str, python)
         assert " " not in python
         run_in_dir("%s test.py -- -knownfailure" % python, join(self.dir, "test"))
示例#11
0
 def make(self):
     for ver, python in self._gen_pythons():
         if ver < (2, 3):
             # Don't support Python < 2.3.
             continue
         elif ver >= (3, 0):
             # Don't (yet) support Python 3.
             continue
         ver_str = "%s.%s" % ver
         print "-- test with Python %s (%s)" % (ver_str, python)
         assert ' ' not in python
         sh.run_in_dir("%s test.py" % python, join(self.dir, "test"))
示例#12
0
 def make(self):
     pygments_dir = join(self.dir, "externals", "pygments")
     if exists(pygments_dir):
         run_in_dir("hg pull", pygments_dir, self.log.info)
         run_in_dir("hg update", pygments_dir, self.log.info)
     else:
         if not exists(dirname(pygments_dir)):
             os.makedirs(dirname(pygments_dir))
         run_in_dir("hg clone http://dev.pocoo.org/hg/pygments-main %s"
                     % basename(pygments_dir),
                    dirname(pygments_dir), self.log.info)
示例#13
0
 def make(self):
     pygments_dir = join(self.dir, "externals", "pygments")
     if exists(pygments_dir):
         run_in_dir("hg pull", pygments_dir, self.log.info)
         run_in_dir("hg update", pygments_dir, self.log.info)
     else:
         if not exists(dirname(pygments_dir)):
             os.makedirs(dirname(pygments_dir))
         run_in_dir(
             "hg clone http://dev.pocoo.org/hg/pygments-main %s" %
             basename(pygments_dir), dirname(pygments_dir), self.log.info)
示例#14
0
 def make(self):
     run_in_dir("rm -rf build dist", self.dir, self.log.info)
示例#15
0
 def make(self):
     sh.run_in_dir(
         "%spython setup.py sdist --formats zip" % _setup_command_prefix(),
         self.dir, self.log.debug)
示例#16
0
 def make(self):
     run_in_dir("python test.py", join(dirname(__file__), "test"))
示例#17
0
    def make(self):
        build_dir = join(self.dir, "build", "langpack")
        pkg_dir = join(self.dir, "packages")
        locale_dir = join(self.dir, "src", "chrome", "komodo", "locale")

        # Clean build dir.
        if exists(build_dir):
            sh.rm(build_dir, self.log)
        os.makedirs(build_dir)

        # Version
        ver_bits = [
            self.LANGPACK_VERSION,
            self._svnversion_from_dir(locale_dir)
        ]
        version = '.'.join([v for v in ver_bits if v])

        # Create the package contents.
        os.makedirs(join(build_dir, "chrome"))
        sh.cp(locale_dir,
              join(build_dir, "chrome", "locale"),
              recursive=True,
              log=self.log.info)
        for dirpath, dnames, fnames in os.walk(build_dir):
            if ".svn" in dnames:
                sh.rm(join(dirpath, ".svn"), self.log)
                dnames.remove(".svn")
            for fname in [".consign", "Conscript"]:
                if fname in fnames:
                    sh.rm(join(dirpath, fname), self.log)
        self._writefile(join(build_dir, "chrome.manifest"),
                        "locale komodo-langpack en-US chrome/locale/en-US/")
        self._writefile(
            join(build_dir, "install.rdf"),
            _dedent("""\
            <?xml version="1.0"?>
            
            <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                 xmlns:em="http://www.mozilla.org/2004/em-rdf#">
            
              <Description about="urn:mozilla:install-manifest">
                <em:name>Komodo Langpack</em:name>
                <em:description>Interface Langpack for Komodo</em:description>
                <em:version>%s</em:version>
                <em:id>[email protected]</em:id>
                <em:creator>ActiveState</em:creator>
                <em:type>2</em:type>

                <!-- Komodo IDE -->
                <em:targetApplication>
                  <Description>
                    <em:id>{36E66FA0-F259-11D9-850E-000D935D3368}</em:id>
                    <em:minVersion>4.0</em:minVersion>
                    <em:maxVersion>5.*</em:maxVersion>
                  </Description>
                </em:targetApplication>
                <!-- Komodo Edit -->
                <em:targetApplication>
                  <Description>
                    <em:id>{b1042fb5-9e9c-11db-b107-000d935d3368}</em:id>
                    <em:minVersion>4.0</em:minVersion>
                    <em:maxVersion>5.*</em:maxVersion>
                  </Description>
                </em:targetApplication>
            </Description>
            </RDF>
            """ % version))

        # Package it up.
        if not exists(pkg_dir):
            os.makedirs(pkg_dir)
        pkg_name = ["Komodo", "LangPack", version]
        pkg_name = '-'.join(pkg_name) + ".xpi"
        pkg_path = join(pkg_dir, pkg_name)
        sh.run_in_dir('zip -rq "%s" .' % abspath(pkg_path), build_dir,
                      self.log.info)
        self.log.info("created `%s'", pkg_path)
示例#18
0
 def get_wc(self, tmp_dir, repo_type, repo_url, repo_rev=None):
     """Get local working copy of the repo."""
     if not exists(tmp_dir):
         sh.mkdir(tmp_dir)
     wc_dir = join(tmp_dir, "wc")
     if repo_type == "hg":
         if exists(wc_dir):
             sh.run_in_dir("hg fetch", wc_dir, logstream=self.log.info)
         else:
             sh.run_in_dir("hg clone %s wc" % repo_url, tmp_dir,
                 logstream=self.log.info)
         if repo_rev:
             sh.run_in_dir("hg up %s" % repo_rev, wc_dir,
                 logstream=self.log.info)
     elif repo_type == "git":
         if exists(wc_dir):
             sh.run_in_dir("git checkout %s" % repo_rev, wc_dir,
                 logstream=self.log.info)
             sh.run_in_dir("git pull", wc_dir, logstream=self.log.info)
         else:
             sh.run_in_dir("git clone %s wc" % repo_url, tmp_dir,
                 logstream=self.log.info)
             if repo_rev:
                 sh.run_in_dir("git checkout %s" % repo_rev, wc_dir,
                     logstream=self.log.info)
示例#19
0
 def make(self):
     assert sys.platform == "win32", "can only build `gow.exe' on Windows"
     sh.run_in_dir("nmake -f Makefile.win", join("src", "dqsd"))
示例#20
0
    def make(self):
        build_dir = join(self.dir, "build", "langpack")
        pkg_dir = join(self.dir, "packages")
        locale_dir = join(self.dir, "src", "chrome", "komodo", "locale")
        
        # Clean build dir.
        if exists(build_dir):
            sh.rm(build_dir, self.log)
        os.makedirs(build_dir)
        
        # Version
        ver_bits = [self.LANGPACK_VERSION,
                    self._svnversion_from_dir(locale_dir)]
        version = '.'.join([v for v in ver_bits if v])

        # Create the package contents.
        os.makedirs(join(build_dir, "chrome"))
        sh.cp(locale_dir, join(build_dir, "chrome", "locale"),
              recursive=True,
              log=self.log.info)
        for dirpath, dnames, fnames in os.walk(build_dir):
            if ".svn" in dnames:
                sh.rm(join(dirpath, ".svn"), self.log)
                dnames.remove(".svn")
            for fname in [".consign", "Conscript"]:
                if fname in fnames:
                    sh.rm(join(dirpath, fname), self.log)
        self._writefile(join(build_dir, "chrome.manifest"),
                        "locale komodo-langpack en-US chrome/locale/en-US/")
        self._writefile(join(build_dir, "install.rdf"), _dedent("""\
            <?xml version="1.0"?>
            
            <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                 xmlns:em="http://www.mozilla.org/2004/em-rdf#">
            
              <Description about="urn:mozilla:install-manifest">
                <em:name>Komodo Langpack</em:name>
                <em:description>Interface Langpack for Komodo</em:description>
                <em:version>%s</em:version>
                <em:id>[email protected]</em:id>
                <em:creator>ActiveState</em:creator>
                <em:type>2</em:type>

                <!-- Komodo IDE -->
                <em:targetApplication>
                  <Description>
                    <em:id>{36E66FA0-F259-11D9-850E-000D935D3368}</em:id>
                    <em:minVersion>4.0</em:minVersion>
                    <em:maxVersion>5.*</em:maxVersion>
                  </Description>
                </em:targetApplication>
                <!-- Komodo Edit -->
                <em:targetApplication>
                  <Description>
                    <em:id>{b1042fb5-9e9c-11db-b107-000d935d3368}</em:id>
                    <em:minVersion>4.0</em:minVersion>
                    <em:maxVersion>5.*</em:maxVersion>
                  </Description>
                </em:targetApplication>
            </Description>
            </RDF>
            """ % version))
        
        # Package it up.
        if not exists(pkg_dir):
            os.makedirs(pkg_dir)
        pkg_name = ["Komodo", "LangPack", version]
        pkg_name = '-'.join(pkg_name) + ".xpi"
        pkg_path = join(pkg_dir, pkg_name)
        sh.run_in_dir('zip -rq "%s" .' % abspath(pkg_path), build_dir,
                      self.log.info)
        self.log.info("created `%s'", pkg_path)
示例#21
0
 def make(self):
     run_in_dir("python test.py", join(dirname(__file__), "test"))
示例#22
0
 def make(self):
     sh.run_in_dir("%spython setup.py sdist --formats zip"
                     % _setup_command_prefix(),
                   self.dir, self.log.debug)
示例#23
0
 def make(self):
     pattern = r'[0-9]\+\(\.\|, \)[0-9]\+\(\.\|, \)[0-9]\+'
     sh.run_in_dir('grep -n "%s" %s' % (pattern, ' '.join(self.sources)),
                   self.dir)
示例#24
0
 def apply_patches(self, patch_glob, dst_dir):
     self.log.info("applying patches...")
     patch_paths = sorted(glob(patch_glob))
     for path in patch_paths:
         sh.run_in_dir("patch -p1 < %s" % abspath(path), dst_dir,
             self.log.info)