Commit 8ff0f787 authored by SVN-Git Migration's avatar SVN-Git Migration

Imported Upstream version 1.1.0

parents
import sys
import os
import re
version_details = sys.argv[1]
input_filename = sys.argv[2]
output_filename = input_filename[:-len('.template')]
# create dictionary of branding strings
branding_info = {}
for line in file( version_details ):
line = line.strip()
if len(line) == 0:
continue
if line[0:1] == ['#']:
continue
key, value = [s.strip() for s in line.split('=',1)]
branding_info[ key ] = value
build_revision = os.popen( 'svnversion -c "%s" 2>&1' % os.environ.get( 'PYSVN_EXPORTED_FROM', '..' ), 'r' ).read().strip()
# build_revision is either a range nnn:mmm or mmm
# we only want the mmm
build_revision = build_revision.split(':')[-1]
print 'Info: revision %s' % build_revision
revision, modifiers = re.compile( '(\d+)(.*)' ).search( build_revision ).groups()
if modifiers:
branding_info['BUILD'] = '0'
else:
branding_info['BUILD'] = revision
# read all the input text
text = file( input_filename, 'r' ).read()
# and write of a branded version
file( output_filename, 'w' ).write( text % branding_info )
sys.exit(0)
@call "c:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT"
@echo on
rem figure out where we are
for %%I in ( %0\..\.. ) do set WORKDIR=%%~fI
set PY_MAJ=2
if not "%1" == "" set PY_MAJ=%1
set PY_MIN=3
if not "%2" == "" set PY_MIN=%2
rem Save CWD
pushd .
rem in development the version info can be found
rem otherwise the builder will have run it already
if exist ..\..\ReleaseEngineering\win32\software-versions.cmd call ..\..\ReleaseEngineering\win32\software-versions.cmd
set PYCXX=%WORKDIR%\Import\pycxx_%PYCXX_VER%
set OPENSSL=%BUILDROOT_DIR%\win32-%SVN_VER%\openssl-%OPENSSL_VER%
set SUBVERSION=%BUILDROOT_DIR%\win32-%SVN_VER%\subversion-%SVN_VER%
set APR=%BUILDROOT_DIR%\win32-%SVN_VER%\httpd-%HTTPD_VER%\srclib
set PY=c:\python%PY_MAJ%%PY_MIN%
set PYLIB=python%PY_MAJ%%PY_MIN%
rem Need python and DB4 on the path
PATH %PY%;%SUBVERSION%\db4-win32\bin;%SUBVERSION%\Release\subversion\svnadmin;%APR%\apr\Release;%APR%\apr-util\Release;%APR%\apr-iconv\Release;%PATH%
rem prove the python version selected
python -c "import sys;print 'Info: Python Version',sys.version"
rem restore original CWD
popd
#!/bin/echo Usage: . $0
# TARGET is set by the ReleaseEngineering scripts
if [ -z "$TARGET" ]
then
# set the ReleaseEngineering symbols in development mode
case $(uname -s) in
Darwin)
. ../../ReleaseEngineering/MacOSX/software-version.inc
;;
*)
. ../../ReleaseEngineering/unix/software-version.inc\
;;
esac
fi
export WORKDIR=$(cd ..;pwd)
# default to 2.3 if no value in $1 and $2
export PY_MAJ=${1:-2}
export PY_MIN=${2:-3}
export PYCXX=${WORKDIR}/Import/pycxx_${PYCXXVER}
export PYDIR=python${PY_MAJ}.${PY_MIN}
export PYLIB=python${PY_MAJ}${PY_MIN}
case $(uname -s) in
Darwin)
export PYTHON=/usr/bin/python${PY_MAJ}.${PY_MIN}
export SVN_INC=/sw/include/subversion-1
export SVN_LIB=/sw/lib
export APR_INC=/sw/include/apr-0
export APR_LIB=/sw/lib
;;
*)
export PYTHON=/usr/bin/python${PY_MAJ}.${PY_MIN}
export SVN_INC=/usr/include/subversion-1
export SVN_LIB=/usr/lib
if [ -e /usr/include/apr-0 ]
then
export APR_INC=/usr/include/apr-0
else
export APR_INC=/usr/include/apache2
fi
export APR_LIB=/usr/lib
;;
esac
# prove the python version selected is as expected
${PYTHON} -c "import sys;print 'Info: Python Version',sys.version"
BUILD_TYPE=Release
build: all test kit
all:
cd ../Source && $(MAKE) -f pysvn_linux_py$(PY_MAJ)$(PY_MIN).mak
clean:
cd ../Source && $(MAKE) -f pysvn_linux_py$(PY_MAJ)$(PY_MIN).mak clean
rm -rf ../Kit/Linux/tmp
kit:
pwd && cd ../Kit/Linux && $(PYTHON) make_rpm.py
install:
echo sudo may prompt for your password to allow installation of the pysvn rpm
sudo rpm -i ../Kit/Linux/tmp/RPMS/i386/py${PY_MAJ}${PY_MIN}_pysvn-*-1.i386.rpm
test:
echo tests are TBD
BUILD_TYPE=Release
build: all kit
all:
cd ../Source && $(MAKE) -f pysvn_macosx_py$(PY_MAJ)$(PY_MIN).mak
clean:
cd ../Source && $(MAKE) -f pysvn_macosx_py$(PY_MAJ)$(PY_MIN).mak clean
rm -rf ../Kit/MacOSX/tmp
kit:
pwd && cd ../Kit/MacOSX && $(PYTHON) make_pkg.py
MAJOR=1
MINOR=1
PATCH=0
BUILD=0
BUILD_TYPE=Release
build: all test kit
all:
cd ..\Source && msdev pysvn.dsw /make "pysvn - Win32 $(BUILD_TYPE)"
clean:
cd ..\Source && msdev pysvn.dsw /make "pysvn - Win32 $(BUILD_TYPE)" /clean
cd ..\kit\Win32 && $(MAKE) clean
kit:
cd ..\kit\Win32 && $(MAKE) all
install:
..\kit\Win32\tmp\output\setup.exe
test:
cd ..\Tests && test-01.cmd
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>pysvn - Python interface to Subversion</title>
<link rev="made" href="mailto:barry@barrys-emacs.org">
<style>
H1, H2, H3, H4 {color: #000099; background-color: lightskyblue}
pre {color: #0000cc; background-color: #eeeeee; position: relative; left: 40px; margin-right: 80px;
border-style: solid; border-color: black; border-width: thin}
</style>
</head>
<body>
<h1>pysvn - Python interface to Subversion</h1>
<h2>Documentation</h2>
<p>The <a href="pysvn_prog_guide.html">pysvn Programmer's Guide</a> is the best place to start learning about pysvn.
It covers the use of pysvn in a tutorial style with lots of examples.</p>
<p>Use the <a href="pysvn_prog_ref.html">pysvn Programmer's Reference</a> to look up the detailed descriptions
of all the classes, functions and variables of pysvn.</p>
<p>The <i>python-library</i>/site-packages/pysvn/Examples/Client/svn_cmd.py program is a complete replacement
for the svn command line written using pysvn. It is a good place to look for working examples of use of all
the pysvn module.</p>
<h2>pysvn Support</h2>
<p>Please use the mailing lists and the issues database on
<a href="http://pysvn.tigris.org">http://pysvn.tigris.org</a>
to report problems, suggest improvements or contribute changes.</p>
<h2>pysvn License</h2>
<pre>
=================================================================
Copyright (C) 2003-2004 Barry A. Scott. All rights reserved.
=================================================================
The Apache Software License, Version 1.1
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. The end-user documentation included with the redistribution,
if any, must include the following acknowledgment:
"This product includes software developed by
Barry A. Scott http://www.barrys-emacs.org."
Alternately, this acknowledgment may appear in the software itself,
if and wherever such third-party acknowledgments normally appear.
4. The names "PySVN" must not be used to endorse or promote
products derived from this software without prior written
permission. For written permission, please contact
barry@barrys-emacs.org.
5. Products derived from this software may not be called "PySVN",
nor may "PySVN" appear in their name, without prior written
permission of Barry Scott.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
=================================================================
</pre>
</body>
</html>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import pysvn
print 'pysvn.__doc__'
print pysvn.__doc__
print 'dir(pysvn)'
print dir(pysvn)
print 'pysvn.Client.__doc__'
print pysvn.Client.__doc__
print 'pysvn.Revision.__doc__'
print pysvn.Revision.__doc__
This diff is collapsed.
<html>
<head>
<title>Building pysvn Extension</title>
</head>
<body>
<h1>Building pysvn Extension</h1>
<h2>Prerequisites</h2>
<p>To build pysvn you will require:</p>
<ul>
<li><a href="http://sourceforge.net/project/showfiles.php?group_id=3180">PyCXX V5.3.0</a>
<li><a href="http://subversion.tigris.org">subversion</a> 1.x.x</a>
</ul>
<h3>Building on win32</h3>
<p>These instructions assume you have Microsoft Visual C++ 6.0 to compile the code
and <a href="http://www.jrsoftware.org/">INNO</a> 4.0.10 to create the installation kit.</p>
<p>Note: you must build with MSVC6 as python 2.3 was built with that version.</p>
<p>MSVC 2003.NET is not expected to work until there is a version of python
built with VC++ 2003.NET released (issues of C runtime compatibility).</p>
<ol>
<li>build subversion (tested with 1.0.0 to 1.0.6 and 1.1.0)
<li>fetch and expand the pysvn source code into <i>extdir</i>
<li>Expand pycxx_5_3_0.tar.gz into <i>extdir</i>\Import
<li>edit Builder\builder_custom_init.cmd to match the locations of the sources.
<li>cd Builder
<li>builder_custom_init.cmd
<li>nmake -f win32.mak build
</ol>
<p>To install the built kit</p>
<ol>
<li>Uninstall any previous kit (control panel's Add/Remove programs)
<li>nmake -f win32.mak install
</ol>
<h3>Building on linux systems.</h3>
<ol>
<li>build subversion (tested with 1.0.0 to 1.0.6 and 1.1.0)
<li>get the pysvn source code
<li>tar xzf pycxx_5_3_0.tar.gz into <i>extdir</i>/Import
<li>edit Builder/builder_custom_init.sh to match the locations of the sources.
<li>cd Builder
<li>. builder_custom_init.sh
<li>make -f linux.mak build
</ol>
<p>To install the built rpm</p>
<ol>
<li>Use rpm -e to remove any previous kit
<li>make -f linux.mak install
</ol>
</body>
</html>
#
# make_rpm.py
#
import os
print 'Info: setup_version_handling.py'
import sys
sys.path.insert( 0, '../../Source')
import pysvn
import time
pymaj, pymin, pypat, _, _ = sys.version_info
python_version_string = '%d.%d.%d' % (pymaj, pymin, pypat)
pysvnmaj, pysvnmin, pysvnpat, _ = pysvn.version
pysvn_version_string = '%d.%d.%d-%d' % (pysvn.version[0], pysvn.version[1], pysvn.version[2], pysvn.version[3])
pysvn_version_package_release_string = '%d' % pysvn.version[3]
pysvn_version_package_string = '%d.%d.%d' % (pysvn.version[0], pysvn.version[1], pysvn.version[2])
svn_version_string = '%d.%d.%d' % (pysvn.svn_version[0], pysvn.svn_version[1], pysvn.svn_version[2])
svn_compact_version_string = '%d%d%d' % (pysvn.svn_version[0], pysvn.svn_version[1], pysvn.svn_version[2])
build_time = time.time()
build_time_str = time.strftime( '%d-%b-%Y %H:%M', time.localtime( build_time ) )
tmpdir = os.path.join( os.getcwd(), 'tmp' )
if os.path.exists( tmpdir ):
print 'Info: Clean up tmp directory'
os.system( 'rm -rf tmp' )
print 'Info: Create directories'
for kit_dir in [
tmpdir,
os.path.join( tmpdir, 'ROOT' ),
os.path.join( tmpdir, 'BUILD' ),
os.path.join( tmpdir, 'SPECS' ),
os.path.join( tmpdir, 'RPMS' ),
os.path.join( tmpdir, 'ROOT/usr' ),
os.path.join( tmpdir, 'ROOT/usr/lib' ),
os.path.join( tmpdir, 'ROOT/usr/lib/python%(pymaj)d.%(pymin)d' % locals() ),
os.path.join( tmpdir, 'ROOT/usr/lib/python%(pymaj)d.%(pymin)d/site-packages' % locals() ),
os.path.join( tmpdir, 'ROOT/usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn' % locals() ),
os.path.join( tmpdir, 'ROOT/usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn/Examples' % locals() ),
os.path.join( tmpdir, 'ROOT/usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn/Examples/Client' % locals() ),
]:
if not os.path.exists( kit_dir ):
os.makedirs( kit_dir )
print 'Info: Copy files'
for cp_src, cp_dst_dir_fmt in [
('../../Source/pysvn/__init__.py',
'ROOT/usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn'),
('../../Source/pysvn/_pysvn.so',
'ROOT/usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn'),
('../../LICENSE.txt',
'ROOT/usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn/LICENSE.txt'),
('../../Docs/pysvn.html',
'ROOT/usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn'),
('../../Docs/pysvn_prog_ref.html',
'ROOT/usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn'),
('../../Docs/pysvn_prog_guide.html',
'ROOT/usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn'),
('../../Examples/Client/svn_cmd.py',
'ROOT/usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn/Examples/Client'),
('../../Examples/Client/parse_datetime.py',
'ROOT/usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn/Examples/Client'),
]:
print 'Info: cp %s' % cp_src
os.system( 'cp -f %s tmp/%s' % (cp_src, cp_dst_dir_fmt % locals()) )
print 'Info: Create tmp/SPECS/pysvn.spec'
f = file('tmp/SPECS/pysvn.spec','w')
f.write('''BuildRoot: %(tmpdir)s/ROOT
Name: py%(pymaj)d%(pymin)d_pysvn_svn%(svn_compact_version_string)s
Version: %(pysvn_version_package_string)s
Group: Development/Libraries
Release: %(pysvn_version_package_release_string)s
Summary: pysvn %(pysvn_version_package_string)s Python extension for Subversion %(svn_version_string)s
Copyright: Barry A. Scott (c) 2003-2004
Packager: Barry A. Scott <barry@barrys-emacs.org>
%%description
PySVN %(pysvn_version_string)s for Python %(python_version_string)s and Subversion %(svn_version_string)s
Copyright Barry A. Scott (c) 2003-2004
mailto:barry@barrys-emacs.org
http://pysvn.tigris.org
Barry Scott
%%prep
%%build
%%install
%%post
/usr/bin/python%(pymaj)d.%(pymin)d -c "import pysvn"
/usr/bin/python%(pymaj)d.%(pymin)d -O -c "import pysvn"
%%postun
rm -f /usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn/__init__.pyc
rm -f /usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn/__init__.pyo
%%files
%%defattr (-,root,root)
%%attr(444,root,root) /usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn/__init__.py
%%attr(555,root,root) /usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn/_pysvn.so
%%attr(444,root,root) /usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn/LICENSE.txt
%%attr(444,root,root) /usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn/pysvn.html
%%attr(444,root,root) /usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn/pysvn_prog_ref.html
%%attr(444,root,root) /usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn/pysvn_prog_guide.html
%%attr(555,root,root) /usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn/Examples/Client/svn_cmd.py
%%attr(444,root,root) /usr/lib/python%(pymaj)d.%(pymin)d/site-packages/pysvn/Examples/Client/parse_datetime.py
''' % locals() )
f.close()
print 'Info: Create rpmrc'
os.system('grep ^macrofiles: /usr/lib/rpm/rpmrc |sed -e s!~/.rpmmacros!%(tmpdir)s/rpmmacros! >%(tmpdir)s/rpmrc' % locals() )
print 'Info: Create rpmmacros'
f = file( 'tmp/rpmmacros', 'w' )
f.write( '%%_topdir %(tmpdir)s' % locals() )
f.close()
print 'Info: rpmbuild'
os.system( 'rpmbuild --rcfile=/usr/lib/rpm/rpmrc:%(tmpdir)s/rpmrc -bb %(tmpdir)s/SPECS/pysvn.spec' % locals() )
#
# make_pkg.py
#
import os
print 'Info: setup_version_handling.py'
import sys
sys.path.insert( 0, '../../Source')
import pysvn
import time
pymaj, pymin, pypat, _, _ = sys.version_info
python_version_string = '%d.%d.%d' % (pymaj, pymin, pypat)
pysvnmaj, pysvnmin, pysvnpat, _ = pysvn.version
pysvn_version_string = '%d.%d.%d-%d' % (pysvn.version[0], pysvn.version[1], pysvn.version[2], pysvn.version[3])
svn_version_package_string = '%d%d%d' % (pysvn.svn_version[0], pysvn.svn_version[1], pysvn.svn_version[2])
svn_version_string = '%d.%d.%d' % (pysvn.svn_version[0], pysvn.svn_version[1], pysvn.svn_version[2])
pkg_filename = 'py%s%s_pysvn_svn%s-%s' % (pymaj, pymin, svn_version_package_string, pysvn_version_string)
print 'Info: Packageing %s' % pkg_filename
build_time = time.time()
build_time_str = time.strftime( '%d-%b-%Y %H:%M', time.localtime( build_time ) )
tmpdir = os.path.join( os.getcwd(), 'tmp' )
if os.path.exists( tmpdir ):
print 'Info: Clean up tmp directory'
os.system( 'rm -rf tmp' )
print 'Info: Create directories'
for kit_dir in [
tmpdir,
os.path.join( tmpdir, 'Resources' ),
os.path.join( tmpdir, 'Contents' ),
os.path.join( tmpdir, 'Contents/pysvn' ),
os.path.join( tmpdir, '%s' % pkg_filename),
os.path.join( tmpdir, '%s/Examples' % pkg_filename ),
os.path.join( tmpdir, '%s/Examples/Client' % pkg_filename ),
os.path.join( tmpdir, '%s/Documentation' % pkg_filename),
]:
if not os.path.exists( kit_dir ):
os.makedirs( kit_dir )
print 'Info: Copy files'
for cp_src, cp_dst_dir_fmt in [
('../../Source/pysvn/__init__.py',
'Contents/pysvn'),
('../../Source/pysvn/_pysvn.so',
'Contents/pysvn'),
('../../LICENSE.txt',
'Resources/License.txt'),
('../../LICENSE.txt',
'%s/License.txt' % pkg_filename ),
('../../Docs/pysvn.html',
'%s/Documentation' % pkg_filename ),
('../../Docs/pysvn_prog_ref.html',
'%s/Documentation' % pkg_filename ),
('../../Docs/pysvn_prog_guide.html',
'%s/Documentation' % pkg_filename ),
('../../Examples/Client/svn_cmd.py',
'%s/Examples/Client' % pkg_filename ),
('../../Examples/Client/parse_datetime.py',
'%s/Examples/Client' % pkg_filename ),
]:
print 'Info: cp %s' % cp_src
os.system( 'cp -f %s tmp/%s' % (cp_src, cp_dst_dir_fmt % locals()) )
print 'Info: Create tmp/Resources/ReadMe.txt'
f = file('tmp/Resources/ReadMe.txt','w')
f.write('''<html>
<body>
<h1>PySVN %(pysvn_version_string)s for Apple Mac OS X Python %(pymaj)s.%(pymin)s and Subversion %(svn_version_string)s</h1>
<h2>Copyright Barry A. Scott (c) 2003-2004</h2>
<h2>Mail <a href="mailto:barry@barrys-emacs.org">barry@barrys-emacs.org</a></h2>
<h2>Pysvn home <a href="http://pysvn.tigris.org">http://pysvn.tigris.org</a></h2>
<h2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Barry Scott</h2>
</body>
</html>
''' % locals() )
f.close()
print 'Info: Create tmp/Info.plist'
f = file('tmp/Info.plist','w')
f.write('''<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleGetInfoString</key>
<string>pysvn Extension %(pysvn_version_string)s</string>
<key>CFBundleIdentifier</key>
<string>org.tigris.pysvn.extension</string>
<key>CFBundleName</key>
<string>pysvn Extension</string>
<key>CFBundleShortVersionString</key>
<string>%(pysvn_version_string)s</string>
<key>IFMajorVersion</key>
<integer>%(pysvnmaj)s</integer>
<key>IFMinorVersion</key>
<integer>%(pysvnmin)s</integer>
<key>IFPkgFlagAllowBackRev</key>
<false/>
<key>IFPkgFlagAuthorizationAction</key>
<string>AdminAuthorization</string>
<key>IFPkgFlagDefaultLocation</key>
<string>/System/Library/Frameworks/Python.framework/Versions/%(pymaj)s.%(pymin)s/lib/python%(pymaj)s.%(pymin)s/site-packages</string>
<key>IFPkgFlagInstallFat</key>
<false/>
<key>IFPkgFlagIsRequired</key>
<false/>
<key>IFPkgFlagRelocatable</key>
<false/>
<key>IFPkgFlagRestartAction</key>
<string>NoRestart</string>
<key>IFPkgFlagRootVolumeOnly</key>
<true/>
<key>IFPkgFlagUpdateInstalledLanguages</key>
<false/>
<key>IFPkgFormatVersion</key>
<real>0.10000000149011612</real>
</dict>
</plist>
''' % locals() )
f.close()
print 'Info: PackageMaker'
cmd = [ '/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker',
'-build',
'-p %s' % os.path.abspath( 'tmp/%s/%s.pkg' % (pkg_filename, pkg_filename) ),
'-f %s' % os.path.abspath( 'tmp/Contents' ),
'-r %s' % os.path.abspath( 'tmp/Resources' ),
'-i %s' % os.path.abspath( 'tmp/Info.plist' ),
]
os.system( ' '.join( cmd ) )
print 'Info: Make Disk Image'
os.system( 'hdiutil create -srcfolder tmp/%s tmp/tmp.dmg' % pkg_filename )
os.system( 'hdiutil convert tmp/tmp.dmg -format UDZO -imagekey zlib-level=9 '
'-o tmp/%s.dmg' % pkg_filename )
all: kit
kit: pysvn-branded.iss info_before.txt copy_setup.cmd
copy ..\..\LICENSE.txt tmp\LICENSE.txt
copy $(SUBVERSION)\db4-win32\bin\libdb42.dll tmp
copy $(OPENSSL)\out32dll\libeay32.dll tmp
copy $(OPENSSL)\out32dll\ssleay32.dll tmp
"c:\Program Files\Inno Setup 4\ISCC.exe" tmp\pysvn-branded.iss
tmp\setup_copy.cmd
info_before.txt: pysvn-branded.iss
copy_setup.cmd: pysvn-branded.iss
pysvn-branded.iss: setup_version_handling.py pysvn.iss
if not exist tmp mkdir tmp
python setup_version_handling.py
debug:
"c:\Program Files\Inno Setup 4\Compil32.exe" pysvn.iss
clean:
if exist tmp rmdir /s /q tmp
;
; msvc60_system_files.iss
;
; begin VC system files
Source: "..\vc6redist\msvcp60.dll"; DestDir: "{sys}"; Flags: restartreplace uninsneveruninstall
Source: "..\vc6redist\msvcirt.dll"; DestDir: "{sys}"; Flags: restartreplace uninsneveruninstall
Source: "..\vc6redist\msvcrt.dll"; DestDir: "{sys}"; Flags: restartreplace uninsneveruninstall
; end VC system files
;
; msvc71_system_files.iss
;
; begin VC system files
Source: "..\..\vc71redist\msvcp71.dll"; DestDir: "{sys}"; Flags: restartreplace uninsneveruninstall
Source: "..\..\vc71redist\msvcr71.dll"; DestDir: "{sys}"; Flags: restartreplace uninsneveruninstall
; end VC system files
;
; -- bemacs.iss --
;
[Code]
function InitializeSetup(): Boolean;
var
install_path : string;
rcb : Boolean;
begin
rcb := RegQueryStringValue( HKLM,
'SOFTWARE\Python\PythonCore\%(py_maj)d.%(py_min)d\InstallPath',
'', install_path );
if not rcb then
begin
MsgBox( 'pysvn requires Python %(py_maj)d.%(py_min)d to be installed.' #13 #13
'Quitting installation',
mbError, MB_OK );
end;
Result := rcb;
end;
function pythondir(Default: String): String;
var
install_path : string;
rcb : Boolean;
begin
rcb := RegQueryStringValue( HKLM,
'SOFTWARE\Python\PythonCore\%(py_maj)d.%(py_min)d\InstallPath',
'', install_path );
if rcb then
begin
Result := install_path;
end
else
begin
Result := Default
end;
end;
[Setup]
AppName=Python %(py_maj)d.%(py_min)d PySVN
AppVerName=Python %(py_maj)d.%(py_min)d PySVN %(pysvn_version_string)s
AppCopyright=Copyright (C) 2003-2004 Barry A. Scott
DefaultDirName={code:pythondir|c:\python%(py_maj)d.%(py_min)d}\lib\site-packages\pysvn
DefaultGroupName=PySVN for Python %(py_maj)d.%(py_min)d
DisableStartupPrompt=yes
InfoBeforeFile=info_before.txt
Compression=bzip/9
[Files]
#include "..\msvc60_system_files.iss"
Source: "..\..\..\Source\pysvn\__init__.py"; DestDir: "{app}";
Source: "..\..\..\Source\pysvn\_pysvn.pyd"; DestDir: "{app}";
Source: "..\..\..\Docs\pysvn.html"; DestDir: "{app}";
Source: "..\..\..\Docs\pysvn_prog_guide.html"; DestDir: "{app}";
Source: "..\..\..\Docs\pysvn_prog_ref.html"; DestDir: "{app}";
Source: "LICENSE.txt"; DestDir: "{app}";
Source: "..\..\..\Examples\Client\svn_cmd.py"; DestDir: "{app}\Examples\Client";
Source: "..\..\..\Examples\Client\parse_datetime.py"; DestDir: "{app}\Examples\Client";