source: trunk/mktar @ 686

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

Improve the script for creating the source distribution

Made some small adaptations for Sphinx and added the test package.

This should eventually be done with "setup.py sdist", but we need
to move the docs directory into the module folder to make this possible.

  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#! /bin/sh
2
3VERSION=5.0
4
5# small safety test
6if [ ! -f module/pgmodule.c ]
7then
8        echo "Hmmm.  Are you sure you are in the right directory?"
9        exit 1
10fi
11
12if [ -f BETA ]
13then
14        VERSION=$VERSION-pre`date +"%y%m%d"`
15        PACKAGE=pygresql.pkg-beta
16        SYMLINK=PyGreSQL-beta.tgz
17else
18        PACKAGE=pygresql.pkg
19        SYMLINK=PyGreSQL.tgz
20fi
21
22# Package up as a source tarball in the distribution directory.
23# Note that this does essentially the same as "python setup.py sdist",
24# except this also makes the docs and bundles them as source and html.
25
26DISTDIR=/u/pyg/files
27TD=PyGreSQL-$VERSION
28TF=$DISTDIR/$TD.tgz
29
30MODFILES="module/pg.py module/pgdb.py module/pgmodule.c
31          module/pgfs.h module/pgtypes.h module/py3c.h
32          module/setup.py module/setup.cfg"
33DOCFILES="docs/Makefile docs/make.bat docs/*.rst
34          docs/_build/html/*.html docs/_build/html/*.js
35          docs/_build/html/_static"
36TESTFILES="module/tests/*.py"
37TUTFILES="tutorial/*.py"
38
39echo "Making source tarball..."
40
41./mkdocs
42
43rm -rf $TD
44mkdir $TD
45mkdir -p $TD/docs/_static
46mkdir $TD/tests
47mkdir $TD/tutorial
48cp $MODFILES $TD
49cp -r $DOCFILES $TD/docs
50cp $TESTFILES $TD/tests
51cp $TUTFILES $TD/tutorial
52tar -cvzf $TF $TD
53chmod 644 $TF
54rm -rf $TD
55rm -f $DISTDIR/$SYMLINK
56ln -s $TD.tgz $DISTDIR/$SYMLINK
57
58echo "$TF has been built"
59
Note: See TracBrowser for help on using the repository browser.