Packaging mercurial with conda for easier installation?

PIERRE AUGIER pierre.augier at univ-grenoble-alpes.fr
Sat May 4 21:40:41 UTC 2019


> 
> Message: 2
> Date: Tue, 30 Apr 2019 16:17:16 +0200
> From: Nicolas Pinault <nicolasp at aaton.com>
> To: mercurial at mercurial-scm.org
> Subject: Re: Packaging mercurial with conda for easier installation?
> Message-ID: <05137700-89e4-ff2e-a7fb-7c19ffe618dc at aaton.com>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
> 
> Bonjour Pierre,
> 
> Isn't TortoiseHg the only tool needed on Windows ?
> 
> Cordialement,
> Nicolas

Merci Nicolas!

Indeed, TortoiseHg is really convenient for Windows users. Installation of recent versions of TortoiseHg (and Mercurial) is less simple on other OS. For example, TortoiseHg is not on PyPI (I don't understand why).

For all conda users (on Windows, Linux and macOS), it's now possible to install Mercurial 4.9.1 (+ hg-evolve + a compatible version of hg-git) simply with

conda-app install mercurial

See https://pypi.org/project/conda-app/

Advantages compared to pip, (1) no need for pip2 (it was an issue for me on some clusters), (2) it should always install compatible packages (right now, `pip install mercurial hg-git` leads to a broken installation) and (3) no need for compilers.

If TortoiseHg is put on PyPI, it would be very simple to also support `conda-app install tortoisehg`.

Cordialement,
Pierre



> 
> Le 30/04/2019 à 15:21, Pierre Augier a écrit :
>>
>> Hi all,
>>
>> I'm a researcher (in fluid dynamics). I also do a bit of teaching and
>> training for students and university staff. My university uses Gitlab
>> (https://gricad-gitlab.univ-grenoble-alpes.fr).
>>
>> However, I don't like to teach Git to these students and university
>> staff. I tried to explain this opinion here
>> http://www.legi.grenoble-inp.fr/people/Pierre.Augier/mercurial-as-a-great-version-source-control-management-tool-in-academics.html
>>
>> During most of our courses / training sessions, the people bring their
>> own computers, so we would need to be able to install very easily
>> Mercurial plus some extensions (in particular hg-git and hg-evolve)
>> and some utilities (at least meld). I didn't find a very simple way to
>> do that. The methods depend on the system (we have of course a lot of
>> Windows 7 and 10 and macOS) and involve looking at web pages,
>> downloading the right files by clicking on the right links, executing
>> the installation executables, etc. During a course / training session,
>> such process is long and error prone. On Windows, one even needs to
>> install Visual Studio to compile dulwich (needed for hg-git)!
>>
>> During these courses, everyone has conda installed. conda-forge
>> (https://github.com/conda-forge/) and conda
>> (https://github.com/conda/conda) are good open-source tools to build
>> packages for different platforms and to install them in controlled
>> environments.
>>
>> As of today, one can run (see
>> https://github.com/conda-forge/mercurial-app-feedstock)
>>
>> conda config --add channels conda-forge
>> conda create -n env_hg mercurial-app
>> conda activate env_hg
>> pip install hg+https://bitbucket.org/durin42/hg-git
>>
>> We need to install hg-git with pip + bitbucket because of an
>> incompatibility between Mercurial 4.9.1 and the version of hg-git on
>> PyPI. As soon as a new version will be released, we won't need that.
>>
>> This should work on Windows, macOS and Linux with no compilation
>> during the installation.
>>
>> However, at this point, hg is available only in the conda environment
>> env_hg and one needs to work more to get it installed "system wide".
>> For Unix and bash, one can do
>>
>> APP_DIR=$HOME/.local/bin/conda-app/
>> mkdir -p $APP_DIR
>> echo -e "\nexport PATH=\$PATH:$APP_DIR\n" >> ~/.bashrc
>> ln -s $(which hg) $APP_DIR/hg
>>
>> First, I don't know if it is a right way to do that (?). More
>> importantly, this is not at all satisfactory (too complicated for
>> beginners, not cross-platform, shell dependent).
>>
>> By the way, what would be the right way to do this on Windows?
>>
>> I think it would be possible and useful to work to get something like
>> this to work anywhere (in particular also on Windows and also with
>> other shells):
>> conda config --add channels conda-forge
>> conda install conda-app
>> conda-app install mercurial
>>
>> Note that conda-app doesn't exist yet (see
>> https://github.com/conda/conda/issues/8556).
>>
>> Any feedback on this issue and this possible solution ?
>>
>> Cheers,
>>
>> Pierre
>>
>> --
>> Pierre Augier - CR CNRShttp://www.legi.grenoble-inp.fr
>> LEGI (UMR 5519) Laboratoire des Ecoulements Geophysiques et Industriels
>> BP53, 38041 Grenoble Cedex, France                tel:+33.4.56.52.86.16
>>
>>
>> _______________________________________________
>> Mercurial mailing list
>> Mercurial at mercurial-scm.org
>> https://www.mercurial-scm.org/mailman/listinfo/mercurial
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://www.mercurial-scm.org/pipermail/mercurial/attachments/20190430/0b256dd7/attachment-0001.html>
> 
> ------------------------------
> 
> Subject: Digest Footer
> 
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
> 
> 
> ------------------------------
> 
> End of Mercurial Digest, Vol 168, Issue 13
> ******************************************


More information about the Mercurial mailing list