Re: [myhdl-list] installing myhdl stable and development package in parallel
Brought to you by:
jandecaluwe
|
From: Jan D. <ja...@ja...> - 2008-07-31 09:53:58
|
Günter Dannoritzer wrote:
> Hello,
>
> Has somebody figured out a good way to install the stable version and
> the code from the repository in parallel without the packages
> interfering with each other?
>
> I did check out the mercurial code as myhdl_hg and then set the
> PYTHONPATH to it. My idea was to decide by the way of doing the import
> to take either of the packages. So instead of doing 'from myhdl' do
> 'from myhdl_hg.myhdl'. Unfortunately there are imports inside the myhdl
> package that do the 'from myhdl' type import. So I end up mixing
> packages when doing the import from the repository.
>
> Are there any better ways of doing that?
I wouldn't try to use the python namespace to control version selection.
I think the cleanest way is to control $PYTHONPATH. Suppose the stable
version is selected by default, then you could have a shell script
to select the development version instead, by doing something like:
PYTHONPATH="$HOME/dev/myhdl:${PYTHONPATH}"
export PYTHONPATH
--
Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com
From Python to silicon:
http://myhdl.jandecaluwe.com
|