source: trunk/mktar @ 758

Last change on this file since 758 was 758, checked in by cito, 4 years ago

Build source distribution with setup script

Instead of building the source distribution (the tarball) manually
in mktar, we now let setup.py do the work for us.

This has the advantage that we can be sure that the created tarball
conforms to the standards (e.g. contains the egg-info bits), and we
don't need to maintain the list of source files in two places any
more - we only need to maintain the MANIFEST.in file now.

Note that setup.py creates a tar.gz file instead of .tgz as before.
We should also distribute it like that because it's the standard on
PyPI etc. I have also changed the download docs to reflect this.

  • Property svn:executable set to *
File size: 804 bytes
Line 
1#! /bin/sh
2
3VERSION=5.0
4DISTDIR=/u/pyg/files
5
6# small safety tests
7if [ ! -f pgmodule.c ]
8then
9        echo "Hmmm.  Are you sure you are in the right directory?"
10        exit 1
11fi
12if [ ! -d $DISTDIR ]
13then
14        echo "Hmmm.  Are you sure you are on the right server?"
15        exit 1
16fi
17
18if [ -f BETA ]
19then
20        VERSION=$VERSION-pre`date +"%y%m%d"`
21        PACKAGE=pygresql.pkg-beta
22        SYMLINK=PyGreSQL-beta.tgz
23else
24        PACKAGE=pygresql.pkg
25        SYMLINK=PyGreSQL.tgz
26fi
27
28# Package up as a source tarball in the distribution directory.
29
30echo "Making source tarball..."
31
32# Make sure that the documentation has been built.
33
34./mkdocs
35
36# Package as source distribution.
37
38rm -rf build dist
39
40python setup.py sdist
41
42DF=`ls dist`
43TF=$DISTDIR/$DF
44
45cp dist/$DF $TF
46chmod 644 $TF
47
48rm -f $DISTDIR/$SYMLINK
49ln -s $DF $DISTDIR/$SYMLINK
50
51echo "$TF has been built."
Note: See TracBrowser for help on using the repository browser.