KEMBAR78
Releasing and deploying python tools | ODP
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

Releasing and deploying python tools

  • 1.
    Releasing and deploying python tools Andriy Mylenkyy © Quintagroup, 2009
  • 2.
    Plan Introduction zest.releaserzest.stabilizer collective.dist zc.sourcerelease collective.releaser
  • 3.
    Problem & PurposesProblem: A lot of routing work with svn Routing with product release Different buildout configurations
  • 4.
    zest.releaser Summary: (for1.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
  • 5.
    Commands: prereleas releasepostrelease 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)
  • 6.
    zest.stabilizer Summary: (for1.2.2 version) Move the trunk checkouts in your development buildout to tag checkouts in your production buildout. Requirements: unstable.cfg, stable.cfg expects &quot;ourpackages&quot; parts in unstable.cfg Packages in ourpackages must be checked out in appropriate directory
  • 7.
    zest.stabilizer (2) Installationas any python package: easy_install zest.stabilizer Commands: stabilize ZestSkel paster template http://tgz.zestsoftware.nl/eggs/ZestSkel-0.6.tar.gz
  • 8.
    collective.dist Summary: Distutilscommands to upload files to several servers Extend distutils with 2 commands: mupload mregister Configured with ~/.pypirc Added to standard python-2.6 distribution
  • 9.
    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
  • 10.
    collective.dist (3) Severalpypi 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
  • 11.
    zc.sourcerelease Summary: createsource 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
  • 12.
    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
  • 13.
    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
  • 14.
    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
  • 15.
    collective.releaser. (2) Projectstructure releaser_project paster template. $ paster create -t releaser_project my_project $ svn import my_project http://some.svn/my_project -m &quot;initial commit&quot; /buildout /packages /bundles /releases /buildbot /docs /root /1.0 /2.0 /egg.1 /egg.2 /buildout.cfg /Extermals.txt /Prod.tgz
  • 16.
    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
  • 17.
    collective.releaser (4) Releasingeggs 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
  • 18.
    collective.releaser (5) Releasingproject 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
  • 19.
    collective.releaser (7) Upgradingbuildout project_eggs in buildout dir: Usefull for upgrade eggs in project