當前位置: 首頁>>代碼示例>>Python>>正文


Python easy_install.current_umask方法代碼示例

本文整理匯總了Python中setuptools.command.easy_install.current_umask方法的典型用法代碼示例。如果您正苦於以下問題:Python easy_install.current_umask方法的具體用法?Python easy_install.current_umask怎麽用?Python easy_install.current_umask使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在setuptools.command.easy_install的用法示例。


在下文中一共展示了easy_install.current_umask方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: write_script

# 需要導入模塊: from setuptools.command import easy_install [as 別名]
# 或者: from setuptools.command.easy_install import current_umask [as 別名]
def write_script(self, script_name, contents, mode="t", *ignored):
        """Write an executable file to the scripts directory"""
        from setuptools.command.easy_install import chmod, current_umask

        log.info("Installing %s script to %s", script_name, self.install_dir)
        target = os.path.join(self.install_dir, script_name)
        self.outfiles.append(target)

        mask = current_umask()
        if not self.dry_run:
            ensure_directory(target)
            f = open(target, "w" + mode)
            f.write(contents)
            f.close()
            chmod(target, 0o777 - mask) 
開發者ID:jpush,項目名稱:jbox,代碼行數:17,代碼來源:install_scripts.py

示例2: write_script

# 需要導入模塊: from setuptools.command import easy_install [as 別名]
# 或者: from setuptools.command.easy_install import current_umask [as 別名]
def write_script(self, script_name, contents, mode="t", *ignored):
        """Write an executable file to the scripts directory"""
        from setuptools.command.easy_install import chmod, current_umask
        log.info("Installing %s script to %s", script_name, self.install_dir)
        target = os.path.join(self.install_dir, script_name)
        self.outfiles.append(target)

        mask = current_umask()
        if not self.dry_run:
            ensure_directory(target)
            f = open(target,"w"+mode)
            f.write(contents)
            f.close()
            chmod(target, 0o777-mask) 
開發者ID:MayOneUS,項目名稱:pledgeservice,代碼行數:16,代碼來源:install_scripts.py

示例3: run

# 需要導入模塊: from setuptools.command import easy_install [as 別名]
# 或者: from setuptools.command.easy_install import current_umask [as 別名]
def run(self):
		_install.run(self)
		# set the execute bit on scripts that are NOT copied to a bin dir
		for in_place_script in in_place_scripts:
			if os.name == 'posix' and not self.dry_run:
				target = os.path.join(self.install_lib, name, in_place_script)
				log.info("Set execute bit on: "+ target)
				chmod(target, 0o777 - current_umask()) 
開發者ID:CiscoUcs,項目名稱:UcsPythonSDK,代碼行數:10,代碼來源:setup.py


注:本文中的setuptools.command.easy_install.current_umask方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。