Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
slapos.buildout
Commits
1f5193f5
Commit
1f5193f5
authored
Jun 04, 2007
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated for DZUG.
parent
8f81a311
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
64 deletions
+78
-64
doc/tutorial.txt
doc/tutorial.txt
+78
-64
No files found.
doc/tutorial.txt
View file @
1f5193f5
...
...
@@ -10,7 +10,7 @@ Introduction to zc.buildout
Jim Fulton, Zope Corporation
PyCon
2007
DZUG
2007
What is zc.buildout?
====================
...
...
@@ -125,7 +125,7 @@ Working with eggs
I often switch between develop and non-develop eggs. I may be
using a regular egg and realize I need to fix it. I checkout the
eggs project into my buildout and tell buildout to treat it as a
egg
'
s project into my buildout and tell buildout to treat it as a
develop egg. It creates the egg link in develop eggs and will
load the develop egg in preference to the non-develop egg.
...
...
@@ -161,23 +161,6 @@ zc.buildout current status
- A number of "recipes" available
- Error reporting needs **a lot** of improvement
.. class:: handout
This will be a focus in the coming weeks.
- Need a way to record versions used for repeatability
.. class:: handout
A benefit of using eggs is that dependencies are installed
automatically. To make buildouts repeatable, we need a way to
capture the versions used in development, so we can include them
in a buildout specification that we can check in. Of course, we
can do this manually today, but it needs to be automated.
A Python Egg Primer
===================
...
...
@@ -193,7 +176,7 @@ Eggs are simple!
- dependencies
- entry point
- entry point
s
- May be distributed as source distributions
...
...
@@ -204,7 +187,6 @@ Eggs are simple!
source distributions are more convenient to distribute in a lot
of ways.
- Automatic discovery through PyPI
Egg jargon
...
...
@@ -346,7 +328,7 @@ Buildout overview
.. class:: handout
If a part is removed from a specification,
or
is uninstalled.
If a part is removed from a specification,
it
is uninstalled.
If a part's recipe or configuration changes, it is uninstalled
and reinstalled.
...
...
@@ -483,9 +465,9 @@ zope.event buildout.cfg
eggs = zope.event
The zc.recipe.testrunnner recipe has an eggs option for specifying
which eggs should
be tested. The generated test script will load these eggs along
with their dependencies.
The zc.recipe.testrunnner recipe has an eggs option for specifying
which eggs should be tested. The generated test script will load
these eggs along
with their dependencies.
For more information on the ``zc.recipe.testrunner`` recipe, see
http://www.python.org/pypi/zc.recipe.testrunner.
...
...
@@ -521,7 +503,7 @@ Buildout steps
::
bin/buildout setup . egg_info -r sdist register upload
bin/buildout setup . egg_info -r
bdev
sdist register upload
.. class:: handout
...
...
@@ -547,7 +529,10 @@ Buildout steps
The egg_info command allows control of egg meta-data. The -r
option to the egg_info command causes the distribution to have a
version number that includes the subversion revision number of
the project. This is useful when making development releases.
the project. The -b option specified a revision tag. Here we
specified a revision tag of "dev", which marks the release as a
devlopment release. These are useful when making development
releases.
Exercise 1
===========
...
...
@@ -736,27 +721,7 @@ Polished ``setup.py`` (1/3)
def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
name='zope.event'
setup(
name=name,
version='3.3.0',
url='http://www.python.org/pypi/'+name,
license='ZPL 2.1',
description='Zope Event Publication',
author='Zope Corporation and Contributors',
author_email='zope3-dev@zope.org',
.. class:: handout
In the polished version we flesh out the meta data a bit more.
Polished ``setup.py`` (2/3)
===========================
.. code-block:: Python
long_description=(
long_description=(
read('README.txt')
+ '\n' +
'Detailed Documentation\n'
...
...
@@ -766,26 +731,41 @@ Polished ``setup.py`` (2/3)
+ '\n' +
'Download\n'
'**********************\n'
),
)
open('documentation.txt', 'w').write(long_description)
.. class:: handout
When I create distributions that I consider ready for broader use
and upload to PyPI, I like to include the full documentation in the
long description so PyPI serves it for me.
In the polished version we flesh out the meta data a bit more.
Polished ``setup.py`` (3/3)
When I create distributions that I consider ready for broader use and
upload to PyPI, I like to include the full documentation in the long
description so PyPI serves it for me.
Polished ``setup.py`` (2/3)
===========================
.. code-block:: Python
.. code-block:: Python
packages=find_packages('src'),
package_dir = {'': 'src'},
namespace_packages=['zope',],
include_package_data = True,
install_requires=['setuptools'],
zip_safe = False,
)
name='zope.event'
setup(
name=name,
version='3.3.0',
url='http://www.python.org/pypi/'+name,
license='ZPL 2.1',
description='Zope Event Publication',
author='Zope Corporation and Contributors',
author_email='zope3-dev@zope.org',
long_description=long_description,
packages=find_packages('src'),
package_dir = {'': 'src'},
namespace_packages=['zope',],
include_package_data = True,
install_requires=['setuptools'],
zip_safe = False,
)
Extras
======
...
...
@@ -823,8 +803,7 @@ Extras
depenencies. A package may provide other optional features that
cause other dependencies. For example, the zcml module in
zope.component adds lots of depenencies that we don't want to
impose on people that don't use it.
impose on people that don't use it.
``zc.recipe.egg``
=================
...
...
@@ -971,6 +950,7 @@ Custom egg building
find-links = http://www.python.org/other/spread/
include-dirs = ${spreadtoolkit:location}/include
library-dirs = ${spreadtoolkit:location}/lib
rpath = ${spreadtoolkit:location}/lib
.. class:: handout
...
...
@@ -1478,10 +1458,16 @@ RPM experiments
Initial work creating RPMs for deployment in our hosting environment:
- Separation of software and configuration
- Buildout used to create rpm containing software
- Later, the installed buildout is used to set up specific processes
- Run as root in offline mode
- Uses network configuration server
.. class:: handout
Our philosophy is to separate software and configuration. We
...
...
@@ -1640,7 +1626,35 @@ ZRS spec file (3/3)
We specify the files to be installed. This is just the buildout
directory and a configuration script.
Repeatability
=============
We want to be able to check certtain configuration into svn that can
be checked out and reproduced.
- We let buildout tell is what versions it picked for distributions
- Run with -v
- Look for outout lines of form:
::
Picked: foo = 1.2
- Include a versions section:
::
[buildout]
...
versions = myversions
[myversions]
foo = 1.2
...
Deployment issues
=================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment