summaryrefslogtreecommitdiff
path: root/eggs/zc.buildout-1.5.2-py2.6.egg/zc/buildout/windows.txt
diff options
context:
space:
mode:
Diffstat (limited to 'eggs/zc.buildout-1.5.2-py2.6.egg/zc/buildout/windows.txt')
-rw-r--r--eggs/zc.buildout-1.5.2-py2.6.egg/zc/buildout/windows.txt66
1 files changed, 66 insertions, 0 deletions
diff --git a/eggs/zc.buildout-1.5.2-py2.6.egg/zc/buildout/windows.txt b/eggs/zc.buildout-1.5.2-py2.6.egg/zc/buildout/windows.txt
new file mode 100644
index 0000000..3f6b1d1
--- /dev/null
+++ b/eggs/zc.buildout-1.5.2-py2.6.egg/zc/buildout/windows.txt
@@ -0,0 +1,66 @@
+zc.buildout on MS-Windows
+=========================
+
+Certain aspects of every software project are dependent on the
+operating system used.
+The same - of course - applies to zc.buildout.
+
+To test that Windows doesn't get in the way, we'll test some system
+dependent aspects.
+The following recipe will create a read-only file which shutil.rmtree
+can't delete.
+
+ >>> mkdir('recipe')
+ >>> write('recipe', 'recipe.py',
+ ... '''
+ ... import os
+ ... class Recipe:
+ ... def __init__(self, buildout, name, options):
+ ... self.location = os.path.join(
+ ... buildout['buildout']['parts-directory'],
+ ... name)
+ ...
+ ... def install(self):
+ ... print "can't remove read only files"
+ ... if not os.path.exists (self.location):
+ ... os.makedirs (self.location)
+ ...
+ ... name = os.path.join (self.location, 'readonly.txt')
+ ... open (name, 'w').write ('this is a read only file')
+ ... os.chmod (name, 0400)
+ ... return ()
+ ...
+ ... update = install
+ ... ''')
+
+ >>> write('recipe', 'setup.py',
+ ... '''
+ ... from setuptools import setup
+ ... setup(name='spam', version='1', py_modules=['recipe'],
+ ... entry_points={'zc.buildout': ['default = recipe:Recipe']},
+ ... )
+ ... ''')
+
+ >>> write('recipe', 'README', '')
+
+ >>> print system(buildout+' setup recipe bdist_egg'), # doctest: +ELLIPSIS
+ Running setup script 'recipe/setup.py'.
+ ...
+
+and we'll configure a buildout to use it:
+
+ >>> write('buildout.cfg',
+ ... '''
+ ... [buildout]
+ ... parts = foo
+ ... find-links = %s
+ ...
+ ... [foo]
+ ... recipe = spam
+ ... ''' % join('recipe', 'dist'))
+
+ >>> print system(buildout),
+ Getting distribution for 'spam'.
+ Got spam 1.
+ Installing foo.
+ can't remove read only files