Commit Graph

79 Commits

Author SHA1 Message Date
Jeremy Whitlock
94b6b92b9f Fix how setup.py identifies the Mercurial version.
There is a problem with setup.py where it will not identify the Mercurial
version properly when not being ran in within a repository even if
mercurial/__version__.py exists.

To fix, use mercurial.__version__.version when available before defaulting
to "unknown".  (Using mercurial.util.version() is not an option due to a
dependency issue where osutil can be referenced before it is built.)
2009-04-02 18:18:43 -06:00
Matt Mackall
9c307b1dee setup: remove spurious posix import 2009-04-03 12:37:44 -05:00
Matt Mackall
81073ba20c setup.py: fix version detection for tarball
- don't do version detection if there's no .hg directory
- shrink try: clause
- don't write __version__.py if version is unknown
  (we might overwrite the real version)
2009-03-06 09:15:47 -06:00
Martin Geisler
6c5bf586cb setup: run hg with empty HGRCPATH for robustness.
Otherwise a bad hgrc file can make the version detection fail.
2009-02-24 18:09:16 +01:00
Martin Geisler
a4fae9e3f1 setup: use sys.executable to call hg
Executing ".\hg" does not work on Windows, but we can instead ask
Python to execute hg.
2009-02-18 00:44:38 +01:00
Martin Geisler
bf5d4304c2 add --pure flag to setup.py
This flag will make the build_py step install the pure Python modules
in mercurial/pure/ into mercurial/ and furthermore prevent building
the C extensions.
2009-01-24 01:44:43 +01:00
Martin Geisler
7c52fb0c3f setup: get version number using pure Python modules 2009-01-29 19:25:25 +01:00
Martin Geisler
e7e00ca6f5 setup: do not use -c with msgfmt on Solaris (issue1489) 2009-01-28 10:32:15 +01:00
Martin Geisler
6d35a80a4a i18n: check format strings when building xx.mo files 2009-01-25 20:27:37 +01:00
Martin Geisler
8a1d290eb9 i18n: new build_mo command for setup.py
This command will generate .mo files under locale/ for the .po files
found under i18n/.
2009-01-15 00:11:54 +01:00
Martin Geisler
12b2d519d0 i18n: let Makefile generate i18n/hg.pot
The target update-pot extracts strings using pygettext and updates the
i18n/hg.pot file. The translators can then use msgmerge to merge the
new strings in hg.pot with their xx.po file when they want to.

The setup.py file now includes files under both templates/ and i18n/
as data files.
2009-01-15 00:10:54 +01:00
Benoit Boissinot
cf4007a70c recover when no version information is available 2009-01-15 11:41:59 +01:00
Matt Mackall
356502607f refactor version code
- simplify version detection code
- move detection code into setup.py
- move version reading function into util.py
- drop version.py code

This makes hg more closely follow its own recommendation of how to deal with
versioning your builds: use hg id in your build script.
2009-01-10 18:02:38 -06:00
Matt Mackall
d6a350a3b0 setup: warn about missing standard Python components 2008-12-31 17:59:58 -06:00
Augie Fackler
27e82b6a84 Add hgext.zeroconf to the package list so it gets installed by setup.py. 2008-10-12 22:56:43 +02:00
Petr Kodl
09cc67de2c osutil: implementation for Win32
Use information provided by FindFile... Win32 calls
to generate stat information without lstat call per file.
rwx bits in st_mode are ignored as they are not stored in Win32 fs
and Mercurial does not use them
Unicode path / path names over _MAX_PATH are intentionally not supported.
2008-09-14 09:57:33 -04:00
Peter Ruibal
30a2036f9e use Exception(args)-style raising consistently (py3k compatibility) 2008-09-08 13:07:00 +02:00
Dirkjan Ochtman
fcaabba3ec fix double indentation and trailing whitespace 2008-08-31 11:41:52 +02:00
Patrick Mezard
99f53b6386 highlight: split code to improve startup times 2008-08-25 23:04:56 +02:00
Dirkjan Ochtman
b4d9394e54 merge with crew-stable 2008-07-02 09:21:57 +02:00
Paul Moore
d7368594b4 Force email package to be loaded in py2exe
With Python 2.5, the email package is not fully loaded by py2exe, due to
dynamic imports which are not found by modulefinder. This breaks the patchbomb
extension. This patch forces the whole email package to be included so that
the dynamic imports work as expected.
2008-07-01 20:17:11 +01:00
Paul Moore
7113d144ac Add a batch file driver for Windows 2008-04-10 23:07:54 +02:00
Bryan O'Sullivan
8a988e392e manifest: improve parsing performance by 8x via a new C extension 2008-03-26 10:12:10 -07:00
Alexis S. L. Carvalho
317b2a0fec setup.py: hide compiler error messages while searching for inotify 2008-03-23 21:35:57 -03:00
Alexis S. L. Carvalho
552d87eaae setup.py: use a simplified custom version of CCompiler.has_function
The original one doesn't remove its temporary files and even creates
a temporary file in the CWD.
2008-03-14 01:45:17 -03:00
Alexis S. L. Carvalho
d897d40d93 setup.py: skip inotify if there's no inotify_add_watch
Debian Etch doesn't include a sys/inotify.h header, which makes it
impossible to compile _inotify.c, making hg uninstallable.

