本文整理汇总了Python中setuptools.command.easy_install.PthDistributions类的典型用法代码示例。如果您正苦于以下问题:Python PthDistributions类的具体用法?Python PthDistributions怎么用?Python PthDistributions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PthDistributions类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_add_from_cwd_site_sets_dirty
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,代码行数:8,代码来源:test_easy_install.py
示例2: test_add_from_site_is_ignored
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,代码行数:8,代码来源:test_easy_install.py
示例3: test_add_from_cwd_site_sets_dirty
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,代码行数:8,代码来源:test_easy_install.py
示例4: test_add_from_site_is_ignored
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,代码行数:9,代码来源:test_easy_install.py
示例5: test_add_from_site_is_ignored
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,代码行数:9,代码来源:test_easy_install.py
示例6: len
#[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,代码行数:20,代码来源:manage-eggs.py
示例7: test_add_from_site_is_ignored
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,代码行数:5,代码来源:test_easy_install.py
注:本文中的setuptools.command.easy_install.PthDistributions类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论