This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!
Project Description

Introduction

Recipe for doing simple “python setup.py build && python setup.py install –prefix” maybe inside and with (or without) the help of an underlying minitage environment.

You can browse the code on minitage’s following resources:

minitage.recipe:fetch

Abstract

  • you need virtualenv and zc.buildout to run tests.
  • This recipe can be used to install python packages in a specific directory aLaDisutils way (python setup.py build && python setup.py install)

Specific options

Please look for options at : http://pypi.python.org/pypi/minitage.recipe.common#options-shared-by-all-the-recipes

  • site-packages : where to drop the builded python files

Specific hooks

  • pre_setup_hook : before python setup.py build dance is called
  • pre_install_hook : before python setup.py install dance is called
  • post_setup_hook : after python setup.py install dance is called

Let’s create a buildout configuration file

>>> rmdir(tempdir)
>>> mkdir(tempdir)
>>> cd(tempdir)
>>> a = [mkdir(d) for d in ('eggs', 'develop-eggs', 'bin', 'src')]
>>> install_develop_eggs(['minitage.recipe.du'])
>>> install_eggs_from_pathes(['zc.buildout'], sys.path)
>>> touch('buildout.cfg')
>>> sh('virtualenv --no-site-packages .')
virtualenv --no-site-packages .
Using real prefix '/usr'
New python executable in ./bin/python
Installing setuptools............done.
<BLANKLINE>
<BLANKLINE>
>>> sh('bin/easy_install -U zc.buildout')
bin/easy_install -U zc.buildout...
Finished processing dependencies for zc.buildout
<BLANKLINE>
<BLANKLINE>
>>> sh('bin/buildout -o bootstrap')
bin/buildout -o bootstrap...

Initializing test env.

>>> if not os.path.exists('foo'):
...     mkdir('foo')
... else:
...     rmdir(foo)
...     mkdir('foo')
>>> touch('foo/setup.py', data="""
... from setuptools import setup
... setup(name='foo', version='1.0')
...
... """)
>>> touch('foo/toto.py', data="""
... def f():
...     print "foo"
...
... """)
>>> noecho = [os.remove(d) for d in os.listdir('.') if '.tar.gz' in d]
>>> os.chdir('foo')
>>> sh('python setup.py sdist')
p...
>>> noecho = [shutil.copy(os.path.join('dist', d), os.path.join('..', d)) for d in os.listdir('dist')]
>>> os.chdir('..')

Installing “A la python setup.py install”

You can also install directly from urls. we ll use it to check the already present distribution files in the cache.

>>> data = """
... [buildout]
... parts=ez
... [ez]
... executable = ${buildout:directory}/bin/python
... recipe = minitage.recipe.du
... url = file://${buildout:directory}/foo-1.0.tar.gz
... site-packages=${buildout:directory}/myfoo
... """
>>> touch('buildout.cfg', data=data)
>>> sh('bin/buildout -vvvvvv install ez')
b...
Installing ez.
minitage.recipe: Installing python package.
minitage.recipe: Download archive
minitage.recipe: Searching cache at ...
minitage.recipe: Using cache file in /home/kiorky/.buildout/downloads/minitage/foo-1.0.tar.gz
minitage.recipe: Unpacking in /tmp/buildout.test/__minitage__ez__tmp.
minitage.recipe: Guessing compilation directory
minitage.recipe: Setting path
minitage.recipe: Setting pkgconfigpath
minitage.recipe: Setting path
minitage.recipe: Setting path
minitage.recipe: Setting compilation flags
minitage.recipe: Running "/tmp/buildout.test/bin/python" setup.py build
running build
minitage.recipe: Setting path
minitage.recipe: Running "/tmp/buildout.test/bin/python" setup.py install --install-purelib="/tmp/buildout.test/myfoo"  --install-platlib="/tmp/buildout.test/myfoo" --prefix=/tmp/buildout.test
running install
running bdist_egg
running egg_info...
Copying foo-1.0-py2.6.egg to /tmp/buildout.test/myfoo...
Installed /tmp/buildout.test/myfoo/foo-1.0-py...egg...
<BLANKLINE>

CHANGELOG

1.60 (2012-08-21)

  • fix prefix

1.58 (2012-08-21)

  • fix installation problems with multiple parts

1.35

Spllited out from minitage.recipe

Release History

Release History

1.60

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.59

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.58

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.57

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.35

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
minitage.recipe.du-1.60.zip (19.6 kB) Copy SHA256 Checksum SHA256 Source Aug 21, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting