• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Releasing and deploying python tools
 

Releasing and deploying python tools

on

  • 2,852 views

zest.releaser, zest.stabilizer, collective.dist, zc.sourcerelease, collective.releaser

zest.releaser, zest.stabilizer, collective.dist, zc.sourcerelease, collective.releaser

Statistics

Views

Total Views
2,852
Views on SlideShare
2,840
Embed Views
12

Actions

Likes
3
Downloads
18
Comments
0

4 Embeds 12

http://plug.org.ua 5
http://www.slideshare.net 4
http://www.plug.org.ua 2
http://ploneua.quintagroup.com 1

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Releasing and deploying python tools Releasing and deploying python tools Presentation Transcript

    • Releasing and deploying python tools Andriy Mylenkyy © Quintagroup, 2009
    • Plan
      • Introduction
      • zest.releaser
      • zest.stabilizer
      • collective.dist
      • zc.sourcerelease
      • collective.releaser
    • Problem & Purposes
      • Problem:
      • A lot of routing work with svn
      • Routing with product release
      • Different buildout configurations
    • zest.releaser
      • Summary: (for 1.1.3 ver.) package releasing made easy
      • Updates the version number either in setup.py or in version.txt.
      • Updates the history/changes file
      • Tags the release in svn
      • Uploads a source release to pypi
      • Commands:
      • prereleas
      • release
      • postrelease
      • fullrelease
      • Aspects:
      • Must be version.txt or setup.py
      • Ask for creating tags directory (if absent)
      • Interactive mode
      • Work with any branches (not only trunk)
      zest.releaser (2)
    • zest.stabilizer
      • Summary: (for 1.2.2 version)
      • Move the trunk checkouts in your development buildout to tag checkouts in your production buildout.
      • Requirements:
      • unstable.cfg, stable.cfg
      • expects "ourpackages" parts in unstable.cfg
      • Packages in ourpackages must be checked out in appropriate directory
    • zest.stabilizer (2)
      • Installation as any python package:
      • easy_install zest.stabilizer
      • Commands:
      • stabilize
      • ZestSkel paster template
      • http://tgz.zestsoftware.nl/eggs/ZestSkel-0.6.tar.gz
    • collective.dist
      • Summary: Distutils commands to upload files to several servers
      • Extend distutils with 2 commands:
        • mupload
        • mregister
      • Configured with ~/.pypirc
      • Added to standard python-2.6 distribution
    • collective.dist (2) [distutils] index-servers= pypi plone.org pypi-personal [pypi] username:user password:pswd [plone.org] repository:http://plone.org/products username:ploneuser password:pswd [pypi-personal] username:user2 password: .pypirc
    • collective.dist (3)
      • Several pypi servers configurations
      • -r option point to repository
      • If no password present
      • deal with several profiles on PyPI itself
      $ python setup.py mregister sdist mupload $ python setup.py mregister sdist mupload -r plone.org
    • zc.sourcerelease
      • Summary: create source releases from buildouts
      • buildout-source-release – script generates a source release from a buildout
      • create gzipped tar archive
      • includes data from download cache, eggs
      • release includes a install.py script
      • For file://... - full path
    • zc.sourcerelease (2) test.buildout/ |-- README.txt |-- bootstrap.py |-- buildout.cfg `-- products `-- README.txt ... $ buildout-source-release file:// tmp/test.buildout buildout.cfg ... $ ls . ... test.buildout.tgz $ buildout-source-release http:// svn/test.buildout production.cfg -n production.buildout ... $ls . production.buildout.tgz
    • zc.sourcereleas (3) test.buildout ... |-- buildout.cfg |-- eggs | |-- setuptools-0.6c9-py2.4.egg | |-- EGG-INFO ... | | `-- site.pyc | `-- zc.buildout-1.2.1-py2.4.egg | |-- EGG-INFO ... |-- install.py |-- products | `-- README.txt `-- release-distributions `-- dist |-- infrae.subversion-1.4.5.tar.gz |-- py-0.9.2.zip `-- zc.buildout-1.2.1.tar.gz
    • collective.releaser
      • Summary: make it easier to release and deploy zc.buildout/subversion based projects
      • new setuptools commands:
      • release; build_mo
      • console scripts:
      • project_release; project_deploy; project_md5; project_copy_eggs; project_svn_prepare
      • hook to launch actions when a package is released (default: sends an email)
      • paste template: releaser_project
    • collective.releaser. (2) Project structure
      • releaser_project paster template.
      $ paster create -t releaser_project my_project $ svn import my_project http://some.svn/my_project -m "initial commit" /buildout /packages /bundles /releases /buildbot /docs /root /1.0 /2.0 /egg.1 /egg.2 /buildout.cfg /Extermals.txt /Prod.tgz
      • In packages dir:
      • Create package (with paster create)
      • package_svn_prepare <new.pack>
        • prepare svn structure
        • checkin to project/packages
      • Mailing support
      • In <new.pack>/setup.cfg
      collective.releaser (3) Packages
    • collective.releaser (4) Releasing eggs
      • release in package dir:
      • python setup.py release
        • run tests before releasing
        • upgrading the setup.py version
        • creating a branch and a tag in svn
        • pushing the package to the various PyPI-like servers
        • sending a mail with the changes, if the mail_hook section was provided in setup.cfg
    • collective.releaser (5) Releasing project
      • release in package dir:
      • project_release
        • run from buildout directory
        • copy buildout to releases/<ver> in
        • Add version.txt in releases/<ver> for pinging eggs versions.
      • project_deploy
        • Take buildout configuration file as param
        • build a tarball
        • buildout can be reinstalled offline
    • collective.releaser (7) Upgrading buildout
      • project_eggs in buildout dir:
      • Usefull for upgrade eggs in project