Commit ea1b8f3d authored by Jim Fulton's avatar Jim Fulton

Updated to use newer testing API to reduce clutter.

parent 25479747
...@@ -16,10 +16,10 @@ that setuptools is imported means that you can use setuptools-based ...@@ -16,10 +16,10 @@ that setuptools is imported means that you can use setuptools-based
commands, like bdist_egg even with packages that don't use setuptools. commands, like bdist_egg even with packages that don't use setuptools.
To illustrate this, we'll create a package in a sample buildout: To illustrate this, we'll create a package in a sample buildout:
>>> mkdir(sample_buildout, 'hello') >>> mkdir('hello')
>>> write(sample_buildout, 'hello', 'hello.py', 'print "Hello World!"') >>> write('hello', 'hello.py', 'print "Hello World!"')
>>> write(sample_buildout, 'hello', 'README', 'This is hello') >>> write('hello', 'README', 'This is hello')
>>> write(sample_buildout, 'hello', 'setup.py', >>> write('hello', 'setup.py',
... """ ... """
... from distutils.core import setup ... from distutils.core import setup
... setup(name="hello", ... setup(name="hello",
...@@ -32,15 +32,11 @@ To illustrate this, we'll create a package in a sample buildout: ...@@ -32,15 +32,11 @@ To illustrate this, we'll create a package in a sample buildout:
We can use the buildout command to generate the hello egg: We can use the buildout command to generate the hello egg:
>>> cd(sample_buildout) >>> print system(buildout +' setup hello -q bdist_egg'),
>>> import os
>>> print system(os.path.join('bin', 'buildout')
... +' setup hello -q bdist_egg'),
buildout: Running setup script hello/setup.py buildout: Running setup script hello/setup.py
zip_safe flag not set; analyzing archive contents... zip_safe flag not set; analyzing archive contents...
The hello directory now has a hello egg in it's dist directory: The hello directory now has a hello egg in it's dist directory:
>>> ls(sample_buildout, 'hello', 'dist') >>> ls('hello', 'dist')
- hello-1.0-py2.4.egg - hello-1.0-py2.4.egg
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment