##// END OF EJS Templates
make stuff for macos x binary package....
Vadim Gelfer -
r1686:dd508589 default
parent child Browse files
Show More
@@ -0,0 +1,38
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta http-equiv="Content-Style-Type" content="text/css">
6 <title></title>
7 <style type="text/css">
8 p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica}
9 p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
10 p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
11 p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #000fed}
12 span.s1 {text-decoration: underline}
13 span.s2 {font: 12.0px Courier}
14 </style>
15 </head>
16 <body>
17 <p class="p1"><b>Before you install</b></p>
18 <p class="p2"><br></p>
19 <p class="p3">This is <i>not</i> a stand-alone version of Mercurial.</p>
20 <p class="p2"><br></p>
21 <p class="p3">To use it, you must have the β€œofficial unofficial” MacPython 2.4.1 installed.</p>
22 <p class="p2"><br></p>
23 <p class="p3">You can download MacPython 2.4.1 from here:</p>
24 <p class="p4"><span class="s1"><a href="http://python.org/ftp/python/2.4.1/MacPython-OSX-2.4.1-1.dmg">http://python.org/ftp/python/2.4.1/MacPython-OSX-2.4.1-1.dmg</a></span></p>
25 <p class="p2"><br></p>
26 <p class="p3">For more information on MacPython, go here:</p>
27 <p class="p4"><span class="s1"><a href="http://undefined.org/python/">http://undefined.org/python</a></span></p>
28 <p class="p2"><br></p>
29 <p class="p1"><b>After you install</b></p>
30 <p class="p2"><br></p>
31 <p class="p3">This package installs the <span class="s2">hg</span> executable in <span class="s2">/usr/local/bin</span>. This directory may not be in your shell's search path. Don't forget to check.</p>
32 <p class="p2"><br></p>
33 <p class="p1"><b>Reporting problems</b></p>
34 <p class="p2"><br></p>
35 <p class="p3">If you run into any problems, please file a bug online:</p>
36 <p class="p3"><a href="http://www.selenic.com/mercurial/bts">http://www.selenic.com/mercurial/bts</a></p>
37 </body>
38 </html>
@@ -0,0 +1,17
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta http-equiv="Content-Style-Type" content="text/css">
6 <title></title>
7 <style type="text/css">
8 p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
9 p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
10 </style>
11 </head>
12 <body>
13 <p class="p1">This is a prepackaged release of <a href="http://www.selenic.com/mercurial">Mercurial</a> for Mac OS X.</p>
14 <p class="p2"><br></p>
15 <p class="p1">It is based on Mercurial 0.8.</p>
16 </body>
17 </html>
@@ -0,0 +1,11
1 to build a new macosx binary package:
2
3 install macpython from http://undefined.org/python/
4
5 install py2app from http://pythonmac.org/packages/
6
7 make sure /usr/local/bin is in your path
8
9 run bdist_mpkg in top-level hg directory
10
11 find packaged stuff in dist directory
@@ -1,97 +1,101
1 #!/usr/bin/env python
1 #!/usr/bin/env python
2 #
2 #
3 # This is the mercurial setup script.
3 # This is the mercurial setup script.
4 #
4 #
5 # './setup.py install', or
5 # './setup.py install', or
6 # './setup.py --help' for more options
6 # './setup.py --help' for more options
7
7
8 import glob
8 import glob
9 import sys
9 import sys
10 from distutils.core import setup, Extension
10 from distutils.core import setup, Extension
11 from distutils.command.install_data import install_data
11 from distutils.command.install_data import install_data
12
12
13 import mercurial.version
13 import mercurial.version
14
14
15 # py2exe needs to be installed to work
15 # py2exe needs to be installed to work
16 try:
16 try:
17 import py2exe
17 import py2exe
18
18
19 # Help py2exe to find win32com.shell
19 # Help py2exe to find win32com.shell
20 try:
20 try:
21 import modulefinder
21 import modulefinder
22 import win32com
22 import win32com
23 for p in win32com.__path__[1:]: # Take the path to win32comext
23 for p in win32com.__path__[1:]: # Take the path to win32comext
24 modulefinder.AddPackagePath("win32com", p)
24 modulefinder.AddPackagePath("win32com", p)
25 pn = "win32com.shell"
25 pn = "win32com.shell"
26 __import__(pn)
26 __import__(pn)
27 m = sys.modules[pn]
27 m = sys.modules[pn]
28 for p in m.__path__[1:]:
28 for p in m.__path__[1:]:
29 modulefinder.AddPackagePath(pn, p)
29 modulefinder.AddPackagePath(pn, p)
30 except ImportError:
30 except ImportError:
31 pass
31 pass
32
32
33 # Due to the use of demandload py2exe is not finding the modules.
33 # Due to the use of demandload py2exe is not finding the modules.
34 # packagescan.getmodules creates a list of modules included in
34 # packagescan.getmodules creates a list of modules included in
35 # the mercurial package plus depdent modules.
35 # the mercurial package plus depdent modules.
36 import mercurial.packagescan
36 import mercurial.packagescan
37 from py2exe.build_exe import py2exe as build_exe
37 from py2exe.build_exe import py2exe as build_exe
38
38
39 class py2exe_for_demandload(build_exe):
39 class py2exe_for_demandload(build_exe):
40 """ overwrites the py2exe command class for getting the build
40 """ overwrites the py2exe command class for getting the build
41 directory and for setting the 'includes' option."""
41 directory and for setting the 'includes' option."""
42 def initialize_options(self):
42 def initialize_options(self):
43 self.build_lib = None
43 self.build_lib = None
44 build_exe.initialize_options(self)
44 build_exe.initialize_options(self)
45 def finalize_options(self):
45 def finalize_options(self):
46 # Get the build directory, ie. where to search for modules.
46 # Get the build directory, ie. where to search for modules.
47 self.set_undefined_options('build',
47 self.set_undefined_options('build',
48 ('build_lib', 'build_lib'))
48 ('build_lib', 'build_lib'))
49 # Sets the 'includes' option with the list of needed modules
49 # Sets the 'includes' option with the list of needed modules
50 if not self.includes:
50 if not self.includes:
51 self.includes = []
51 self.includes = []
52 else:
52 else:
53 self.includes = self.includes.split(',')
53 self.includes = self.includes.split(',')
54 self.includes += mercurial.packagescan.getmodules(self.build_lib,
54 self.includes += mercurial.packagescan.getmodules(self.build_lib,
55 'mercurial')
55 'mercurial')
56 self.includes += mercurial.packagescan.getmodules(self.build_lib,
56 self.includes += mercurial.packagescan.getmodules(self.build_lib,
57 'hgext')
57 'hgext')
58 build_exe.finalize_options(self)
58 build_exe.finalize_options(self)
59 except ImportError:
59 except ImportError:
60 py2exe_for_demandload = None
60 py2exe_for_demandload = None
61
61
62
62
63 # specify version string, otherwise 'hg identify' will be used:
63 # specify version string, otherwise 'hg identify' will be used:
64 version = ''
64 version = ''
65
65
66 class install_package_data(install_data):
66 class install_package_data(install_data):
67 def finalize_options(self):
67 def finalize_options(self):
68 self.set_undefined_options('install',
68 self.set_undefined_options('install',
69 ('install_lib', 'install_dir'))
69 ('install_lib', 'install_dir'))
70 install_data.finalize_options(self)
70 install_data.finalize_options(self)
71
71
72 try:
72 try:
73 mercurial.version.remember_version(version)
73 mercurial.version.remember_version(version)
74 cmdclass = {'install_data': install_package_data}
74 cmdclass = {'install_data': install_package_data}
75 py2exe_opts = {}
75 py2exe_opts = {}
76 if py2exe_for_demandload is not None:
76 if py2exe_for_demandload is not None:
77 cmdclass['py2exe'] = py2exe_for_demandload
77 cmdclass['py2exe'] = py2exe_for_demandload
78 py2exe_opts['console'] = ['hg']
78 py2exe_opts['console'] = ['hg']
79 setup(name='mercurial',
79 setup(name='Mercurial',
80 version=mercurial.version.get_version(),
80 version=mercurial.version.get_version(),
81 author='Matt Mackall',
81 author='Matt Mackall',
82 author_email='mpm@selenic.com',
82 author_email='mpm@selenic.com',
83 url='http://selenic.com/mercurial',
83 url='http://selenic.com/mercurial',
84 description='scalable distributed SCM',
84 description='Scalable distributed SCM',
85 license='GNU GPL',
85 license='GNU GPL',
86 packages=['mercurial', 'hgext'],
86 packages=['mercurial', 'hgext'],
87 ext_modules=[Extension('mercurial.mpatch', ['mercurial/mpatch.c']),
87 ext_modules=[Extension('mercurial.mpatch', ['mercurial/mpatch.c']),
88 Extension('mercurial.bdiff', ['mercurial/bdiff.c'])],
88 Extension('mercurial.bdiff', ['mercurial/bdiff.c'])],
89 data_files=[('mercurial/templates',
89 data_files=[('mercurial/templates',
90 ['templates/map'] +
90 ['templates/map'] +
91 glob.glob('templates/map-*') +
91 glob.glob('templates/map-*') +
92 glob.glob('templates/*.tmpl'))],
92 glob.glob('templates/*.tmpl'))],
93 cmdclass=cmdclass,
93 cmdclass=cmdclass,
94 scripts=['hg', 'hgmerge'],
94 scripts=['hg', 'hgmerge'],
95 options=dict(bdist_mpkg=dict(zipdist=True,
96 license='COPYING',
97 readme='contrib/macosx/Readme.html',
98 welcome='contrib/macosx/Welcome.html')),
95 **py2exe_opts)
99 **py2exe_opts)
96 finally:
100 finally:
97 mercurial.version.forget_version()
101 mercurial.version.forget_version()
General Comments 0
You need to be logged in to leave comments. Login now