Commit Graph

159 Commits

Author SHA1 Message Date
Adrian Buehlmann
b303a00fae setup: fix build_hgexe for mingw32 compiler
Fixes

  python setup.py build_hgexe -i --compiler=mingw32
2012-07-25 16:50:22 +02:00
Bryan O'Sullivan
ea2526a3d4 setup: disable -mno-cygwin if building under mingw32
This gcc option has been deprecated since at least 2009 (gcc 4.4),
and it causes compilations to fail entirely with gcc 4.6.x.

Upstream distutils bug: http://bugs.python.org/issue12641
2012-07-06 20:19:55 -07:00
Adrian Buehlmann
7e44d18d42 setup: compile hg.exe
This implements a new command

  $ python setup.py build_hgexe -i

which places the hg.exe in the root of the source tree.
2012-06-29 13:10:48 +02:00
Augie Fackler
c0cf243849 httpclient: omit tests for the client since we don't run them anyway 2012-05-19 09:34:25 -05:00
Brodie Rao
a706d64a2c cleanup: replace naked excepts with except Exception: ... 2012-05-12 16:02:46 +02:00
Brodie Rao
c577fac135 cleanup: replace naked excepts with more specific ones 2012-05-12 16:02:45 +02:00
Brodie Rao
d6a6abf2b0 cleanup: eradicate long lines 2012-05-12 15:54:54 +02:00
Steven Stallion
d79ff306e5 plan9: initial support for plan 9 from bell labs
This patch contains support for Plan 9 from Bell Labs. A README is
provided in contrib/plan9 which describes the port in greater detail.
A new extension is also provided named factotum which permits the
factotum(4) authentication agent to provide credentials for HTTP
repositories. This extension is also applicable to other POSIX
platforms which make use of Plan 9 from User Space (aka plan9ports).
2012-04-08 12:43:41 -07:00
Brendan Cully
19039ca025 setup.py: don't call splitlines twice on the output of xcodebuild (issue3277) 2012-03-02 10:42:12 -08:00
Greg Ward
86216402d9 setup: handle output from Apple's Xcode 4.3 better (issue3277)
Apparently, it prints nothing at all if the user installed only the
command-line tools. In that case, don't try to parse the empty output
-- just assume they have Xcode >= 4.
2012-02-27 08:54:26 -05:00
Pascal Quantin
fe27d67b3c setup: fix py2exe generation broken by c7ccdf21c98c (issue3116)
Py2exe is patching default distutils Distribution class. This patch ensures
that the right one is taken when calling hgdist class.
2011-11-20 19:14:36 +01:00
Matt Mackall
8ff3689535 setup: backout 4c2574ae2b6b
Change wasn't compatible with Python 2.x
2011-11-17 23:01:58 -06:00
Simon Heimberg
77b258d449 setup: raise when executing with python3 without c2to3 argument 2011-11-12 02:08:01 +01:00
Simon Heimberg
302466e126 setup: support executing with python3 including 2to3
Merge the code from contrib/setup3.py in setup.
The argument for executing is marked as experimental.

