当前位置: 首页>>代码示例>>Python>>正文


Python PthDistributions.add方法代码示例

本文整理汇总了Python中setuptools.command.easy_install.PthDistributions.add方法的典型用法代码示例。如果您正苦于以下问题:Python PthDistributions.add方法的具体用法?Python PthDistributions.add怎么用?Python PthDistributions.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在setuptools.command.easy_install.PthDistributions的用法示例。


在下文中一共展示了PthDistributions.add方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_add_from_cwd_site_sets_dirty

# 需要导入模块: from setuptools.command.easy_install import PthDistributions [as 别名]
# 或者: from setuptools.command.easy_install.PthDistributions import add [as 别名]
 def test_add_from_cwd_site_sets_dirty(self):
     '''a pth file manager should set dirty
     if a distribution is in site but also the cwd
     '''
     pth = PthDistributions('does-not_exist', [os.getcwd()])
     self.assertTrue(not pth.dirty)
     pth.add(PRDistribution(os.getcwd()))
     self.assertTrue(pth.dirty)
开发者ID:Ansen,项目名称:openshift-xmpptalk-ircbindxmpp-bundle,代码行数:10,代码来源:test_easy_install.py

示例2: test_add_from_site_is_ignored

# 需要导入模块: from setuptools.command.easy_install import PthDistributions [as 别名]
# 或者: from setuptools.command.easy_install.PthDistributions import add [as 别名]
 def test_add_from_site_is_ignored(self):
     location = '/test/location/does-not-have-to-exist'
     # PthDistributions expects all locations to be normalized
     location = pkg_resources.normalize_path(location)
     pth = PthDistributions('does-not_exist', [location, ])
     assert not pth.dirty
     pth.add(PRDistribution(location))
     assert not pth.dirty
开发者ID:17264138,项目名称:IndividualProject,代码行数:10,代码来源:test_easy_install.py

示例3: test_add_from_cwd_site_sets_dirty

# 需要导入模块: from setuptools.command.easy_install import PthDistributions [as 别名]
# 或者: from setuptools.command.easy_install.PthDistributions import add [as 别名]
 def test_add_from_cwd_site_sets_dirty(self):
     """a pth file manager should set dirty
     if a distribution is in site but also the cwd
     """
     pth = PthDistributions("does-not_exist", [os.getcwd()])
     self.assert_(not pth.dirty)
     pth.add(PRDistribution(os.getcwd()))
     self.assert_(pth.dirty)
开发者ID:JJJJunior,项目名称:Research,代码行数:10,代码来源:test_easy_install.py

示例4: test_add_from_site_is_ignored

# 需要导入模块: from setuptools.command.easy_install import PthDistributions [as 别名]
# 或者: from setuptools.command.easy_install.PthDistributions import add [as 别名]
 def test_add_from_site_is_ignored(self):
     if os.name != 'nt':
         location = '/test/location/does-not-have-to-exist'
     else:
         location = 'c:\\does_not_exist'
     pth = PthDistributions('does-not_exist', [location, ])
     self.assertTrue(not pth.dirty)
     pth.add(PRDistribution(location))
     self.assertTrue(not pth.dirty)
开发者ID:Ansen,项目名称:openshift-xmpptalk-ircbindxmpp-bundle,代码行数:11,代码来源:test_easy_install.py

示例5: test_add_from_site_is_ignored

# 需要导入模块: from setuptools.command.easy_install import PthDistributions [as 别名]
# 或者: from setuptools.command.easy_install.PthDistributions import add [as 别名]
 def test_add_from_site_is_ignored(self):
     if os.name != "nt":
         location = "/test/location/does-not-have-to-exist"
     else:
         location = "c:\\does_not_exist"
     pth = PthDistributions("does-not_exist", [location])
     self.assert_(not pth.dirty)
     pth.add(PRDistribution(location))
     self.assert_(not pth.dirty)
开发者ID:JJJJunior,项目名称:Research,代码行数:11,代码来源:test_easy_install.py

示例6: len

# 需要导入模块: from setuptools.command.easy_install import PthDistributions [as 别名]
# 或者: from setuptools.command.easy_install.PthDistributions import add [as 别名]
#[email protected]@

import sys

from setuptools.command.easy_install import PthDistributions
from pkg_resources import find_distributions

usage = "@[email protected] [ register | unregister ] egg\n"

if len(sys.argv) != 3 or sys.argv[1] not in ("register", "unregister"):
	sys.stderr.write(usage)
	sys.exit(1)

pth = PthDistributions("@[email protected]/easy-install.pth")
distrib = find_distributions(sys.argv[2], True).next()
if sys.argv[1] == "register":
	pth.add(distrib)
elif sys.argv[1] == "unregister":
	pth.remove(distrib)
pth.save()
开发者ID:EliseuTorres,项目名称:pkgsrc,代码行数:22,代码来源:manage-eggs.py

示例7: test_add_from_site_is_ignored

# 需要导入模块: from setuptools.command.easy_install import PthDistributions [as 别名]
# 或者: from setuptools.command.easy_install.PthDistributions import add [as 别名]
 def test_add_from_site_is_ignored(self):
     pth = PthDistributions('does-not_exist', ['/test/location/does-not-have-to-exist'])
     self.assert_(not pth.dirty)
     pth.add(PRDistribution('/test/location/does-not-have-to-exist'))
     self.assert_(not pth.dirty)
开发者ID:runt18,项目名称:jython-plugin,代码行数:7,代码来源:test_easy_install.py


注:本文中的setuptools.command.easy_install.PthDistributions.add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。