Example #1
0
    def run(self):
        with honor_verbosity(self.distribution.verbose):
            if not self.distribution.clamp:
                raise DistutilsOptionError("Specify the modules to be built into a jar  with the 'clamp' setup keyword")

            # 1. Ensure any included jars are immediately available
            available_paths = set(sys.path)
            jar_paths = copy_included_jars(self.distribution.metadata.get_name(), self.distribution.packages)
            for path in jar_paths:
                if path not in available_paths:
                    print "Adding jar to sys.path", path
                    sys.path.append(path)  # make these jars are available

            # 2. Compile Python classes, which may depend on included jars.
            #
            # Use the underlying do_egg_install, which is invoked by
            # install.run in setuptools if it detects it is not in
            # legacy mode (using "slightly kludgy, but seems to work"
            # (!)  frame inspection logic). We want to install an egg,
            # which supports pth, not legacy-supporting .egg-info.
            self.do_egg_install()

            # 3. Building clamped jar relies on both included jars and Python classes
            build_jar(self.distribution.metadata.get_name(),
                      self.get_jar_name(), self.distribution.clamp)
Example #2
0
    def run(self):
        with honor_verbosity(self.distribution.verbose):
            if not self.distribution.clamp:
                raise DistutilsOptionError(
                    "Specify the modules to be built into a jar  with the 'clamp' setup keyword"
                )

            # 1. Ensure any included jars are immediately available
            available_paths = set(sys.path)
            jar_paths = copy_included_jars(
                self.distribution.metadata.get_name(),
                self.distribution.packages)
            for path in jar_paths:
                if path not in available_paths:
                    print "Adding jar to sys.path", path
                    sys.path.append(path)  # make these jars are available

            # 2. Compile Python classes, which may depend on included jars.
            #
            # Use the underlying do_egg_install, which is invoked by
            # install.run in setuptools if it detects it is not in
            # legacy mode (using "slightly kludgy, but seems to work"
            # (!)  frame inspection logic). We want to install an egg,
            # which supports pth, not legacy-supporting .egg-info.
            self.do_egg_install()

            # 3. Building clamped jar relies on both included jars and Python classes
            build_jar(self.distribution.metadata.get_name(),
                      self.get_jar_name(), self.distribution.clamp)
Example #3
0
 def run(self):
     with honor_verbosity(self.distribution.verbose):
         if not self.distribution.clamp:
             raise DistutilsOptionError(
                 "Specify the modules to be built into a jar  with the 'clamp' setup keyword"
             )
         build_jar(self.distribution.metadata.get_name(),
                   self.get_jar_name(), self.distribution.clamp,
                   self.output)
Example #4
0
 def run(self):
     with honor_verbosity(self.distribution.verbose):
         if not self.distribution.clamp:
             raise DistutilsOptionError("Specify the modules to be built into a jar  with the 'clamp' setup keyword")
         build_jar(self.distribution.metadata.get_name(),
                   self.get_jar_name(), self.distribution.clamp, self.output)