Reason: The file in contrib was outdated (packages, cmdclass, ...)
2011-08-21 15:23:43 +02:00
Simon Heimberg
316a653bf9 setup: hgbuildmo inherits from Command
hgbuildmo does not need anything provided by the build class.
2011-11-01 20:13:53 +01:00
Simon Heimberg
2378dbf777 setup: make script executable with python3
Replace the incompatible print statement. Writing a warning to stderr is a good
idea anyway.
2011-11-12 02:07:55 +01:00
Simon Heimberg
203f43b760 setup: subclass build command 2011-11-01 20:13:53 +01:00
Simon Heimberg
44d04f155e setup: has_ext_modules always returns false when pure is specified
When pure is specified ext_modules is emptied in hgbuildpy.finalize_options.
Before this happens has_ext_modules returned True.
2011-11-01 20:13:52 +01:00
Simon Heimberg
50a770852b setup: subclass distribution instead of overwriting original 2011-07-23 05:57:39 +02:00
Yuya Nishihara
0a388fca31 setup: set whole env for running hg even if .hg doesn't exist (issue3073)
The issue was partially fixed by 4576ace762a0, but there were missing
variables to run build_hgextindex.
2011-10-31 00:42:32 +09:00
Matt Mackall
36e0650c7d setup: set env global earlier (3073) 2011-10-26 12:56:27 -05:00
Na'Tosha Bard
b3b49a3b91 setup: add largefiles to list of packages 2011-10-10 17:33:17 +02:00
Nikolaj Sjujskij
7548a4a762 building: build inotify for sys.platform='linux*'
If Python interpreter was built under Linux 3.x kernel, it reports
sys.platform to be 'linux3' (it is fixed for Python 3, but not for 2.x).
This cancels building inotify extension, which was built only for 'linux2'
platform. Improved test checks if sys.platform begins with 'linux', and together
with test for kernel version to be greater than 2.6 it seems to cover all known
cases.
2011-09-20 15:21:27 +03:00
Augie Fackler
4fdf4ee021 setup.py: use getattr instead of hasdattr 2011-07-25 16:08:57 -05:00
Yuya Nishihara
64bae20381 setup: add command to generate index of extensions
It generates prebuilt index of all extensions, which will be used by
frozen exe when running 'hg help extensions'.

Now py2exe invokes this command automatically.
2011-06-04 20:11:10 +09:00
Brendan Cully
6879cbeb5e Hardcoding ARCHFLAGS breaks the build against fink's python
Fink's python is either i386 or amd64, but not universal. Setting ARCHFLAGS to the
empty string produces a successful build against both OS X python and fink python.
The modules will no longer be universal -- if that is an issue, we can change the
test to extract ARCHFLAGS from distutils.sysconfig and remove ppc if necessary.
2011-05-14 22:07:58 -07:00
Zachary Gramana
eaa0630670 setup.py: workaround for missing bz2 module in IronPython
IronPython does not provide the bz2 module on its own.  This patch skips
importing it to allow setup to continue.

(minor tweaks by mpm)
2011-05-09 15:16:56 -04:00
Augie Fackler
1753857f5b Import new http library as mercurial.httpclient.
This is revision a4229f13c374 of
http://py-nonblocking-http.googlecode.com/ with a no-check-code
comment added to the end of each file using `for fi in $(hg manifest |
grep mercurial/httpclient/) ; echo '# no-check-code' >> $fi`.
2011-05-06 09:57:55 -05:00
Dan Villiom Podlaski Christiansen
9dfabab3ba util: add Mac-specific check whether we're in a GUI session (issue2553)
The previous test assumed that 'os.name' was "mac" on Mac OS X. This
is not the case; 'mac' was classic Mac OS, whereas Mac OS X has 'os.name'
be 'posix'.

Please note that this change will break Mercurial on hypothetical
non-Mac OS X deployments of Darwin.

