##// END OF EJS Templates
wix: move library.zip and all *.pyd into a lib/ folder...
Steve Borho -
r25409:95e042d7 default
parent child Browse files
Show More
@@ -1,31 +1,35 b''
1 <?xml version="1.0" encoding="utf-8"?>
1 <?xml version="1.0" encoding="utf-8"?>
2 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
2 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3
3
4 <?include guids.wxi ?>
4 <?include guids.wxi ?>
5 <?include defines.wxi ?>
5 <?include defines.wxi ?>
6
6
7 <Fragment>
7 <Fragment>
8 <DirectoryRef Id="INSTALLDIR" FileSource="$(var.SourceDir)">
8 <DirectoryRef Id="INSTALLDIR" FileSource="$(var.SourceDir)">
9 <Component Id="distOutput" Guid="$(var.dist.guid)" Win64='$(var.IsX64)'>
9 <Component Id="distOutput" Guid="$(var.dist.guid)" Win64='$(var.IsX64)'>
10 <File Name="library.zip" KeyPath="yes" />
10 <File Name="python27.dll" KeyPath="yes" />
11 <File Name="mercurial.base85.pyd" />
12 <File Name="mercurial.bdiff.pyd" />
13 <File Name="mercurial.diffhelpers.pyd" />
14 <File Name="mercurial.mpatch.pyd" />
15 <File Name="mercurial.osutil.pyd" />
16 <File Name="mercurial.parsers.pyd" />
17 <File Name="pyexpat.pyd" />
18 <File Name="python27.dll" />
19 <File Name="bz2.pyd" />
20 <File Name="select.pyd" />
21 <File Name="unicodedata.pyd" />
22 <File Name="_ctypes.pyd" />
23 <File Name="_elementtree.pyd" />
24 <File Name="_hashlib.pyd" />
25 <File Name="_socket.pyd" />
26 <File Name="_ssl.pyd" />
27 </Component>
11 </Component>
12 <Directory Id="libdir" Name="lib" FileSource="$(var.SourceDir)/lib">
13 <Component Id="libOutput" Guid="$(var.lib.guid)" Win64='$(var.IsX64)'>
14 <File Name="library.zip" KeyPath="yes" />
15 <File Name="mercurial.base85.pyd" />
16 <File Name="mercurial.bdiff.pyd" />
17 <File Name="mercurial.diffhelpers.pyd" />
18 <File Name="mercurial.mpatch.pyd" />
19 <File Name="mercurial.osutil.pyd" />
20 <File Name="mercurial.parsers.pyd" />
21 <File Name="pyexpat.pyd" />
22 <File Name="bz2.pyd" />
23 <File Name="select.pyd" />
24 <File Name="unicodedata.pyd" />
25 <File Name="_ctypes.pyd" />
26 <File Name="_elementtree.pyd" />
27 <File Name="_hashlib.pyd" />
28 <File Name="_socket.pyd" />
29 <File Name="_ssl.pyd" />
30 </Component>
31 </Directory>
28 </DirectoryRef>
32 </DirectoryRef>
29 </Fragment>
33 </Fragment>
30
34
31 </Wix>
35 </Wix>
@@ -1,50 +1,51 b''
1 <Include>
1 <Include>
2 <!-- These are component GUIDs used for Mercurial installers.
2 <!-- These are component GUIDs used for Mercurial installers.
3 YOU MUST CHANGE ALL GUIDs below when copying this file
3 YOU MUST CHANGE ALL GUIDs below when copying this file
4 and replace 'Mercurial' in this notice with the name of
4 and replace 'Mercurial' in this notice with the name of
5 your project. Component GUIDs have global namespace! -->
5 your project. Component GUIDs have global namespace! -->
6
6
7 <!-- contrib.wxs -->
7 <!-- contrib.wxs -->
8 <?define contrib.guid = {4E11FFC2-E2F7-482A-8460-9394B5489F02} ?>
8 <?define contrib.guid = {4E11FFC2-E2F7-482A-8460-9394B5489F02} ?>
9 <?define contrib.vim.guid = {BB04903A-652D-4C4F-9590-2BD07A2304F2} ?>
9 <?define contrib.vim.guid = {BB04903A-652D-4C4F-9590-2BD07A2304F2} ?>
10
10
11 <!-- dist.wxs -->
11 <!-- dist.wxs -->
12 <?define dist.guid = {C3B634A4-1B05-4A40-94A9-38EE853CF693} ?>
12 <?define dist.guid = {CE405FE6-CD1E-4873-9C9A-7683AE5A3D90} ?>
13 <?define lib.guid = {91D53B14-E924-432A-ACA2-65F9B3F7C56A} ?>
13
14
14 <!-- doc.wxs -->
15 <!-- doc.wxs -->
15 <?define doc.hg.1.html.guid = {AAAA3FDA-EDC5-4220-B59D-D342722358A2} ?>
16 <?define doc.hg.1.html.guid = {AAAA3FDA-EDC5-4220-B59D-D342722358A2} ?>
16 <?define doc.hgignore.5.html.guid = {AA9118C4-F3A0-4429-A5F4-5A1906B2D67F} ?>
17 <?define doc.hgignore.5.html.guid = {AA9118C4-F3A0-4429-A5F4-5A1906B2D67F} ?>
17 <?define doc.hgrc.5.html = {E0CEA1EB-FA01-408c-844B-EE5965165BAE} ?>
18 <?define doc.hgrc.5.html = {E0CEA1EB-FA01-408c-844B-EE5965165BAE} ?>
18 <?define doc.style.css = {172F8262-98E0-4711-BD39-4DAE0D77EF05} ?>
19 <?define doc.style.css = {172F8262-98E0-4711-BD39-4DAE0D77EF05} ?>
19
20
20 <!-- help.wxs -->
21 <!-- help.wxs -->
21 <?define helpFolder.guid = {9FA957DB-6DFE-44f2-AD03-293B2791CF17} ?>
22 <?define helpFolder.guid = {9FA957DB-6DFE-44f2-AD03-293B2791CF17} ?>
22
23
23 <!-- i18n.wxs -->
24 <!-- i18n.wxs -->
24 <?define i18nFolder.guid = {1BF8026D-CF7C-4174-AEE6-D6B7BF119248} ?>
25 <?define i18nFolder.guid = {1BF8026D-CF7C-4174-AEE6-D6B7BF119248} ?>
25
26
26 <!-- templates.wxs -->
27 <!-- templates.wxs -->
27 <?define templates.root.guid = {437FD55C-7756-4EA0-87E5-FDBE75DC8595} ?>
28 <?define templates.root.guid = {437FD55C-7756-4EA0-87E5-FDBE75DC8595} ?>
28 <?define templates.atom.guid = {D30E14A5-8AF0-4268-8B00-00BEE9E09E39} ?>
29 <?define templates.atom.guid = {D30E14A5-8AF0-4268-8B00-00BEE9E09E39} ?>
29 <?define templates.coal.guid = {B63CCAAB-4EAF-43b4-901E-4BD13F5B78FC} ?>
30 <?define templates.coal.guid = {B63CCAAB-4EAF-43b4-901E-4BD13F5B78FC} ?>
30 <?define templates.gitweb.guid = {827334AF-1EFD-421B-962C-5660A068F612} ?>
31 <?define templates.gitweb.guid = {827334AF-1EFD-421B-962C-5660A068F612} ?>
31 <?define templates.json.guid = {F535BE7A-EC34-46E0-B9BE-013F3DBAFB19} ?>
32 <?define templates.json.guid = {F535BE7A-EC34-46E0-B9BE-013F3DBAFB19} ?>
32 <?define templates.monoblue.guid = {8060A1E4-BD4C-453E-92CB-9536DC44A9E3} ?>
33 <?define templates.monoblue.guid = {8060A1E4-BD4C-453E-92CB-9536DC44A9E3} ?>
33 <?define templates.paper.guid = {61AB1DE9-645F-46ED-8AF8-0CF02267FFBB} ?>
34 <?define templates.paper.guid = {61AB1DE9-645F-46ED-8AF8-0CF02267FFBB} ?>
34 <?define templates.raw.guid = {834DF8D7-9784-43A6-851D-A96CE1B3575B} ?>
35 <?define templates.raw.guid = {834DF8D7-9784-43A6-851D-A96CE1B3575B} ?>
35 <?define templates.rss.guid = {9338FA09-E128-4B1C-B723-1142DBD09E14} ?>
36 <?define templates.rss.guid = {9338FA09-E128-4B1C-B723-1142DBD09E14} ?>
36 <?define templates.spartan.guid = {80222625-FA8F-44b1-86CE-1781EF375D09} ?>
37 <?define templates.spartan.guid = {80222625-FA8F-44b1-86CE-1781EF375D09} ?>
37 <?define templates.static.guid = {6B3D7C24-98DA-4B67-9F18-35F77357B0B4} ?>
38 <?define templates.static.guid = {6B3D7C24-98DA-4B67-9F18-35F77357B0B4} ?>
38
39
39 <!-- mercurial.wxs -->
40 <!-- mercurial.wxs -->
40 <?define ProductUpgradeCode = {A1CC6134-E945-4399-BE36-EB0017FDF7CF} ?>
41 <?define ProductUpgradeCode = {A1CC6134-E945-4399-BE36-EB0017FDF7CF} ?>
41
42
42 <?define ComponentMainExecutableGUID = {D102B8FA-059B-4ACC-9FA3-8C78C3B58EEF} ?>
43 <?define ComponentMainExecutableGUID = {D102B8FA-059B-4ACC-9FA3-8C78C3B58EEF} ?>
43
44
44 <?define ReadMe.guid = {56A8E372-991D-4DCA-B91D-93D775974CF5} ?>
45 <?define ReadMe.guid = {56A8E372-991D-4DCA-B91D-93D775974CF5} ?>
45 <?define COPYING.guid = {B7801DBA-1C49-4BF4-91AD-33C65F5C7895} ?>
46 <?define COPYING.guid = {B7801DBA-1C49-4BF4-91AD-33C65F5C7895} ?>
46 <?define mercurial.rc.guid = {1D5FAEEE-7E6E-43B1-9F7F-802714316B15} ?>
47 <?define mercurial.rc.guid = {1D5FAEEE-7E6E-43B1-9F7F-802714316B15} ?>
47 <?define mergetools.rc.guid = {E8A1DC29-FF40-4B5F-BD12-80B9F7BF0CCD} ?>
48 <?define mergetools.rc.guid = {E8A1DC29-FF40-4B5F-BD12-80B9F7BF0CCD} ?>
48 <?define ProgramMenuDir.guid = {D5A63320-1238-489B-B68B-CF053E9577CA} ?>
49 <?define ProgramMenuDir.guid = {D5A63320-1238-489B-B68B-CF053E9577CA} ?>
49
50
50 </Include>
51 </Include>
@@ -1,161 +1,162 b''
1 <?xml version='1.0' encoding='windows-1252'?>
1 <?xml version='1.0' encoding='windows-1252'?>
2 <Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
2 <Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
3
3
4 <!-- Copyright 2010 Steve Borho <steve@borho.org>
4 <!-- Copyright 2010 Steve Borho <steve@borho.org>
5
5
6 This software may be used and distributed according to the terms of the
6 This software may be used and distributed according to the terms of the
7 GNU General Public License version 2 or any later version. -->
7 GNU General Public License version 2 or any later version. -->
8
8
9 <?include guids.wxi ?>
9 <?include guids.wxi ?>
10 <?include defines.wxi ?>
10 <?include defines.wxi ?>
11
11
12 <?if $(var.Platform) = "x64" ?>
12 <?if $(var.Platform) = "x64" ?>
13 <?define PFolder = ProgramFiles64Folder ?>
13 <?define PFolder = ProgramFiles64Folder ?>
14 <?else?>
14 <?else?>
15 <?define PFolder = ProgramFilesFolder ?>
15 <?define PFolder = ProgramFilesFolder ?>
16 <?endif?>
16 <?endif?>
17
17
18 <Product Id='*'
18 <Product Id='*'
19 Name='Mercurial $(var.Version) ($(var.Platform))'
19 Name='Mercurial $(var.Version) ($(var.Platform))'
20 UpgradeCode='$(var.ProductUpgradeCode)'
20 UpgradeCode='$(var.ProductUpgradeCode)'
21 Language='1033' Codepage='1252' Version='$(var.Version)'
21 Language='1033' Codepage='1252' Version='$(var.Version)'
22 Manufacturer='Matt Mackall and others'>
22 Manufacturer='Matt Mackall and others'>
23
23
24 <Package Id='*'
24 <Package Id='*'
25 Keywords='Installer'
25 Keywords='Installer'
26 Description="Mercurial distributed SCM (version $(var.Version))"
26 Description="Mercurial distributed SCM (version $(var.Version))"
27 Comments='$(var.Comments)'
27 Comments='$(var.Comments)'
28 Platform='$(var.Platform)'
28 Platform='$(var.Platform)'
29 Manufacturer='Matt Mackall and others'
29 Manufacturer='Matt Mackall and others'
30 InstallerVersion='300' Languages='1033' Compressed='yes' SummaryCodepage='1252' />
30 InstallerVersion='300' Languages='1033' Compressed='yes' SummaryCodepage='1252' />
31
31
32 <Media Id='1' Cabinet='mercurial.cab' EmbedCab='yes' DiskPrompt='CD-ROM #1'
32 <Media Id='1' Cabinet='mercurial.cab' EmbedCab='yes' DiskPrompt='CD-ROM #1'
33 CompressionLevel='high' />
33 CompressionLevel='high' />
34 <Property Id='DiskPrompt' Value="Mercurial $(var.Version) Installation [1]" />
34 <Property Id='DiskPrompt' Value="Mercurial $(var.Version) Installation [1]" />
35
35
36 <Condition Message='Mercurial MSI installers require Windows XP or higher'>
36 <Condition Message='Mercurial MSI installers require Windows XP or higher'>
37 VersionNT >= 501
37 VersionNT >= 501
38 </Condition>
38 </Condition>
39
39
40 <Property Id="INSTALLDIR">
40 <Property Id="INSTALLDIR">
41 <ComponentSearch Id='SearchForMainExecutableComponent'
41 <ComponentSearch Id='SearchForMainExecutableComponent'
42 Guid='$(var.ComponentMainExecutableGUID)' />
42 Guid='$(var.ComponentMainExecutableGUID)' />
43 </Property>
43 </Property>
44
44
45 <!--Property Id='ARPCOMMENTS'>any comments</Property-->
45 <!--Property Id='ARPCOMMENTS'>any comments</Property-->
46 <Property Id='ARPCONTACT'>mercurial@selenic.com</Property>
46 <Property Id='ARPCONTACT'>mercurial@selenic.com</Property>
47 <Property Id='ARPHELPLINK'>http://mercurial.selenic.com/wiki/</Property>
47 <Property Id='ARPHELPLINK'>http://mercurial.selenic.com/wiki/</Property>
48 <Property Id='ARPURLINFOABOUT'>http://mercurial.selenic.com/about/</Property>
48 <Property Id='ARPURLINFOABOUT'>http://mercurial.selenic.com/about/</Property>
49 <Property Id='ARPURLUPDATEINFO'>http://mercurial.selenic.com/downloads/</Property>
49 <Property Id='ARPURLUPDATEINFO'>http://mercurial.selenic.com/downloads/</Property>
50 <Property Id='ARPHELPTELEPHONE'>http://mercurial.selenic.com/wiki/Support</Property>
50 <Property Id='ARPHELPTELEPHONE'>http://mercurial.selenic.com/wiki/Support</Property>
51 <Property Id='ARPPRODUCTICON'>hgIcon.ico</Property>
51 <Property Id='ARPPRODUCTICON'>hgIcon.ico</Property>
52
52
53 <Property Id='INSTALLEDMERCURIALPRODUCTS' Secure='yes'></Property>
53 <Property Id='INSTALLEDMERCURIALPRODUCTS' Secure='yes'></Property>
54 <Property Id='REINSTALLMODE'>amus</Property>
54 <Property Id='REINSTALLMODE'>amus</Property>
55
55
56 <!--Auto-accept the license page-->
56 <!--Auto-accept the license page-->
57 <Property Id='LicenseAccepted'>1</Property>
57 <Property Id='LicenseAccepted'>1</Property>
58
58
59 <Directory Id='TARGETDIR' Name='SourceDir'>
59 <Directory Id='TARGETDIR' Name='SourceDir'>
60 <Directory Id='$(var.PFolder)' Name='PFiles'>
60 <Directory Id='$(var.PFolder)' Name='PFiles'>
61 <Directory Id='INSTALLDIR' Name='Mercurial'>
61 <Directory Id='INSTALLDIR' Name='Mercurial'>
62 <Component Id='MainExecutable' Guid='$(var.ComponentMainExecutableGUID)' Win64='$(var.IsX64)'>
62 <Component Id='MainExecutable' Guid='$(var.ComponentMainExecutableGUID)' Win64='$(var.IsX64)'>
63 <File Id='hgEXE' Name='hg.exe' Source='dist\hg.exe' KeyPath='yes' />
63 <File Id='hgEXE' Name='hg.exe' Source='dist\hg.exe' KeyPath='yes' />
64 <Environment Id="Environment" Name="PATH" Part="last" System="yes"
64 <Environment Id="Environment" Name="PATH" Part="last" System="yes"
65 Permanent="no" Value="[INSTALLDIR]" Action="set" />
65 Permanent="no" Value="[INSTALLDIR]" Action="set" />
66 </Component>
66 </Component>
67 <Component Id='ReadMe' Guid='$(var.ReadMe.guid)' Win64='$(var.IsX64)'>
67 <Component Id='ReadMe' Guid='$(var.ReadMe.guid)' Win64='$(var.IsX64)'>
68 <File Id='ReadMe' Name='ReadMe.html' Source='contrib\win32\ReadMe.html'
68 <File Id='ReadMe' Name='ReadMe.html' Source='contrib\win32\ReadMe.html'
69 KeyPath='yes'/>
69 KeyPath='yes'/>
70 </Component>
70 </Component>
71 <Component Id='COPYING' Guid='$(var.COPYING.guid)' Win64='$(var.IsX64)'>
71 <Component Id='COPYING' Guid='$(var.COPYING.guid)' Win64='$(var.IsX64)'>
72 <File Id='COPYING' Name='COPYING.rtf' Source='contrib\wix\COPYING.rtf'
72 <File Id='COPYING' Name='COPYING.rtf' Source='contrib\wix\COPYING.rtf'
73 KeyPath='yes'/>
73 KeyPath='yes'/>
74 </Component>
74 </Component>
75
75
76 <Directory Id='HGRCD' Name='hgrc.d'>
76 <Directory Id='HGRCD' Name='hgrc.d'>
77 <Component Id='mercurial.rc' Guid='$(var.mercurial.rc.guid)' Win64='$(var.IsX64)'>
77 <Component Id='mercurial.rc' Guid='$(var.mercurial.rc.guid)' Win64='$(var.IsX64)'>
78 <File Id='mercurial.rc' Name='Mercurial.rc' Source='contrib\win32\mercurial.ini'
78 <File Id='mercurial.rc' Name='Mercurial.rc' Source='contrib\win32\mercurial.ini'
79 ReadOnly='yes' KeyPath='yes'/>
79 ReadOnly='yes' KeyPath='yes'/>
80 </Component>
80 </Component>
81 <Component Id='mergetools.rc' Guid='$(var.mergetools.rc.guid)' Win64='$(var.IsX64)'>
81 <Component Id='mergetools.rc' Guid='$(var.mergetools.rc.guid)' Win64='$(var.IsX64)'>
82 <File Id='mergetools.rc' Name='MergeTools.rc' Source='mercurial\default.d\mergetools.rc'
82 <File Id='mergetools.rc' Name='MergeTools.rc' Source='mercurial\default.d\mergetools.rc'
83 ReadOnly='yes' KeyPath='yes'/>
83 ReadOnly='yes' KeyPath='yes'/>
84 </Component>
84 </Component>
85 </Directory>
85 </Directory>
86
86
87 </Directory>
87 </Directory>
88 </Directory>
88 </Directory>
89
89
90 <Directory Id="ProgramMenuFolder" Name="Programs">
90 <Directory Id="ProgramMenuFolder" Name="Programs">
91 <Directory Id="ProgramMenuDir" Name="Mercurial $(var.Version)">
91 <Directory Id="ProgramMenuDir" Name="Mercurial $(var.Version)">
92 <Component Id="ProgramMenuDir" Guid="$(var.ProgramMenuDir.guid)" Win64='$(var.IsX64)'>
92 <Component Id="ProgramMenuDir" Guid="$(var.ProgramMenuDir.guid)" Win64='$(var.IsX64)'>
93 <RemoveFolder Id='ProgramMenuDir' On='uninstall' />
93 <RemoveFolder Id='ProgramMenuDir' On='uninstall' />
94 <RegistryValue Root='HKCU' Key='Software\Mercurial\InstallDir' Type='string'
94 <RegistryValue Root='HKCU' Key='Software\Mercurial\InstallDir' Type='string'
95 Value='[INSTALLDIR]' KeyPath='yes' />
95 Value='[INSTALLDIR]' KeyPath='yes' />
96 <Shortcut Id='UrlShortcut' Directory='ProgramMenuDir' Name='Mercurial Web Site'
96 <Shortcut Id='UrlShortcut' Directory='ProgramMenuDir' Name='Mercurial Web Site'
97 Target='[ARPHELPLINK]' Icon="hgIcon.ico" IconIndex='0' />
97 Target='[ARPHELPLINK]' Icon="hgIcon.ico" IconIndex='0' />
98 </Component>
98 </Component>
99 </Directory>
99 </Directory>
100 </Directory>
100 </Directory>
101
101
102 <?if $(var.Platform) = "x86" ?>
102 <?if $(var.Platform) = "x86" ?>
103 <Merge Id='VCRuntime' DiskId='1' Language='1033'
103 <Merge Id='VCRuntime' DiskId='1' Language='1033'
104 SourceFile='$(var.VCRedistSrcDir)\microsoft.vcxx.crt.x86_msm.msm' />
104 SourceFile='$(var.VCRedistSrcDir)\microsoft.vcxx.crt.x86_msm.msm' />
105 <Merge Id='VCRuntimePolicy' DiskId='1' Language='1033'
105 <Merge Id='VCRuntimePolicy' DiskId='1' Language='1033'
106 SourceFile='$(var.VCRedistSrcDir)\policy.x.xx.microsoft.vcxx.crt.x86_msm.msm' />
106 SourceFile='$(var.VCRedistSrcDir)\policy.x.xx.microsoft.vcxx.crt.x86_msm.msm' />
107 <?else?>
107 <?else?>
108 <Merge Id='VCRuntime' DiskId='1' Language='1033'
108 <Merge Id='VCRuntime' DiskId='1' Language='1033'
109 SourceFile='$(var.VCRedistSrcDir)\microsoft.vcxx.crt.x64_msm.msm' />
109 SourceFile='$(var.VCRedistSrcDir)\microsoft.vcxx.crt.x64_msm.msm' />
110 <Merge Id='VCRuntimePolicy' DiskId='1' Language='1033'
110 <Merge Id='VCRuntimePolicy' DiskId='1' Language='1033'
111 SourceFile='$(var.VCRedistSrcDir)\policy.x.xx.microsoft.vcxx.crt.x64_msm.msm' />
111 SourceFile='$(var.VCRedistSrcDir)\policy.x.xx.microsoft.vcxx.crt.x64_msm.msm' />
112 <?endif?>
112 <?endif?>
113 </Directory>
113 </Directory>
114
114
115 <Feature Id='Complete' Title='Mercurial' Description='The complete package'
115 <Feature Id='Complete' Title='Mercurial' Description='The complete package'
116 Display='expand' Level='1' ConfigurableDirectory='INSTALLDIR' >
116 Display='expand' Level='1' ConfigurableDirectory='INSTALLDIR' >
117 <Feature Id='MainProgram' Title='Program' Description='Mercurial command line app'
117 <Feature Id='MainProgram' Title='Program' Description='Mercurial command line app'
118 Level='1' Absent='disallow' >
118 Level='1' Absent='disallow' >
119 <ComponentRef Id='MainExecutable' />
119 <ComponentRef Id='MainExecutable' />
120 <ComponentRef Id='distOutput' />
120 <ComponentRef Id='distOutput' />
121 <ComponentRef Id='libOutput' />
121 <ComponentRef Id='ProgramMenuDir' />
122 <ComponentRef Id='ProgramMenuDir' />
122 <ComponentRef Id='ReadMe' />
123 <ComponentRef Id='ReadMe' />
123 <ComponentRef Id='COPYING' />
124 <ComponentRef Id='COPYING' />
124 <ComponentRef Id='mercurial.rc' />
125 <ComponentRef Id='mercurial.rc' />
125 <ComponentRef Id='mergetools.rc' />
126 <ComponentRef Id='mergetools.rc' />
126 <ComponentRef Id='helpFolder' />
127 <ComponentRef Id='helpFolder' />
127 <ComponentGroupRef Id='templatesFolder' />
128 <ComponentGroupRef Id='templatesFolder' />
128 <MergeRef Id='VCRuntime' />
129 <MergeRef Id='VCRuntime' />
129 <MergeRef Id='VCRuntimePolicy' />
130 <MergeRef Id='VCRuntimePolicy' />
130 </Feature>
131 </Feature>
131 <Feature Id='Locales' Title='Translations' Description='Translations' Level='1'>
132 <Feature Id='Locales' Title='Translations' Description='Translations' Level='1'>
132 <ComponentGroupRef Id='localeFolder' />
133 <ComponentGroupRef Id='localeFolder' />
133 <ComponentRef Id='i18nFolder' />
134 <ComponentRef Id='i18nFolder' />
134 </Feature>
135 </Feature>
135 <Feature Id='Documentation' Title='Documentation' Description='HTML man pages' Level='1'>
136 <Feature Id='Documentation' Title='Documentation' Description='HTML man pages' Level='1'>
136 <ComponentGroupRef Id='docFolder' />
137 <ComponentGroupRef Id='docFolder' />
137 </Feature>
138 </Feature>
138 <Feature Id='Misc' Title='Miscellaneous' Description='Contributed scripts' Level='1'>
139 <Feature Id='Misc' Title='Miscellaneous' Description='Contributed scripts' Level='1'>
139 <ComponentGroupRef Id='contribFolder' />
140 <ComponentGroupRef Id='contribFolder' />
140 </Feature>
141 </Feature>
141 </Feature>
142 </Feature>
142
143
143 <UIRef Id="WixUI_FeatureTree" />
144 <UIRef Id="WixUI_FeatureTree" />
144 <UIRef Id="WixUI_ErrorProgressText" />
145 <UIRef Id="WixUI_ErrorProgressText" />
145
146
146 <WixVariable Id="WixUILicenseRtf" Value="contrib\wix\COPYING.rtf" />
147 <WixVariable Id="WixUILicenseRtf" Value="contrib\wix\COPYING.rtf" />
147
148
148 <Icon Id="hgIcon.ico" SourceFile="contrib/win32/mercurial.ico" />
149 <Icon Id="hgIcon.ico" SourceFile="contrib/win32/mercurial.ico" />
149
150
150 <Upgrade Id='$(var.ProductUpgradeCode)'>
151 <Upgrade Id='$(var.ProductUpgradeCode)'>
151 <UpgradeVersion
152 <UpgradeVersion
152 IncludeMinimum='yes' Minimum='0.0.0' IncludeMaximum='no' OnlyDetect='no'
153 IncludeMinimum='yes' Minimum='0.0.0' IncludeMaximum='no' OnlyDetect='no'
153 Property='INSTALLEDMERCURIALPRODUCTS' />
154 Property='INSTALLEDMERCURIALPRODUCTS' />
154 </Upgrade>
155 </Upgrade>
155
156
156 <InstallExecuteSequence>
157 <InstallExecuteSequence>
157 <RemoveExistingProducts After='InstallInitialize'/>
158 <RemoveExistingProducts After='InstallInitialize'/>
158 </InstallExecuteSequence>
159 </InstallExecuteSequence>
159
160
160 </Product>
161 </Product>
161 </Wix>
162 </Wix>
@@ -1,646 +1,648 b''
1 #
1 #
2 # This is the mercurial setup script.
2 # This is the mercurial setup script.
3 #
3 #
4 # 'python setup.py install', or
4 # 'python setup.py install', or
5 # 'python setup.py --help' for more options
5 # 'python setup.py --help' for more options
6
6
7 import sys, platform
7 import sys, platform
8 if getattr(sys, 'version_info', (0, 0, 0)) < (2, 6, 0, 'final'):
8 if getattr(sys, 'version_info', (0, 0, 0)) < (2, 6, 0, 'final'):
9 raise SystemExit("Mercurial requires Python 2.6 or later.")
9 raise SystemExit("Mercurial requires Python 2.6 or later.")
10
10
11 if sys.version_info[0] >= 3:
11 if sys.version_info[0] >= 3:
12 def b(s):
12 def b(s):
13 '''A helper function to emulate 2.6+ bytes literals using string
13 '''A helper function to emulate 2.6+ bytes literals using string
14 literals.'''
14 literals.'''
15 return s.encode('latin1')
15 return s.encode('latin1')
16 printf = eval('print')
16 printf = eval('print')
17 libdir_escape = 'unicode_escape'
17 libdir_escape = 'unicode_escape'
18 else:
18 else:
19 libdir_escape = 'string_escape'
19 libdir_escape = 'string_escape'
20 def b(s):
20 def b(s):
21 '''A helper function to emulate 2.6+ bytes literals using string
21 '''A helper function to emulate 2.6+ bytes literals using string
22 literals.'''
22 literals.'''
23 return s
23 return s
24 def printf(*args, **kwargs):
24 def printf(*args, **kwargs):
25 f = kwargs.get('file', sys.stdout)
25 f = kwargs.get('file', sys.stdout)
26 end = kwargs.get('end', '\n')
26 end = kwargs.get('end', '\n')
27 f.write(b(' ').join(args) + end)
27 f.write(b(' ').join(args) + end)
28
28
29 # Solaris Python packaging brain damage
29 # Solaris Python packaging brain damage
30 try:
30 try:
31 import hashlib
31 import hashlib
32 sha = hashlib.sha1()
32 sha = hashlib.sha1()
33 except ImportError:
33 except ImportError:
34 try:
34 try:
35 import sha
35 import sha
36 sha.sha # silence unused import warning
36 sha.sha # silence unused import warning
37 except ImportError:
37 except ImportError:
38 raise SystemExit(
38 raise SystemExit(
39 "Couldn't import standard hashlib (incomplete Python install).")
39 "Couldn't import standard hashlib (incomplete Python install).")
40
40
41 try:
41 try:
42 import zlib
42 import zlib
43 zlib.compressobj # silence unused import warning
43 zlib.compressobj # silence unused import warning
44 except ImportError:
44 except ImportError:
45 raise SystemExit(
45 raise SystemExit(
46 "Couldn't import standard zlib (incomplete Python install).")
46 "Couldn't import standard zlib (incomplete Python install).")
47
47
48 # The base IronPython distribution (as of 2.7.1) doesn't support bz2
48 # The base IronPython distribution (as of 2.7.1) doesn't support bz2
49 isironpython = False
49 isironpython = False
50 try:
50 try:
51 isironpython = (platform.python_implementation()
51 isironpython = (platform.python_implementation()
52 .lower().find("ironpython") != -1)
52 .lower().find("ironpython") != -1)
53 except AttributeError:
53 except AttributeError:
54 pass
54 pass
55
55
56 if isironpython:
56 if isironpython:
57 sys.stderr.write("warning: IronPython detected (no bz2 support)\n")
57 sys.stderr.write("warning: IronPython detected (no bz2 support)\n")
58 else:
58 else:
59 try:
59 try:
60 import bz2
60 import bz2
61 bz2.BZ2Compressor # silence unused import warning
61 bz2.BZ2Compressor # silence unused import warning
62 except ImportError:
62 except ImportError:
63 raise SystemExit(
63 raise SystemExit(
64 "Couldn't import standard bz2 (incomplete Python install).")
64 "Couldn't import standard bz2 (incomplete Python install).")
65
65
66 ispypy = "PyPy" in sys.version
66 ispypy = "PyPy" in sys.version
67
67
68 import os, stat, subprocess, time
68 import os, stat, subprocess, time
69 import re
69 import re
70 import shutil
70 import shutil
71 import tempfile
71 import tempfile
72 from distutils import log
72 from distutils import log
73 from distutils.core import setup, Command, Extension
73 from distutils.core import setup, Command, Extension
74 from distutils.dist import Distribution
74 from distutils.dist import Distribution
75 from distutils.command.build import build
75 from distutils.command.build import build
76 from distutils.command.build_ext import build_ext
76 from distutils.command.build_ext import build_ext
77 from distutils.command.build_py import build_py
77 from distutils.command.build_py import build_py
78 from distutils.command.install_lib import install_lib
78 from distutils.command.install_lib import install_lib
79 from distutils.command.install_scripts import install_scripts
79 from distutils.command.install_scripts import install_scripts
80 from distutils.spawn import spawn, find_executable
80 from distutils.spawn import spawn, find_executable
81 from distutils import file_util
81 from distutils import file_util
82 from distutils.errors import CCompilerError, DistutilsExecError
82 from distutils.errors import CCompilerError, DistutilsExecError
83 from distutils.sysconfig import get_python_inc, get_config_var
83 from distutils.sysconfig import get_python_inc, get_config_var
84 from distutils.version import StrictVersion
84 from distutils.version import StrictVersion
85
85
86 convert2to3 = '--c2to3' in sys.argv
86 convert2to3 = '--c2to3' in sys.argv
87 if convert2to3:
87 if convert2to3:
88 try:
88 try:
89 from distutils.command.build_py import build_py_2to3 as build_py
89 from distutils.command.build_py import build_py_2to3 as build_py
90 from lib2to3.refactor import get_fixers_from_package as getfixers
90 from lib2to3.refactor import get_fixers_from_package as getfixers
91 except ImportError:
91 except ImportError:
92 if sys.version_info[0] < 3:
92 if sys.version_info[0] < 3:
93 raise SystemExit("--c2to3 is only compatible with python3.")
93 raise SystemExit("--c2to3 is only compatible with python3.")
94 raise
94 raise
95 sys.path.append('contrib')
95 sys.path.append('contrib')
96 elif sys.version_info[0] >= 3:
96 elif sys.version_info[0] >= 3:
97 raise SystemExit("setup.py with python3 needs --c2to3 (experimental)")
97 raise SystemExit("setup.py with python3 needs --c2to3 (experimental)")
98
98
99 scripts = ['hg']
99 scripts = ['hg']
100 if os.name == 'nt':
100 if os.name == 'nt':
101 scripts.append('contrib/win32/hg.bat')
101 scripts.append('contrib/win32/hg.bat')
102
102
103 # simplified version of distutils.ccompiler.CCompiler.has_function
103 # simplified version of distutils.ccompiler.CCompiler.has_function
104 # that actually removes its temporary files.
104 # that actually removes its temporary files.
105 def hasfunction(cc, funcname):
105 def hasfunction(cc, funcname):
106 tmpdir = tempfile.mkdtemp(prefix='hg-install-')
106 tmpdir = tempfile.mkdtemp(prefix='hg-install-')
107 devnull = oldstderr = None
107 devnull = oldstderr = None
108 try:
108 try:
109 fname = os.path.join(tmpdir, 'funcname.c')
109 fname = os.path.join(tmpdir, 'funcname.c')
110 f = open(fname, 'w')
110 f = open(fname, 'w')
111 f.write('int main(void) {\n')
111 f.write('int main(void) {\n')
112 f.write(' %s();\n' % funcname)
112 f.write(' %s();\n' % funcname)
113 f.write('}\n')
113 f.write('}\n')
114 f.close()
114 f.close()
115 # Redirect stderr to /dev/null to hide any error messages
115 # Redirect stderr to /dev/null to hide any error messages
116 # from the compiler.
116 # from the compiler.
117 # This will have to be changed if we ever have to check
117 # This will have to be changed if we ever have to check
118 # for a function on Windows.
118 # for a function on Windows.
119 devnull = open('/dev/null', 'w')
119 devnull = open('/dev/null', 'w')
120 oldstderr = os.dup(sys.stderr.fileno())
120 oldstderr = os.dup(sys.stderr.fileno())
121 os.dup2(devnull.fileno(), sys.stderr.fileno())
121 os.dup2(devnull.fileno(), sys.stderr.fileno())
122 objects = cc.compile([fname], output_dir=tmpdir)
122 objects = cc.compile([fname], output_dir=tmpdir)
123 cc.link_executable(objects, os.path.join(tmpdir, "a.out"))
123 cc.link_executable(objects, os.path.join(tmpdir, "a.out"))
124 return True
124 return True
125 except Exception:
125 except Exception:
126 return False
126 return False
127 finally:
127 finally:
128 if oldstderr is not None:
128 if oldstderr is not None:
129 os.dup2(oldstderr, sys.stderr.fileno())
129 os.dup2(oldstderr, sys.stderr.fileno())
130 if devnull is not None:
130 if devnull is not None:
131 devnull.close()
131 devnull.close()
132 shutil.rmtree(tmpdir)
132 shutil.rmtree(tmpdir)
133
133
134 # py2exe needs to be installed to work
134 # py2exe needs to be installed to work
135 try:
135 try:
136 import py2exe
136 import py2exe
137 py2exe.Distribution # silence unused import warning
137 py2exe.Distribution # silence unused import warning
138 py2exeloaded = True
138 py2exeloaded = True
139 # import py2exe's patched Distribution class
139 # import py2exe's patched Distribution class
140 from distutils.core import Distribution
140 from distutils.core import Distribution
141 except ImportError:
141 except ImportError:
142 py2exeloaded = False
142 py2exeloaded = False
143
143
144 def runcmd(cmd, env):
144 def runcmd(cmd, env):
145 if (sys.platform == 'plan9'
145 if (sys.platform == 'plan9'
146 and (sys.version_info[0] == 2 and sys.version_info[1] < 7)):
146 and (sys.version_info[0] == 2 and sys.version_info[1] < 7)):
147 # subprocess kludge to work around issues in half-baked Python
147 # subprocess kludge to work around issues in half-baked Python
148 # ports, notably bichued/python:
148 # ports, notably bichued/python:
149 _, out, err = os.popen3(cmd)
149 _, out, err = os.popen3(cmd)
150 return str(out), str(err)
150 return str(out), str(err)
151 else:
151 else:
152 p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
152 p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
153 stderr=subprocess.PIPE, env=env)
153 stderr=subprocess.PIPE, env=env)
154 out, err = p.communicate()
154 out, err = p.communicate()
155 return out, err
155 return out, err
156
156
157 def runhg(cmd, env):
157 def runhg(cmd, env):
158 out, err = runcmd(cmd, env)
158 out, err = runcmd(cmd, env)
159 # If root is executing setup.py, but the repository is owned by
159 # If root is executing setup.py, but the repository is owned by
160 # another user (as in "sudo python setup.py install") we will get
160 # another user (as in "sudo python setup.py install") we will get
161 # trust warnings since the .hg/hgrc file is untrusted. That is
161 # trust warnings since the .hg/hgrc file is untrusted. That is
162 # fine, we don't want to load it anyway. Python may warn about
162 # fine, we don't want to load it anyway. Python may warn about
163 # a missing __init__.py in mercurial/locale, we also ignore that.
163 # a missing __init__.py in mercurial/locale, we also ignore that.
164 err = [e for e in err.splitlines()
164 err = [e for e in err.splitlines()
165 if not e.startswith(b('not trusting file')) \
165 if not e.startswith(b('not trusting file')) \
166 and not e.startswith(b('warning: Not importing')) \
166 and not e.startswith(b('warning: Not importing')) \
167 and not e.startswith(b('obsolete feature not enabled'))]
167 and not e.startswith(b('obsolete feature not enabled'))]
168 if err:
168 if err:
169 printf("stderr from '%s':" % (' '.join(cmd)), file=sys.stderr)
169 printf("stderr from '%s':" % (' '.join(cmd)), file=sys.stderr)
170 printf(b('\n').join([b(' ') + e for e in err]), file=sys.stderr)
170 printf(b('\n').join([b(' ') + e for e in err]), file=sys.stderr)
171 return ''
171 return ''
172 return out
172 return out
173
173
174 version = ''
174 version = ''
175
175
176 # Execute hg out of this directory with a custom environment which
176 # Execute hg out of this directory with a custom environment which
177 # includes the pure Python modules in mercurial/pure. We also take
177 # includes the pure Python modules in mercurial/pure. We also take
178 # care to not use any hgrc files and do no localization.
178 # care to not use any hgrc files and do no localization.
179 pypath = ['mercurial', os.path.join('mercurial', 'pure')]
179 pypath = ['mercurial', os.path.join('mercurial', 'pure')]
180 env = {'PYTHONPATH': os.pathsep.join(pypath),
180 env = {'PYTHONPATH': os.pathsep.join(pypath),
181 'HGRCPATH': '',
181 'HGRCPATH': '',
182 'LANGUAGE': 'C'}
182 'LANGUAGE': 'C'}
183 if 'LD_LIBRARY_PATH' in os.environ:
183 if 'LD_LIBRARY_PATH' in os.environ:
184 env['LD_LIBRARY_PATH'] = os.environ['LD_LIBRARY_PATH']
184 env['LD_LIBRARY_PATH'] = os.environ['LD_LIBRARY_PATH']
185 if 'SystemRoot' in os.environ:
185 if 'SystemRoot' in os.environ:
186 # Copy SystemRoot into the custom environment for Python 2.6
186 # Copy SystemRoot into the custom environment for Python 2.6
187 # under Windows. Otherwise, the subprocess will fail with
187 # under Windows. Otherwise, the subprocess will fail with
188 # error 0xc0150004. See: http://bugs.python.org/issue3440
188 # error 0xc0150004. See: http://bugs.python.org/issue3440
189 env['SystemRoot'] = os.environ['SystemRoot']
189 env['SystemRoot'] = os.environ['SystemRoot']
190
190
191 if os.path.isdir('.hg'):
191 if os.path.isdir('.hg'):
192 cmd = [sys.executable, 'hg', 'log', '-r', '.', '--template', '{tags}\n']
192 cmd = [sys.executable, 'hg', 'log', '-r', '.', '--template', '{tags}\n']
193 numerictags = [t for t in runhg(cmd, env).split() if t[0].isdigit()]
193 numerictags = [t for t in runhg(cmd, env).split() if t[0].isdigit()]
194 hgid = runhg([sys.executable, 'hg', 'id', '-i'], env).strip()
194 hgid = runhg([sys.executable, 'hg', 'id', '-i'], env).strip()
195 if numerictags: # tag(s) found
195 if numerictags: # tag(s) found
196 version = numerictags[-1]
196 version = numerictags[-1]
197 if hgid.endswith('+'): # propagate the dirty status to the tag
197 if hgid.endswith('+'): # propagate the dirty status to the tag
198 version += '+'
198 version += '+'
199 else: # no tag found
199 else: # no tag found
200 ltagcmd = [sys.executable, 'hg', 'parents', '--template',
200 ltagcmd = [sys.executable, 'hg', 'parents', '--template',
201 '{latesttag}']
201 '{latesttag}']
202 ltag = runhg(ltagcmd, env)
202 ltag = runhg(ltagcmd, env)
203 changessincecmd = [sys.executable, 'hg', 'log', '-T', 'x\n', '-r',
203 changessincecmd = [sys.executable, 'hg', 'log', '-T', 'x\n', '-r',
204 "only(.,'%s')" % ltag]
204 "only(.,'%s')" % ltag]
205 changessince = len(runhg(changessincecmd, env).splitlines())
205 changessince = len(runhg(changessincecmd, env).splitlines())
206 version = '%s+%s-%s' % (ltag, changessince, hgid)
206 version = '%s+%s-%s' % (ltag, changessince, hgid)
207 if version.endswith('+'):
207 if version.endswith('+'):
208 version += time.strftime('%Y%m%d')
208 version += time.strftime('%Y%m%d')
209 elif os.path.exists('.hg_archival.txt'):
209 elif os.path.exists('.hg_archival.txt'):
210 kw = dict([[t.strip() for t in l.split(':', 1)]
210 kw = dict([[t.strip() for t in l.split(':', 1)]
211 for l in open('.hg_archival.txt')])
211 for l in open('.hg_archival.txt')])
212 if 'tag' in kw:
212 if 'tag' in kw:
213 version = kw['tag']
213 version = kw['tag']
214 elif 'latesttag' in kw:
214 elif 'latesttag' in kw:
215 if 'changessincelatesttag' in kw:
215 if 'changessincelatesttag' in kw:
216 version = '%(latesttag)s+%(changessincelatesttag)s-%(node).12s' % kw
216 version = '%(latesttag)s+%(changessincelatesttag)s-%(node).12s' % kw
217 else:
217 else:
218 version = '%(latesttag)s+%(latesttagdistance)s-%(node).12s' % kw
218 version = '%(latesttag)s+%(latesttagdistance)s-%(node).12s' % kw
219 else:
219 else:
220 version = kw.get('node', '')[:12]
220 version = kw.get('node', '')[:12]
221
221
222 if version:
222 if version:
223 f = open("mercurial/__version__.py", "w")
223 f = open("mercurial/__version__.py", "w")
224 f.write('# this file is autogenerated by setup.py\n')
224 f.write('# this file is autogenerated by setup.py\n')
225 f.write('version = "%s"\n' % version)
225 f.write('version = "%s"\n' % version)
226 f.close()
226 f.close()
227
227
228
228
229 try:
229 try:
230 from mercurial import __version__
230 from mercurial import __version__
231 version = __version__.version
231 version = __version__.version
232 except ImportError:
232 except ImportError:
233 version = 'unknown'
233 version = 'unknown'
234
234
235 class hgbuild(build):
235 class hgbuild(build):
236 # Insert hgbuildmo first so that files in mercurial/locale/ are found
236 # Insert hgbuildmo first so that files in mercurial/locale/ are found
237 # when build_py is run next.
237 # when build_py is run next.
238 sub_commands = [('build_mo', None),
238 sub_commands = [('build_mo', None),
239
239
240 # We also need build_ext before build_py. Otherwise, when 2to3 is
240 # We also need build_ext before build_py. Otherwise, when 2to3 is
241 # called (in build_py), it will not find osutil & friends,
241 # called (in build_py), it will not find osutil & friends,
242 # thinking that those modules are global and, consequently, making
242 # thinking that those modules are global and, consequently, making
243 # a mess, now that all module imports are global.
243 # a mess, now that all module imports are global.
244
244
245 ('build_ext', build.has_ext_modules),
245 ('build_ext', build.has_ext_modules),
246 ] + build.sub_commands
246 ] + build.sub_commands
247
247
248 class hgbuildmo(build):
248 class hgbuildmo(build):
249
249
250 description = "build translations (.mo files)"
250 description = "build translations (.mo files)"
251
251
252 def run(self):
252 def run(self):
253 if not find_executable('msgfmt'):
253 if not find_executable('msgfmt'):
254 self.warn("could not find msgfmt executable, no translations "
254 self.warn("could not find msgfmt executable, no translations "
255 "will be built")
255 "will be built")
256 return
256 return
257
257
258 podir = 'i18n'
258 podir = 'i18n'
259 if not os.path.isdir(podir):
259 if not os.path.isdir(podir):
260 self.warn("could not find %s/ directory" % podir)
260 self.warn("could not find %s/ directory" % podir)
261 return
261 return
262
262
263 join = os.path.join
263 join = os.path.join
264 for po in os.listdir(podir):
264 for po in os.listdir(podir):
265 if not po.endswith('.po'):
265 if not po.endswith('.po'):
266 continue
266 continue
267 pofile = join(podir, po)
267 pofile = join(podir, po)
268 modir = join('locale', po[:-3], 'LC_MESSAGES')
268 modir = join('locale', po[:-3], 'LC_MESSAGES')
269 mofile = join(modir, 'hg.mo')
269 mofile = join(modir, 'hg.mo')
270 mobuildfile = join('mercurial', mofile)
270 mobuildfile = join('mercurial', mofile)
271 cmd = ['msgfmt', '-v', '-o', mobuildfile, pofile]
271 cmd = ['msgfmt', '-v', '-o', mobuildfile, pofile]
272 if sys.platform != 'sunos5':
272 if sys.platform != 'sunos5':
273 # msgfmt on Solaris does not know about -c
273 # msgfmt on Solaris does not know about -c
274 cmd.append('-c')
274 cmd.append('-c')
275 self.mkpath(join('mercurial', modir))
275 self.mkpath(join('mercurial', modir))
276 self.make_file([pofile], mobuildfile, spawn, (cmd,))
276 self.make_file([pofile], mobuildfile, spawn, (cmd,))
277
277
278
278
279 class hgdist(Distribution):
279 class hgdist(Distribution):
280 pure = ispypy
280 pure = ispypy
281
281
282 global_options = Distribution.global_options + \
282 global_options = Distribution.global_options + \
283 [('pure', None, "use pure (slow) Python "
283 [('pure', None, "use pure (slow) Python "
284 "code instead of C extensions"),
284 "code instead of C extensions"),
285 ('c2to3', None, "(experimental!) convert "
285 ('c2to3', None, "(experimental!) convert "
286 "code with 2to3"),
286 "code with 2to3"),
287 ]
287 ]
288
288
289 def has_ext_modules(self):
289 def has_ext_modules(self):
290 # self.ext_modules is emptied in hgbuildpy.finalize_options which is
290 # self.ext_modules is emptied in hgbuildpy.finalize_options which is
291 # too late for some cases
291 # too late for some cases
292 return not self.pure and Distribution.has_ext_modules(self)
292 return not self.pure and Distribution.has_ext_modules(self)
293
293
294 class hgbuildext(build_ext):
294 class hgbuildext(build_ext):
295
295
296 def build_extension(self, ext):
296 def build_extension(self, ext):
297 try:
297 try:
298 build_ext.build_extension(self, ext)
298 build_ext.build_extension(self, ext)
299 except CCompilerError:
299 except CCompilerError:
300 if not getattr(ext, 'optional', False):
300 if not getattr(ext, 'optional', False):
301 raise
301 raise
302 log.warn("Failed to build optional extension '%s' (skipping)",
302 log.warn("Failed to build optional extension '%s' (skipping)",
303 ext.name)
303 ext.name)
304
304
305 class hgbuildpy(build_py):
305 class hgbuildpy(build_py):
306 if convert2to3:
306 if convert2to3:
307 fixer_names = sorted(set(getfixers("lib2to3.fixes") +
307 fixer_names = sorted(set(getfixers("lib2to3.fixes") +
308 getfixers("hgfixes")))
308 getfixers("hgfixes")))
309
309
310 def finalize_options(self):
310 def finalize_options(self):
311 build_py.finalize_options(self)
311 build_py.finalize_options(self)
312
312
313 if self.distribution.pure:
313 if self.distribution.pure:
314 if self.py_modules is None:
314 if self.py_modules is None:
315 self.py_modules = []
315 self.py_modules = []
316 for ext in self.distribution.ext_modules:
316 for ext in self.distribution.ext_modules:
317 if ext.name.startswith("mercurial."):
317 if ext.name.startswith("mercurial."):
318 self.py_modules.append("mercurial.pure.%s" % ext.name[10:])
318 self.py_modules.append("mercurial.pure.%s" % ext.name[10:])
319 self.distribution.ext_modules = []
319 self.distribution.ext_modules = []
320 else:
320 else:
321 h = os.path.join(get_python_inc(), 'Python.h')
321 h = os.path.join(get_python_inc(), 'Python.h')
322 if not os.path.exists(h):
322 if not os.path.exists(h):
323 raise SystemExit('Python headers are required to build '
323 raise SystemExit('Python headers are required to build '
324 'Mercurial but weren\'t found in %s' % h)
324 'Mercurial but weren\'t found in %s' % h)
325
325
326 def find_modules(self):
326 def find_modules(self):
327 modules = build_py.find_modules(self)
327 modules = build_py.find_modules(self)
328 for module in modules:
328 for module in modules:
329 if module[0] == "mercurial.pure":
329 if module[0] == "mercurial.pure":
330 if module[1] != "__init__":
330 if module[1] != "__init__":
331 yield ("mercurial", module[1], module[2])
331 yield ("mercurial", module[1], module[2])
332 else:
332 else:
333 yield module
333 yield module
334
334
335 class buildhgextindex(Command):
335 class buildhgextindex(Command):
336 description = 'generate prebuilt index of hgext (for frozen package)'
336 description = 'generate prebuilt index of hgext (for frozen package)'
337 user_options = []
337 user_options = []
338 _indexfilename = 'hgext/__index__.py'
338 _indexfilename = 'hgext/__index__.py'
339
339
340 def initialize_options(self):
340 def initialize_options(self):
341 pass
341 pass
342
342
343 def finalize_options(self):
343 def finalize_options(self):
344 pass
344 pass
345
345
346 def run(self):
346 def run(self):
347 if os.path.exists(self._indexfilename):
347 if os.path.exists(self._indexfilename):
348 f = open(self._indexfilename, 'w')
348 f = open(self._indexfilename, 'w')
349 f.write('# empty\n')
349 f.write('# empty\n')
350 f.close()
350 f.close()
351
351
352 # here no extension enabled, disabled() lists up everything
352 # here no extension enabled, disabled() lists up everything
353 code = ('import pprint; from mercurial import extensions; '
353 code = ('import pprint; from mercurial import extensions; '
354 'pprint.pprint(extensions.disabled())')
354 'pprint.pprint(extensions.disabled())')
355 out, err = runcmd([sys.executable, '-c', code], env)
355 out, err = runcmd([sys.executable, '-c', code], env)
356 if err:
356 if err:
357 raise DistutilsExecError(err)
357 raise DistutilsExecError(err)
358
358
359 f = open(self._indexfilename, 'w')
359 f = open(self._indexfilename, 'w')
360 f.write('# this file is autogenerated by setup.py\n')
360 f.write('# this file is autogenerated by setup.py\n')
361 f.write('docs = ')
361 f.write('docs = ')
362 f.write(out)
362 f.write(out)
363 f.close()
363 f.close()
364
364
365 class buildhgexe(build_ext):
365 class buildhgexe(build_ext):
366 description = 'compile hg.exe from mercurial/exewrapper.c'
366 description = 'compile hg.exe from mercurial/exewrapper.c'
367
367
368 def build_extensions(self):
368 def build_extensions(self):
369 if os.name != 'nt':
369 if os.name != 'nt':
370 return
370 return
371 if isinstance(self.compiler, HackedMingw32CCompiler):
371 if isinstance(self.compiler, HackedMingw32CCompiler):
372 self.compiler.compiler_so = self.compiler.compiler # no -mdll
372 self.compiler.compiler_so = self.compiler.compiler # no -mdll
373 self.compiler.dll_libraries = [] # no -lmsrvc90
373 self.compiler.dll_libraries = [] # no -lmsrvc90
374 hv = sys.hexversion
374 hv = sys.hexversion
375 pythonlib = 'python%d%d' % (hv >> 24, (hv >> 16) & 0xff)
375 pythonlib = 'python%d%d' % (hv >> 24, (hv >> 16) & 0xff)
376 f = open('mercurial/hgpythonlib.h', 'wb')
376 f = open('mercurial/hgpythonlib.h', 'wb')
377 f.write('/* this file is autogenerated by setup.py */\n')
377 f.write('/* this file is autogenerated by setup.py */\n')
378 f.write('#define HGPYTHONLIB "%s"\n' % pythonlib)
378 f.write('#define HGPYTHONLIB "%s"\n' % pythonlib)
379 f.close()
379 f.close()
380 objects = self.compiler.compile(['mercurial/exewrapper.c'],
380 objects = self.compiler.compile(['mercurial/exewrapper.c'],
381 output_dir=self.build_temp)
381 output_dir=self.build_temp)
382 dir = os.path.dirname(self.get_ext_fullpath('dummy'))
382 dir = os.path.dirname(self.get_ext_fullpath('dummy'))
383 target = os.path.join(dir, 'hg')
383 target = os.path.join(dir, 'hg')
384 self.compiler.link_executable(objects, target,
384 self.compiler.link_executable(objects, target,
385 libraries=[],
385 libraries=[],
386 output_dir=self.build_temp)
386 output_dir=self.build_temp)
387
387
388 class hginstalllib(install_lib):
388 class hginstalllib(install_lib):
389 '''
389 '''
390 This is a specialization of install_lib that replaces the copy_file used
390 This is a specialization of install_lib that replaces the copy_file used
391 there so that it supports setting the mode of files after copying them,
391 there so that it supports setting the mode of files after copying them,
392 instead of just preserving the mode that the files originally had. If your
392 instead of just preserving the mode that the files originally had. If your
393 system has a umask of something like 027, preserving the permissions when
393 system has a umask of something like 027, preserving the permissions when
394 copying will lead to a broken install.
394 copying will lead to a broken install.
395
395
396 Note that just passing keep_permissions=False to copy_file would be
396 Note that just passing keep_permissions=False to copy_file would be
397 insufficient, as it might still be applying a umask.
397 insufficient, as it might still be applying a umask.
398 '''
398 '''
399
399
400 def run(self):
400 def run(self):
401 realcopyfile = file_util.copy_file
401 realcopyfile = file_util.copy_file
402 def copyfileandsetmode(*args, **kwargs):
402 def copyfileandsetmode(*args, **kwargs):
403 src, dst = args[0], args[1]
403 src, dst = args[0], args[1]
404 dst, copied = realcopyfile(*args, **kwargs)
404 dst, copied = realcopyfile(*args, **kwargs)
405 if copied:
405 if copied:
406 st = os.stat(src)
406 st = os.stat(src)
407 # Persist executable bit (apply it to group and other if user
407 # Persist executable bit (apply it to group and other if user
408 # has it)
408 # has it)
409 if st[stat.ST_MODE] & stat.S_IXUSR:
409 if st[stat.ST_MODE] & stat.S_IXUSR:
410 setmode = int('0755', 8)
410 setmode = int('0755', 8)
411 else:
411 else:
412 setmode = int('0644', 8)
412 setmode = int('0644', 8)
413 m = stat.S_IMODE(st[stat.ST_MODE])
413 m = stat.S_IMODE(st[stat.ST_MODE])
414 m = (m & ~int('0777', 8)) | setmode
414 m = (m & ~int('0777', 8)) | setmode
415 os.chmod(dst, m)
415 os.chmod(dst, m)
416 file_util.copy_file = copyfileandsetmode
416 file_util.copy_file = copyfileandsetmode
417 try:
417 try:
418 install_lib.run(self)
418 install_lib.run(self)
419 finally:
419 finally:
420 file_util.copy_file = realcopyfile
420 file_util.copy_file = realcopyfile
421
421
422 class hginstallscripts(install_scripts):
422 class hginstallscripts(install_scripts):
423 '''
423 '''
424 This is a specialization of install_scripts that replaces the @LIBDIR@ with
424 This is a specialization of install_scripts that replaces the @LIBDIR@ with
425 the configured directory for modules. If possible, the path is made relative
425 the configured directory for modules. If possible, the path is made relative
426 to the directory for scripts.
426 to the directory for scripts.
427 '''
427 '''
428
428
429 def initialize_options(self):
429 def initialize_options(self):
430 install_scripts.initialize_options(self)
430 install_scripts.initialize_options(self)
431
431
432 self.install_lib = None
432 self.install_lib = None
433
433
434 def finalize_options(self):
434 def finalize_options(self):
435 install_scripts.finalize_options(self)
435 install_scripts.finalize_options(self)
436 self.set_undefined_options('install',
436 self.set_undefined_options('install',
437 ('install_lib', 'install_lib'))
437 ('install_lib', 'install_lib'))
438
438
439 def run(self):
439 def run(self):
440 install_scripts.run(self)
440 install_scripts.run(self)
441
441
442 if (os.path.splitdrive(self.install_dir)[0] !=
442 if (os.path.splitdrive(self.install_dir)[0] !=
443 os.path.splitdrive(self.install_lib)[0]):
443 os.path.splitdrive(self.install_lib)[0]):
444 # can't make relative paths from one drive to another, so use an
444 # can't make relative paths from one drive to another, so use an
445 # absolute path instead
445 # absolute path instead
446 libdir = self.install_lib
446 libdir = self.install_lib
447 else:
447 else:
448 common = os.path.commonprefix((self.install_dir, self.install_lib))
448 common = os.path.commonprefix((self.install_dir, self.install_lib))
449 rest = self.install_dir[len(common):]
449 rest = self.install_dir[len(common):]
450 uplevel = len([n for n in os.path.split(rest) if n])
450 uplevel = len([n for n in os.path.split(rest) if n])
451
451
452 libdir = uplevel * ('..' + os.sep) + self.install_lib[len(common):]
452 libdir = uplevel * ('..' + os.sep) + self.install_lib[len(common):]
453
453
454 for outfile in self.outfiles:
454 for outfile in self.outfiles:
455 fp = open(outfile, 'rb')
455 fp = open(outfile, 'rb')
456 data = fp.read()
456 data = fp.read()
457 fp.close()
457 fp.close()
458
458
459 # skip binary files
459 # skip binary files
460 if b('\0') in data:
460 if b('\0') in data:
461 continue
461 continue
462
462
463 data = data.replace(b('@LIBDIR@'), libdir.encode(libdir_escape))
463 data = data.replace(b('@LIBDIR@'), libdir.encode(libdir_escape))
464 fp = open(outfile, 'wb')
464 fp = open(outfile, 'wb')
465 fp.write(data)
465 fp.write(data)
466 fp.close()
466 fp.close()
467
467
468 cmdclass = {'build': hgbuild,
468 cmdclass = {'build': hgbuild,
469 'build_mo': hgbuildmo,
469 'build_mo': hgbuildmo,
470 'build_ext': hgbuildext,
470 'build_ext': hgbuildext,
471 'build_py': hgbuildpy,
471 'build_py': hgbuildpy,
472 'build_hgextindex': buildhgextindex,
472 'build_hgextindex': buildhgextindex,
473 'install_lib': hginstalllib,
473 'install_lib': hginstalllib,
474 'install_scripts': hginstallscripts,
474 'install_scripts': hginstallscripts,
475 'build_hgexe': buildhgexe,
475 'build_hgexe': buildhgexe,
476 }
476 }
477
477
478 packages = ['mercurial', 'mercurial.hgweb', 'mercurial.httpclient',
478 packages = ['mercurial', 'mercurial.hgweb', 'mercurial.httpclient',
479 'hgext', 'hgext.convert', 'hgext.highlight', 'hgext.zeroconf',
479 'hgext', 'hgext.convert', 'hgext.highlight', 'hgext.zeroconf',
480 'hgext.largefiles']
480 'hgext.largefiles']
481
481
482 pymodules = []
482 pymodules = []
483
483
484 common_depends = ['mercurial/util.h']
484 common_depends = ['mercurial/util.h']
485
485
486 osutil_ldflags = []
486 osutil_ldflags = []
487
487
488 if sys.platform == 'darwin':
488 if sys.platform == 'darwin':
489 osutil_ldflags += ['-framework', 'ApplicationServices']
489 osutil_ldflags += ['-framework', 'ApplicationServices']
490
490
491 extmodules = [
491 extmodules = [
492 Extension('mercurial.base85', ['mercurial/base85.c'],
492 Extension('mercurial.base85', ['mercurial/base85.c'],
493 depends=common_depends),
493 depends=common_depends),
494 Extension('mercurial.bdiff', ['mercurial/bdiff.c'],
494 Extension('mercurial.bdiff', ['mercurial/bdiff.c'],
495 depends=common_depends),
495 depends=common_depends),
496 Extension('mercurial.diffhelpers', ['mercurial/diffhelpers.c'],
496 Extension('mercurial.diffhelpers', ['mercurial/diffhelpers.c'],
497 depends=common_depends),
497 depends=common_depends),
498 Extension('mercurial.mpatch', ['mercurial/mpatch.c'],
498 Extension('mercurial.mpatch', ['mercurial/mpatch.c'],
499 depends=common_depends),
499 depends=common_depends),
500 Extension('mercurial.parsers', ['mercurial/dirs.c',
500 Extension('mercurial.parsers', ['mercurial/dirs.c',
501 'mercurial/manifest.c',
501 'mercurial/manifest.c',
502 'mercurial/parsers.c',
502 'mercurial/parsers.c',
503 'mercurial/pathencode.c'],
503 'mercurial/pathencode.c'],
504 depends=common_depends),
504 depends=common_depends),
505 Extension('mercurial.osutil', ['mercurial/osutil.c'],
505 Extension('mercurial.osutil', ['mercurial/osutil.c'],
506 extra_link_args=osutil_ldflags,
506 extra_link_args=osutil_ldflags,
507 depends=common_depends),
507 depends=common_depends),
508 ]
508 ]
509
509
510 try:
510 try:
511 from distutils import cygwinccompiler
511 from distutils import cygwinccompiler
512
512
513 # the -mno-cygwin option has been deprecated for years
513 # the -mno-cygwin option has been deprecated for years
514 compiler = cygwinccompiler.Mingw32CCompiler
514 compiler = cygwinccompiler.Mingw32CCompiler
515
515
516 class HackedMingw32CCompiler(cygwinccompiler.Mingw32CCompiler):
516 class HackedMingw32CCompiler(cygwinccompiler.Mingw32CCompiler):
517 def __init__(self, *args, **kwargs):
517 def __init__(self, *args, **kwargs):
518 compiler.__init__(self, *args, **kwargs)
518 compiler.__init__(self, *args, **kwargs)
519 for i in 'compiler compiler_so linker_exe linker_so'.split():
519 for i in 'compiler compiler_so linker_exe linker_so'.split():
520 try:
520 try:
521 getattr(self, i).remove('-mno-cygwin')
521 getattr(self, i).remove('-mno-cygwin')
522 except ValueError:
522 except ValueError:
523 pass
523 pass
524
524
525 cygwinccompiler.Mingw32CCompiler = HackedMingw32CCompiler
525 cygwinccompiler.Mingw32CCompiler = HackedMingw32CCompiler
526 except ImportError:
526 except ImportError:
527 # the cygwinccompiler package is not available on some Python
527 # the cygwinccompiler package is not available on some Python
528 # distributions like the ones from the optware project for Synology
528 # distributions like the ones from the optware project for Synology
529 # DiskStation boxes
529 # DiskStation boxes
530 class HackedMingw32CCompiler(object):
530 class HackedMingw32CCompiler(object):
531 pass
531 pass
532
532
533 packagedata = {'mercurial': ['locale/*/LC_MESSAGES/hg.mo',
533 packagedata = {'mercurial': ['locale/*/LC_MESSAGES/hg.mo',
534 'help/*.txt',
534 'help/*.txt',
535 'default.d/*.rc',
535 'default.d/*.rc',
536 'dummycert.pem']}
536 'dummycert.pem']}
537
537
538 def ordinarypath(p):
538 def ordinarypath(p):
539 return p and p[0] != '.' and p[-1] != '~'
539 return p and p[0] != '.' and p[-1] != '~'
540
540
541 for root in ('templates',):
541 for root in ('templates',):
542 for curdir, dirs, files in os.walk(os.path.join('mercurial', root)):
542 for curdir, dirs, files in os.walk(os.path.join('mercurial', root)):
543 curdir = curdir.split(os.sep, 1)[1]
543 curdir = curdir.split(os.sep, 1)[1]
544 dirs[:] = filter(ordinarypath, dirs)
544 dirs[:] = filter(ordinarypath, dirs)
545 for f in filter(ordinarypath, files):
545 for f in filter(ordinarypath, files):
546 f = os.path.join(curdir, f)
546 f = os.path.join(curdir, f)
547 packagedata['mercurial'].append(f)
547 packagedata['mercurial'].append(f)
548
548
549 datafiles = []
549 datafiles = []
550 setupversion = version
550 setupversion = version
551 extra = {}
551 extra = {}
552
552
553 if py2exeloaded:
553 if py2exeloaded:
554 extra['console'] = [
554 extra['console'] = [
555 {'script':'hg',
555 {'script':'hg',
556 'copyright':'Copyright (C) 2005-2015 Matt Mackall and others',
556 'copyright':'Copyright (C) 2005-2015 Matt Mackall and others',
557 'product_version':version}]
557 'product_version':version}]
558 # sub command of 'build' because 'py2exe' does not handle sub_commands
558 # sub command of 'build' because 'py2exe' does not handle sub_commands
559 build.sub_commands.insert(0, ('build_hgextindex', None))
559 build.sub_commands.insert(0, ('build_hgextindex', None))
560 # put dlls in sub directory so that they won't pollute PATH
561 extra['zipfile'] = 'lib/library.zip'
560
562
561 if os.name == 'nt':
563 if os.name == 'nt':
562 # Windows binary file versions for exe/dll files must have the
564 # Windows binary file versions for exe/dll files must have the
563 # form W.X.Y.Z, where W,X,Y,Z are numbers in the range 0..65535
565 # form W.X.Y.Z, where W,X,Y,Z are numbers in the range 0..65535
564 setupversion = version.split('+', 1)[0]
566 setupversion = version.split('+', 1)[0]
565
567
566 if sys.platform == 'darwin' and os.path.exists('/usr/bin/xcodebuild'):
568 if sys.platform == 'darwin' and os.path.exists('/usr/bin/xcodebuild'):
567 version = runcmd(['/usr/bin/xcodebuild', '-version'], {})[0].splitlines()
569 version = runcmd(['/usr/bin/xcodebuild', '-version'], {})[0].splitlines()
568 if version:
570 if version:
569 version = version[0]
571 version = version[0]
570 if sys.version_info[0] == 3:
572 if sys.version_info[0] == 3:
571 version = version.decode('utf-8')
573 version = version.decode('utf-8')
572 xcode4 = (version.startswith('Xcode') and
574 xcode4 = (version.startswith('Xcode') and
573 StrictVersion(version.split()[1]) >= StrictVersion('4.0'))
575 StrictVersion(version.split()[1]) >= StrictVersion('4.0'))
574 xcode51 = re.match(r'^Xcode\s+5\.1', version) is not None
576 xcode51 = re.match(r'^Xcode\s+5\.1', version) is not None
575 else:
577 else:
576 # xcodebuild returns empty on OS X Lion with XCode 4.3 not
578 # xcodebuild returns empty on OS X Lion with XCode 4.3 not
577 # installed, but instead with only command-line tools. Assume
579 # installed, but instead with only command-line tools. Assume
578 # that only happens on >= Lion, thus no PPC support.
580 # that only happens on >= Lion, thus no PPC support.
579 xcode4 = True
581 xcode4 = True
580 xcode51 = False
582 xcode51 = False
581
583
582 # XCode 4.0 dropped support for ppc architecture, which is hardcoded in
584 # XCode 4.0 dropped support for ppc architecture, which is hardcoded in
583 # distutils.sysconfig
585 # distutils.sysconfig
584 if xcode4:
586 if xcode4:
585 os.environ['ARCHFLAGS'] = ''
587 os.environ['ARCHFLAGS'] = ''
586
588
587 # XCode 5.1 changes clang such that it now fails to compile if the
589 # XCode 5.1 changes clang such that it now fails to compile if the
588 # -mno-fused-madd flag is passed, but the version of Python shipped with
590 # -mno-fused-madd flag is passed, but the version of Python shipped with
589 # OS X 10.9 Mavericks includes this flag. This causes problems in all
591 # OS X 10.9 Mavericks includes this flag. This causes problems in all
590 # C extension modules, and a bug has been filed upstream at
592 # C extension modules, and a bug has been filed upstream at
591 # http://bugs.python.org/issue21244. We also need to patch this here
593 # http://bugs.python.org/issue21244. We also need to patch this here
592 # so Mercurial can continue to compile in the meantime.
594 # so Mercurial can continue to compile in the meantime.
593 if xcode51:
595 if xcode51:
594 cflags = get_config_var('CFLAGS')
596 cflags = get_config_var('CFLAGS')
595 if cflags and re.search(r'-mno-fused-madd\b', cflags) is not None:
597 if cflags and re.search(r'-mno-fused-madd\b', cflags) is not None:
596 os.environ['CFLAGS'] = (
598 os.environ['CFLAGS'] = (
597 os.environ.get('CFLAGS', '') + ' -Qunused-arguments')
599 os.environ.get('CFLAGS', '') + ' -Qunused-arguments')
598
600
599 setup(name='mercurial',
601 setup(name='mercurial',
600 version=setupversion,
602 version=setupversion,
601 author='Matt Mackall and many others',
603 author='Matt Mackall and many others',
602 author_email='mercurial@selenic.com',
604 author_email='mercurial@selenic.com',
603 url='http://mercurial.selenic.com/',
605 url='http://mercurial.selenic.com/',
604 download_url='http://mercurial.selenic.com/release/',
606 download_url='http://mercurial.selenic.com/release/',
605 description=('Fast scalable distributed SCM (revision control, version '
607 description=('Fast scalable distributed SCM (revision control, version '
606 'control) system'),
608 'control) system'),
607 long_description=('Mercurial is a distributed SCM tool written in Python.'
609 long_description=('Mercurial is a distributed SCM tool written in Python.'
608 ' It is used by a number of large projects that require'
610 ' It is used by a number of large projects that require'
609 ' fast, reliable distributed revision control, such as '
611 ' fast, reliable distributed revision control, such as '
610 'Mozilla.'),
612 'Mozilla.'),
611 license='GNU GPLv2 or any later version',
613 license='GNU GPLv2 or any later version',
612 classifiers=[
614 classifiers=[
613 'Development Status :: 6 - Mature',
615 'Development Status :: 6 - Mature',
614 'Environment :: Console',
616 'Environment :: Console',
615 'Intended Audience :: Developers',
617 'Intended Audience :: Developers',
616 'Intended Audience :: System Administrators',
618 'Intended Audience :: System Administrators',
617 'License :: OSI Approved :: GNU General Public License (GPL)',
619 'License :: OSI Approved :: GNU General Public License (GPL)',
618 'Natural Language :: Danish',
620 'Natural Language :: Danish',
619 'Natural Language :: English',
621 'Natural Language :: English',
620 'Natural Language :: German',
622 'Natural Language :: German',
621 'Natural Language :: Italian',
623 'Natural Language :: Italian',
622 'Natural Language :: Japanese',
624 'Natural Language :: Japanese',
623 'Natural Language :: Portuguese (Brazilian)',
625 'Natural Language :: Portuguese (Brazilian)',
624 'Operating System :: Microsoft :: Windows',
626 'Operating System :: Microsoft :: Windows',
625 'Operating System :: OS Independent',
627 'Operating System :: OS Independent',
626 'Operating System :: POSIX',
628 'Operating System :: POSIX',
627 'Programming Language :: C',
629 'Programming Language :: C',
628 'Programming Language :: Python',
630 'Programming Language :: Python',
629 'Topic :: Software Development :: Version Control',
631 'Topic :: Software Development :: Version Control',
630 ],
632 ],
631 scripts=scripts,
633 scripts=scripts,
632 packages=packages,
634 packages=packages,
633 py_modules=pymodules,
635 py_modules=pymodules,
634 ext_modules=extmodules,
636 ext_modules=extmodules,
635 data_files=datafiles,
637 data_files=datafiles,
636 package_data=packagedata,
638 package_data=packagedata,
637 cmdclass=cmdclass,
639 cmdclass=cmdclass,
638 distclass=hgdist,
640 distclass=hgdist,
639 options={'py2exe': {'packages': ['hgext', 'email']},
641 options={'py2exe': {'packages': ['hgext', 'email']},
640 'bdist_mpkg': {'zipdist': False,
642 'bdist_mpkg': {'zipdist': False,
641 'license': 'COPYING',
643 'license': 'COPYING',
642 'readme': 'contrib/macosx/Readme.html',
644 'readme': 'contrib/macosx/Readme.html',
643 'welcome': 'contrib/macosx/Welcome.html',
645 'welcome': 'contrib/macosx/Welcome.html',
644 },
646 },
645 },
647 },
646 **extra)
648 **extra)
General Comments 0
You need to be logged in to leave comments. Login now