~svn/ubuntu/raring/subversion/ppa

« back to all changes in this revision

Viewing changes to build/copy-swig-py.sh

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-12-05 01:26:14 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051205012614-qom4xfypgtsqc2xq
Tags: 1.2.3dfsg1-3ubuntu1
Merge with the final Debian release of 1.2.3dfsg1-3, bringing in
fixes to the clean target, better documentation of the libdb4.3
upgrade and build fixes to work with swig1.3_1.3.27.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
# copy-swig-py.sh: copy the Python bindings' .py files to the install locn
 
4
#
 
5
# USAGE: copy-swig-py.sh PYTHON INSTALL SOURCE_DIR TARGET_DIR DESTDIR
 
6
#
 
7
 
 
8
if test "$#" != 5; then
 
9
  echo USAGE: $0 PYTHON INSTALL SOURCE_DIR TARGET_DIR DESTDIR
 
10
fi
 
11
 
 
12
pyprog="$1"
 
13
install="$2"
 
14
srcdir="$3"
 
15
instdir="$4"
 
16
destdir="$5"
 
17
 
 
18
# cd to the source directory so that we can get filenames rather than paths
 
19
cd "$srcdir"
 
20
 
 
21
# copy all the .py files to the target location
 
22
for file in *.py; do
 
23
  $install "$file" "${destdir}${instdir}/${file}"
 
24
done
 
25
 
 
26
# precompile all of the files
 
27
"$pyprog" -c "import compileall; compileall.compile_dir(\"${destdir}${instdir}\",1,\"${instdir}\")"