Credit to Brodie Rao for thinking of CGSessionCopyCurrentDictionary()
and Kevin Bullock for testing.
2011-03-23 09:43:34 +01:00
Martin Geisler
47a3f1a049 merge with stable 2011-03-14 14:05:19 +01:00
Jon M. Dugan
83ac2d7b6b setup: fix mac build broken by 1564bc7b747b
Sometimes xcodebuild prints warnings to stderr, but runcmd() assumes anything
printed to stderr implies failure.  Since runcmd() was originally only
intended to run hg, this was fine until it was pressed into service for
running xcodebuild.  Thus: split runcmd() into two parts: runcmd(), which does
the minimal amount of work to run a subprocess, and runhg(), which calls
runcmd().
2011-03-13 17:39:33 -05:00
Steve Borho
d00322059c setup: remove unnecessary code for win32com (pywin32) 2011-03-13 08:50:06 -05:00
Dirkjan Ochtman
613f24735d setup.py: use StrictVersion instead of manual comparison 2011-03-12 13:02:03 +01:00
Alexander Solovyov
b3d02e2113 fix compiling of extensions for OS X and XCode 4.0 2011-03-12 12:42:20 +01:00
Dan Villiom Podlaski Christiansen
ec590d5cd4 explicitly close files
Add missing calls to close() to many places where files are
opened. Relying on reference counting to catch them soon-ish is not
portable and fails in environments with a proper GC, such as PyPy.
2010-12-24 15:23:01 +01:00
Dan Villiom Podlaski Christiansen
f385faac7a *: kill all unnecessary shebangs. 2010-10-26 12:18:39 +02:00
Patrick Mezard
4e97028b83 setup.py: write libdir as a python string literal 2010-10-09 15:40:29 -05:00
Dan Villiom Podlaski Christiansen
5804ab0e6c setup/hg: always load Mercurial from where it was installed.
This provides two new features:

- Mercurial may be installed into a non-standard location without
  having to set PYTHONPATH.
- Multiple installations can use Mercurial from different locations.
2010-08-17 15:44:38 +02:00
Nicolas Dumazet
5c3f9d1c72 setup: user-friendly error message if Python headers are missing 2010-10-08 21:43:21 +02:00
Martin Geisler
bdbf775ab7 setup: slight simplification 2010-09-26 21:37:42 +02:00
Renato Cunha
e3f3dfa6c3 setup.py: Add 'mercurial' as include dir for the inotify compiler.
This patch adds access to util.h for the inotify C module by adding the
"mercurial" directory as an include dir, enabling access to the macros defined
in util.h.
2010-07-02 16:21:36 -03:00
Renato Cunha
c1d27d1c4d setup.py: Adjustments to make setup.py run in py3k.
In py3k, subprocess.Popen.communicate's output are bytes objects. String
literals are Unicode objects. Thus, when a bytes object startswith method is
called, with string literals, it fails. What this patch does is:

 * Convert the string (unicode in py3k) literals to bytes objects;
 * As "bytes" is not a builtin in python < 2.6, it defines a "b" helper
 function that merely returns its argument, as suggested by Antoine Pitrou.
2010-07-02 16:21:34 -03:00
Christian Boos
400df6f4a9 setup: ignore failures to build optional inotify extension 2010-06-23 13:44:07 +02:00
Nicolas Dumazet
7f1a963829 pylint, pyflakes: remove unused or duplicate imports 2010-04-14 17:58:10 +09:00
Benoit Boissinot
6180612089 setup.py: don't use tabs 2010-03-24 19:44:30 +01:00
Dirkjan Ochtman
e95cb55390 setup: fail if bz2 is not available 2010-03-23 20:01:30 +01:00
Benoit Boissinot
92607edfec Do not use osutil.c with python 2.4 and Windows (issue1364)
Windows python 2.4 os.stat() reports times including DST offset, while osutil.c
reports the correct value, which makes status() systematically compare files
content. This bug is fixed in python 2.5. Using osutil.py instead of osutil.c
is 4x times slower on large repositories but current code is completely
unusable. Given few people are likely to use python 2.4 on Windows this
solution was considered a good trade-off compared to more invasive solutions
trying to address the offset issue.
2010-02-21 22:16:35 +01:00
Adrian Buehlmann
fb523c41d9 setup.py: fixing version info for Windows hg.exe (py2exe)
Fixes

  warning: py2exe: Version Info will not be included:
    could not parse version number ...

which was seen when doing nightly builds. hg.exe files
of nightly builds did not have any version info resoure,
which may cause problems with installers.

Also setting a copyright string for the version resource
(was missing).
2010-02-07 23:07:58 +01:00
Matt Mackall
8d99be19f0 many, many trivial check-code fixups 2010-01-25 00:05:27 -06:00
Matt Mackall
cd3ef170f7 Merge with stable 2010-01-19 22:45:09 -06:00