wiki:Software/ConfigManagement/CreatingSrcDistsAndEggs

Version 2 (modified by astephen, 8 years ago) (diff)

--

Creating Source Distributions and Eggs

Introduction

This page follows on from the Subversion Branch Management and Managing Python Distributions page.

Create A Source Distribution And Egg From The Tagged Version

The only thing left to do is to create a release of the source distribution and/or egg:

$ python setup.py sdist

This will create a version of the library tarred and gzipped under:

dist/cows-1.6.0-r7585.tar.gz

You can create a python egg using:

$ python setup.py bdist_egg

Which will create:

dist/cows-1.6.0_r7585-py2.6.egg

Making the distributions available

If desired the files under dist/ can be copied to the NDG repository at:

http://ndg.nerc.ac.uk/dist

Which is served from triton.badc.rl.ac.uk:/var/www/ndg_site/htdocs/dist/. From there, tools such as  Easy Install will be able to find, download and build them.

Tagging and packaging in the cows_support SVN

Note that a utility script ( see:  http://proj.badc.rl.ac.uk/cows/browser/cows_support/create_dist.sh ) is provided in the COWS-Support SVN directory that does the following:

# create_dist.sh
# ==============
#
# Simple bash script for automating the process of:
#
#   * creating a tagged version of a package
#   * adding and committing the tagged version to SVN
#   * creating a source distribution of the package
#   * creating a package egg
#
# Usage
# -----
#
#    create_dist.sh <package_name>
#