using hg-development version without installation
Martin Geisler
mg at daimi.au.dk
Thu Jun 12 02:38:41 CDT 2008
"Henryk Gerlach" <hgerlach at gmx.net> writes:
Hi Henryk
> I started to hack a bit on mercurials ui and web interfaces. I
> wonder how you could easily use the version you are hacking at. So
> far I always did a
>
> sudo python setup.py install --prefix /user/local/
>
> and even uninstalled mercurial from my distribution to avoid
> conflicts.
>
> Is there some shellscript that sets up my environment so that I use
> the current version that I'm hacking with?
Yeah, the Makefile distributed with Mercurial has several different
targets:
% cd mercurial-1.0.1
% make
Commonly used make targets:
all - build program and documentation
install - install program and man pages to PREFIX (/usr/local)
install-home - install with setup.py install --home=HOME (/u/eis)
local - build for inplace usage
tests - run all tests in the automatic test suite
test-foo - run only specified tests (e.g. test-merge1)
dist - run all tests and create a source tarball in dist/
clean - remove files created by other targets
(except installed files or dist source tarball)
Example for a system-wide installation under /usr/local:
make all && su -c "make install" && hg version
Example for a local installation (usable in this directory):
make local && ./hg version
I normally install Mercurial using a simple
python setup.py install --home=$HOME/opt
and add $HOME/opt/bin to PATH and $HOME/opt/lib/python to PYTHONPATH.
That has worked great for me on several machines.
> Does this work for the cgi-script to?
At the top of hgweb.cgi you will find these lines:
# adjust python path if not a system-wide install:
#import sys
#sys.path.insert(0, "/path/to/python/lib")
You can use those to fix PYTHONPATH if it is not set correctly already
when you execute the CGI script.
--
Martin Geisler
VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multi-Party Computation) to Python. See: http://viff.dk/.
More information about the Mercurial
mailing list