Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install sdistmaker

How to install sdistmaker

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install sdistmaker
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.4 Available View build log
Windows (64-bit)
1.4 Available View build log
Mac OS X (10.5+)
1.4 Available View build log
Linux (32-bit)
1.4 Available View build log
Linux (64-bit)
1.4 Available View build log
 
License
BSD
Lastest release
version 1.4 on Jan 5th, 2011

sdistmaker

Create sdist tarballs from svn tags, intended for use with a company-internal svn repository. Creates sdist tarballs into a directory you can then serve with apache.

sdistmaker used to be called tha.sdistmaker before version 1.2.

Installation and basic usage

A simple easy_install sdistmaker is enough. This gives you two scripts:

  • make_sdist, mainly for test purposes. Pass it an svn tag url and a

System Message: WARNING/2 (<string>, line 17)

Bullet list ends without a blank line; unexpected unindent.

destination dir and it will make a release.

  • sdists_from_tags is the main script. It searches an svn structure for

System Message: WARNING/2 (<string>, line 20)

Bullet list ends without a blank line; unexpected unindent.

suitable tags and makes releases of them.

For starters, just run sdists_from_tags. It will create a var/private directory and fill it with (as an example!) all zest.releaser releases.

Both scripts have a --help option that show all available options and a usage instruction.

Configuration

Configuration is by means of a python file. Easiest way to get started is by printing sdistmaker's own base defaults.py by doing:

$> sdists_from_tags --print-example-defaults

Save the output as a python file (suggestion: defaults.py). You can then adapt it to your liking and use it with sdists_from_tags --defaults-file=defaults.py. The defaults file is documented in-line, so it should be easy to adapt.

Usage in a buildout

You can use sdistmaker in a buildout like this:

[buildout]

System Message: ERROR/3 (<string>, line 49)

Inconsistent literal block quoting.

parts = sdists

[sdists] recipe = zc.recipe.egg eggs = sdistmaker scripts = sdists_from_tags # arguments = # defaults_file='${buildout:directory}/defaults.py',

The defaults.py is created in the same way as above.

Using sdistmaker in combination with the real pypi

A structure like generated with sdistmaker is a perfect index for easy_install and buildout if you let apache host it. Only problem: you can only have one index (note: pip apparently supports multiple indexes). You can solve this problem by having apache redirect you to pypi when something is not found.

Here's an example apache config snippet:

# Allow indexing

System Message: ERROR/3 (<string>, line 72)

Inconsistent literal block quoting.

Options +Indexes IndexOptions FancyIndexing VersionSort

# Start of rewriterules to use our own var/private/* packages # when available and to redirect to pypi if not. RewriteEngine On # Use our robots.txt: RewriteRule ^/robots.txt - [L] # Use our apache's icons: RewriteRule ^/icons/.* - [L] # We want OUR index. Specified in a weird way as apache # searches in a weird way for index.htm index.html index.php etc. RewriteRule ^/index..* - [L]

# Use our var/private/PROJECTNAME if available, # redirect to pypi otherwise: RewriteCond /path/on/server/var/private/$1 !-f RewriteCond /path/on/server/var/private/$1 !-d RewriteRule ^/([^/]+)/?$ http://pypi.python.org/pypi/$1/ [P,L]

# Use our var/private/PROJECTNAME/project-0.1.tar.gz if available, # redirect to pypi otherwise: RewriteCond /path/on/server/var/private/$1 !-d RewriteRule ^/([^/]+)/([^/]+)$ http://pypi.python.org/pypi/$1/$2 [P,L]

Using the apache-served index

You can use such a custom apache-served index in two ways. Easy_install has a -i option for passing along an index:

$> easy_install -i http://packages.my.server/ zest.releaser

In buildout, you can set it like this:

[buildout]

System Message: ERROR/3 (<string>, line 109)

Inconsistent literal block quoting.

index = http://packages.my.server/ parts = ...

Reporting bugs

You can report bugs or feature requests at http://bitbucket.org/reinout/sdistmaker/issues/

Credits

Written by Reinout van Rees. Started while at The Health Agency, improved at Nelen & Schuurmans.

Dev-and-revision-marker fix by Wouter Vanden Hove.

TODO

  • Nothing specific at the moment.

Changelog of sdistmaker

1.4 (2010-03-19)
  • Don't crash when setup.cfg contains dev-and-revisionmarkers. [WouterVH]
1.3 (2010-03-01)
  • Added MANIFEST.in to get reliable releases with mercurial. Sorry for

System Message: WARNING/2 (<string>, line 152)

Bullet list ends without a blank line; unexpected unindent.

messing up the 1.2 release and thanks to Maurits for pushing out a quick 1.2.2.

1.2.2 (2010-02-26)
  • Fixed broken release with missing TODO.txt.
1.2.1 (2010-02-25)
  • Small documentation fixes.
1.2 (2010-02-25)
  • Renamed from tha.sdistmaker to sdistmaker.
  • Huge documentation improvement.
  • Using optparse for the scripts so that they have a better usage message.

System Message: WARNING/2 (<string>, line 176)

Bullet list ends without a blank line; unexpected unindent.

This greatly improves documentation.

  • Not showing the doctest from USAGE.txt anymore in the long description.

System Message: WARNING/2 (<string>, line 179)

Bullet list ends without a blank line; unexpected unindent.

That just wasn't readable documentation.

  • The output directory is created when missing.
1.1 (2009-12-22)
  • Documentation update.
1.0 (2009-12-21)
  • Setup.py cleanup.
0.4 (2009-11-09)
  • Replacing base and base_on_server the right way around, now.
0.2 (2009-11-09)
  • Cleaning up the tempdir after we're finished with it. And cd'ing out of

System Message: WARNING/2 (<string>, line 206)

Bullet list ends without a blank line; unexpected unindent.

that dir before zapping it.

  • Using buildout's bin/python so that we get setuptools also when run on the

System Message: WARNING/2 (<string>, line 209)

Bullet list ends without a blank line; unexpected unindent.

server where there's no global setuptools. This assumes we're always run within buildout: fine with me.

0.1 (2009-11-06)
  • Added sdist_from_tags script for creating all tarballs.
  • Added make_sdist script for creating a single sdist.
  • Initial library skeleton created by thaskel.

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:5

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.