The cc.has_function() method is implemented by trying to compile a
simple C program.  Since there's no redirection involved all error
messages are sent to the terminal.  This is not particularly pretty
but at least it allows the installation to complete.
2008-03-13 19:50:03 -03:00
Bryan O'Sullivan
23adb6cef4 setup.py: os.uname is not available on Windows 2008-03-12 15:33:43 -07:00
Bryan O'Sullivan
08dc4f9063 Add inotify extension 2008-03-12 15:30:11 -07:00
Matt Mackall
a2dcecb2de filemerge: remove the hgmerge script
This is now better handled using [merge-tools] and [merge-patterns] in hgrc.
2008-02-03 19:29:05 -06:00
Steve Borho
478009f6bd win32: do not install bash hgmerge on Windows 2007-12-07 18:15:24 -06:00
Bryan O'Sullivan
e317f81ab3 Add osutil module, containing a listdir function.
This is similar to os.listdir, only it returns a sorted list of tuples.
2007-10-05 15:01:06 -07:00
Thomas Arendsen Hein
90d76a6ec9 Enable demandimport only in scripts, not in importable modules (issue605)
This way other applications can choose if and when they want this feature,
because it might be problematic if those applications rely on ImportError.
2007-08-18 11:37:08 +02:00
Bryan O'Sullivan
590b9213d3 Add Chris Mason's mpatch library.
The original repo is http://oss.oracle.com/mercurial/mason/mpatch
2007-07-17 09:39:30 -07:00
Christian Ebert
6d72ca9538 setup.py not executable: change instructions at beginning of file 2007-06-28 02:11:54 +02:00
Lee Cantey
7741f9fab9 Fix for including hgext in Windows compiled version.
From Shun-ichi GOTO via Mercurial mailing list.
2007-06-18 15:14:49 -07:00
Thomas Arendsen Hein
25fd95fb9c Include convert extension in packages setup
(reported by Christian Ebert and Eric Hopper)
2007-06-07 22:28:52 +02:00
Matt Mackall
e2bdd30747 Fix setup.py warning 2006-12-15 01:17:04 -06:00
Matt Mackall
a5b3ab332d Disable demandloading in setup.py 2006-12-14 20:31:33 -06:00
Matt Mackall
c9671962c2 Fix demandload bits of setup.py py2exe support 2006-12-14 20:23:25 -06:00
Matt Mackall
f17a4e1934 Replace demandload with new demandimport 2006-12-13 13:27:09 -06:00
Thomas Arendsen Hein
c6ffd9fee7 Check for at least having a final release of python 2.3.0 in setup.py
Mercurial uses features that are not in 2.3a1.
2006-10-31 10:50:16 +01:00
Brendan Cully
407377d02c Add a base85 codec 2006-10-06 13:01:54 -07:00
Thomas Arendsen Hein
1d3e2c4a3c Install all files/subdirectories below templates.
This is needed because styles are now in their own subdirectory.
2006-10-03 11:53:35 +02:00
Thomas Arendsen Hein
2152453c98 Applied coding style to setup.py 2006-10-03 11:30:59 +02:00
Eung-Ju PARK
03e548ea66 packagescan can't scan nested packages 2006-06-02 16:19:47 +09:00
Vadim Gelfer
4e8a64a4b7 merge with crew. 2006-05-19 08:57:12 -07:00
Volker Kleinfeld
271afc71fc setup.py: install packagescan before any mercurial modules is imported
Further the installation of packagescan over demandload is moved to the
packagescan module.

I added as well few more comments in the packagescan module to avoid
the wrong use of package scan in the future.

Reason:

mercurial.packagescan acts as fake mercurial.demandload during a py2exe
run.  Unfortunatly the import of mercurial.version in setup.py is done
before mercurial.packagescan is installed. This results in few imports
without mercurial.packagescan in charge and therefore not all dependend
modules are detected when running mercurial.packagescan.getmodules
later e.g.  winerror is missed.
2006-05-19 08:54:28 -07:00
Eric Hopper
0c1117d5be Moving hgweb.py into it's own module in preparation for breaking it up. 2006-05-18 11:48:33 -07:00
Thomas Arendsen Hein
96596c940b Don't forget version at the end of setup.py, write it only if changed.
This fixes issue159: "python setup.py install" shouldn't write new files
in the working dir if one has done "python setup.py build" first.
2006-03-19 21:26:58 +01:00
Thomas Arendsen Hein
13f0f115eb Added check for minimal python version to setup.py 2006-03-10 10:44:17 +01:00