コード例 #1
0
class PythonSDistPlugin:
    def __init__(self, config):
        self.config = config

        self.python_setup_py_creator = PythonSetupPyCreator(config)
        self.python_setup_cfg_creator = PythonSetupCfgCreator(config)

    def run(self):
        with TemporaryDirectory() as temp_dir:
            source_lib_path = os.path.join(os.getcwd(), "src", "lib", "python")
            LOGGER.debug("Copying from %s to %s" % (source_lib_path, temp_dir))
            copytree(source_lib_path, temp_dir)

            if os.path.exists("README"):
                shutil.copy("README", temp_dir)

            templater = ResourceInjector(temp_dir, self.config)
            templater.inject()

            self.python_setup_cfg_creator.create(temp_dir)
            self.python_setup_py_creator.create(temp_dir)

            os.chdir(temp_dir)
            subprocess.check_output([
                "python3", "setup.py", "sdist", "--dist-dir",
                self.config["project.build_path"]
            ])
コード例 #2
0
class PythonSDistPlugin:
    def __init__(self, config):
        self.config = config

        self.python_setup_py_creator = PythonSetupPyCreator(config)
        self.python_setup_cfg_creator = PythonSetupCfgCreator(config)

    def run(self):
        with TemporaryDirectory() as temp_dir:
            source_lib_path = os.path.join(os.getcwd(), "src", "lib", "python")
            LOGGER.debug("Copying from %s to %s" % (source_lib_path, temp_dir))
            copytree(source_lib_path, temp_dir)

            if os.path.exists("README"):
                shutil.copy("README", temp_dir)

            templater = ResourceInjector(temp_dir, self.config)
            templater.inject()

            self.python_setup_cfg_creator.create(temp_dir)
            self.python_setup_py_creator.create(temp_dir)

            os.chdir(temp_dir)
            subprocess.check_output(["python3", "setup.py", "sdist", "--dist-dir", self.config["project.build_path"]])
コード例 #3
0
    def __init__(self, config):
        self.config = config

        self.python_setup_py_creator = PythonSetupPyCreator(config)
        self.python_setup_cfg_creator = PythonSetupCfgCreator(config)
コード例 #4
0
    def __init__(self, config):
        self.config = config

        self.python_setup_py_creator = PythonSetupPyCreator(config)
        self.python_setup_cfg_creator = PythonSetupCfgCreator(config)