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


Python upload_docs.USER_SITE屬性代碼示例

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


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

示例1: setUp

# 需要導入模塊: from setuptools.command.upload_docs import upload_docs [as 別名]
# 或者: from setuptools.command.upload_docs.upload_docs import USER_SITE [as 別名]
def setUp(self):
        self.dir = tempfile.mkdtemp()
        setup = os.path.join(self.dir, 'setup.py')
        f = open(setup, 'w')
        f.write(SETUP_PY)
        f.close()
        self.old_cwd = os.getcwd()
        os.chdir(self.dir)

        self.upload_dir = os.path.join(self.dir, 'build')
        os.mkdir(self.upload_dir)

        # A test document.
        f = open(os.path.join(self.upload_dir, 'index.html'), 'w')
        f.write("Hello world.")
        f.close()

        # An empty folder.
        os.mkdir(os.path.join(self.upload_dir, 'empty'))

        if sys.version >= "2.6":
            self.old_base = site.USER_BASE
            site.USER_BASE = upload_docs.USER_BASE = tempfile.mkdtemp()
            self.old_site = site.USER_SITE
            site.USER_SITE = upload_docs.USER_SITE = tempfile.mkdtemp() 
開發者ID:sugarguo,項目名稱:Flask_Blog,代碼行數:27,代碼來源:test_upload_docs.py

示例2: tearDown

# 需要導入模塊: from setuptools.command.upload_docs import upload_docs [as 別名]
# 或者: from setuptools.command.upload_docs.upload_docs import USER_SITE [as 別名]
def tearDown(self):
        os.chdir(self.old_cwd)
        shutil.rmtree(self.dir)
        if sys.version >= "2.6":
            shutil.rmtree(site.USER_BASE)
            shutil.rmtree(site.USER_SITE)
            site.USER_BASE = self.old_base
            site.USER_SITE = self.old_site 
開發者ID:sugarguo,項目名稱:Flask_Blog,代碼行數:10,代碼來源:test_upload_docs.py


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