Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Plone 3.3 Site Administration

You're reading from   Plone 3.3 Site Administration Manage your site like a Plone professional

Arrow left icon
Product type Paperback
Published in Jul 2010
Publisher Packt
ISBN-13 9781847197047
Length 240 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Alex Clark Alex Clark
Author Profile Icon Alex Clark
Alex Clark
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Plone 3.3 Site Administration
Credits
Foreword
About the Author
About the Reviewer
Preface
1. Background 2. Site Basics FREE CHAPTER 3. Appearance 4. Administration 5. Deployment and Maintenance 6. Optimization 7. Security 8. The Future Index

How to install Python with Buildout


We have now arrived at the pinnacle task for this chapter—installing Python with Buildout.

From now on, we will not provide any operating system-specific instructions, but you can expect the examples in the rest of this book to work on all supported operating systems, unless otherwise stipulated.

Remember, we are still trying to satisfy the requirement of Python 2.4 across all the three operating systems.

Running the first buildout

In the code bundle for this chapter, you will find a file called 01-background-python.cfg, which contains the following:

[buildout]
parts = python-buildout

[python-buildout]
recipe = infrae.subversion
location = src
urls = http://svn.plone.org/svn/collective/buildout/python/src/ python-buildout

(If you have not done so already, download the book examples from https://www.packtpub.com/plone-3-3-site-administration/book and unzip them into your home directory.)

Change directories to the extracted buildout directory and type:

$ buildout –c 01-background-python.cfg

You should see:

$ buildout -c 01-background-python.cfg 
Got infrae.subversion 1.4.5. 
Getting distribution for 'py'. 
install_dir /Users/aclark/Developer/plone-site-admin/buildout/eggs/tmpbIk70j 
Got py 1.3.0. 
/Users/aclark/Developer/plone-site-admin/buildout/eggs/infrae.subversion-1.4.5-py2.6.egg/infrae/subversion/Common.py:4: DeprecationWarning: the sets module is deprecated 
  from sets import Set            # For python 2.3 compatibility 
Installing python-buildout.

Running the second buildout

Inside the buildout/src/python-buildout directory, there is a file called python24.cfg.

This is the buildout that will download and build Python 2.4 for us. All we need to do is run it:

$ buildout –c src/python-buildout/python24.cfg

Early on, you may encounter an error about a missing downloads directory:

While: 
  Installing python-2.4-build. 
Error: The directory: 
'/Users/aclark/Developer/plone-site-admin/buildout/src/python-buildout/downloads' 
to be used as a download cache doesn't exist.

If so, just create the directory and then re-run the buildout command.

You should see:

$ buildout -c src/python-buildout/python24.cfg 
Unused options for buildout: 'base-parts'. 
Updating opt. 
opt: Running  

Installing python-2.4-build. 
python-2.4-build: Downloading http://www.python.org/ftp/python/2.4.6/Python-2.4.6.tar.bz2 
python-2.4-build: Unpacking and configuring 
python-2.4-build: Updating environment: CFLAGS=-arch x86_64 
 
Installed /Users/aclark/Developer/plone-site-admin/buildout/src/python-buildout/python-2.4/lib/python2.4/site-packages/PIL-1.1.6-py2.4-macosx-10.6-i386.egg 
Processing dependencies for PIL==1.1.6 
Finished processing dependencies for PIL==1.1.6 
Unused options for python-2.4-PIL: 'update-command'. 
Installing python-2.4-test. 
Unused options for python-2.4-test: 'update-script'. 
$

Verify that Python works

To verify that Python works, type:

$ src/python-buildout/parts/opt/bin/python2.4

You should see:

$ src/python-buildout/parts/opt/bin/python2.4  
Python 2.4.6 (#1, May  9 2010, 02:12:47)  
[GCC 4.2.1 (Apple Inc. build 5659)] on darwin 
Type "help", "copyright", "credits" or "license" for more information. 
>>> 

At this point, we have Python 2.4.6 installed on both Ubuntu Linux and Mac OS X, and Python 2.4.4 installed on Windows.

All of our targeted operating systems now have a version of Python capable of running Plone 3.3.

In addition, we have installed a C compiler and Subversion client.

Our computers are now ready to build Plone 3.3:

That is all for this chapter, great job! It's all downhill from here.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image