예제 #1
0
 def stage_packages(self):
     try:
         _python.get_python_command(self._python_major_version,
                                    stage_dir=self.project.stage_dir,
                                    install_dir=self.installdir)
     except _python.errors.MissingPythonCommandError:
         return super().stage_packages + self.plugin_stage_packages
     else:
         return super().stage_packages
예제 #2
0
파일: python.py 프로젝트: mvo5/snapcraft
 def stage_packages(self):
     try:
         _python.get_python_command(
             self._python_major_version,
             stage_dir=self.project.stage_dir,
             install_dir=self.installdir,
         )
     except _python.errors.MissingPythonCommandError:
         return super().stage_packages + self.plugin_stage_packages
     else:
         return super().stage_packages
예제 #3
0
    def _setup_tools_install(self, setup_file):
        command = [
            _python.get_python_command(self._python_major_version,
                                       stage_dir=self.project.stage_dir,
                                       install_dir=self.installdir),
            os.path.basename(setup_file), '--no-user-cfg', 'install',
            '--single-version-externally-managed', '--user', '--record',
            'install.txt'
        ]
        self.run(command, env=self._pip.env(), cwd=os.path.dirname(setup_file))

        # Fix all shebangs to use the in-snap python. The stuff installed from
        # pip has already been fixed, but anything done in this step has not.
        mangling.rewrite_python_shebangs(self.installdir)
예제 #4
0
파일: python.py 프로젝트: mvo5/snapcraft
    def _setup_tools_install(self, setup_file):
        command = [
            _python.get_python_command(
                self._python_major_version,
                stage_dir=self.project.stage_dir,
                install_dir=self.installdir,
            ),
            os.path.basename(setup_file),
            "--no-user-cfg",
            "install",
            "--single-version-externally-managed",
            "--user",
            "--record",
            "install.txt",
        ]
        self.run(command, env=self._pip.env(), cwd=os.path.dirname(setup_file))

        # Fix all shebangs to use the in-snap python. The stuff installed from
        # pip has already been fixed, but anything done in this step has not.
        mangling.rewrite_python_shebangs(self.installdir)