Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
121 user(s) are online (118 user(s) are browsing Forums)

Members: 1
Guests: 120

Amigafreak02, more...

Support us!

Headlines

 
  Register To Post  

mercurial fails to install?
Just can't stay away
Just can't stay away


See User information
Hey! I need to check out something via git, so i downloaded mercurial and the git extension. It fails to install though?


9.RAM Disk:mercurial-1.9> python setup.py install
running install
running build
running build_mo
Traceback (most recent call last):
File "setup.py", line 441, in <module>
**extra)
File "PYTHON:Lib/distutils/core.py", line 151, in setup
dist.run_commands()
File "PYTHON:Lib/distutils/dist.py", line 974, in run_commands
self.run_command(cmd)
File "PYTHON:Lib/distutils/dist.py", line 994, in run_command
cmd_obj.run()
File "PYTHON:Lib/distutils/command/install.py", line 514, in run
self.run_command('build')
File "PYTHON:Lib/distutils/cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "PYTHON:Lib/distutils/dist.py", line 994, in run_command
cmd_obj.run()
File "PYTHON:Lib/distutils/command/build.py", line 112, in run
self.run_command(cmd_name)
File "PYTHON:Lib/distutils/cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "PYTHON:Lib/distutils/dist.py", line 994, in run_command
cmd_obj.run()
File "setup.py", line 193, in run
if not find_executable('msgfmt'):
File "PYTHON:Lib/distutils/spawn.py", line 214, in find_executable
path = os.environ['PATH']
File "PYTHON:Lib/UserDict.py", line 22, in __getitem__
raise KeyError(key)
KeyError: 'PATH'

Go to top
Re: mercurial fails to install?
Just can't stay away
Just can't stay away


See User information
I'm not a Python expert, but trying to learn a bit now and then.

As far as I can tell, the problem is that find_executable in spawn.py expects the command path to be in an environment variable called PATH (as it is in Windows and Linux, at least). This is not true in AmigaOS.

You should probably report this over on the Hyperion forum. There are bound to be people with more Python insight than mine, and maybe e.g. ssolie can determine whether this should be fixed in AmigaOS' Python, or it is an error in the installation script.

You may be able to create a workaround by doing a "setenv PATH `path`"? Not sure if this will be parsed as expected, but it's worth a shot.

(Come to think of it, maybe AmigaOS should play nice and have the Path command always maintain a PATH env variable for cross-platform compatibility?)

Best regards,

Niels

Go to top
Re: mercurial fails to install?
Just can't stay away
Just can't stay away


See User information
I downloaded it from os4depot, so i'd expect it to just work?

Go to top
Re: mercurial fails to install?
Just can't stay away
Just can't stay away


See User information
Yes, that would have been nice, wouldn't it?

But apparently it didn't. Maybe Broadblues made some workaround while testing and forgot about it while preparing the release?

Anyway, I believe he also reads the forums over at Hyperion.

Best regards,

Niels

Go to top
Re: mercurial fails to install?
Just can't stay away
Just can't stay away


See User information
I can't be bothered. I downloaded it from my linux machine instead.

Go to top
Re: mercurial fails to install?
Home away from home
Home away from home


See User information
@spotUp

As nbache says this is down to python expecting PATH to be set, or at least many python scripts and modules expect os.environ['PATH'] which maps to ENV:PATH

I have the PATH variable set here (for use with abc-shell) so didn't notice it. (well actually you get a bunch of insrt volume requesters as the python uses a different pathseperator ',' instead of ':')

I have a BZ open on it

The following code snippet will create a suitable path.

import os
import string

handle 
os.popen('path')
if 
handle:
    
path handle.read().split('\\n')
    
handle.close()
    
# first element is always "current directory" so replace with CURRDIR:
    
path[0] = "CURRDIR:"
    
os.environ['PATH'] = string.join(path,os.pathsep)

print 
os.environ['PATH']


Edited by broadblues on 2012/4/6 16:50:19
Edited by broadblues on 2012/4/6 16:54:07
Go to top
Re: mercurial fails to install?
Just can't stay away
Just can't stay away


See User information
Broadblues, where would i insert that code?
This could explain why a lot of scripts failed for me!!!!

Go to top
Re: mercurial fails to install?
Home away from home
Home away from home


See User information
At the beginning of a script before it includes any other module.

Can't guarantee that will work, though, might vary on a scruipt by script basis.

Ideally it needs inserting in amiga.py

Go to top
Re: mercurial fails to install?
Home away from home
Home away from home


See User information
You wouldn't need the final print statement BTW.

If your path is fairly constant (usually is) then you could just paste it into text editor save as pathmake.py set the script bit and do

setenv save PATH `pathmaker.py`

in that case ofcourse you do need the last print statement

That might cause an issue if you use anc-shell though, so swings and roundabouts, idaelly it need to be fixed in python. and as I said I do have a bug report open onit.


Go to top
Re: mercurial fails to install?
Home away from home
Home away from home


See User information
I hope we will get a fix for it with the next SDK.

This is a little bit too much workaround even for me

I have PATH set to "/gcc/bin:/SDK/C:/SDK/Local/C:/SDK/Local/newlib/bin:/SDK/Local/clib2/bin:/C:" and still get sometimes requesters from scripts/projects.

@broadblues

What about a new mercurial/hg version?
I tried myself but as i wrote i went back to your version because of lots of miscief :-/

Go to top
Re: mercurial fails to install?
Home away from home
Home away from home


See User information
Quote:

I hope we will get a fix for it with the next SDK.


Python isn't part of the SDK it's part of AmigaOS (it's in sys:system/python)

Quote:


I have PATH set to "/gcc/bin:/SDK/C:/SDK/Local/C:/SDK/Local/newlib/bin:/SDK/Local/clib2/bin:/C:" and still get sometimes requesters from scripts/projects.


That path is suitable for a program such as abc-shell using linux paths, it won't work for Python that uses AmigaOS Path.

Quote:

What about a new mercurial/hg version?
I tried myself but as i wrote i went back to your version because of lots of miscief :-/


Don't really have time at the moment, and I don't see the need for it. Unless there are significant cases where its failing in regular use, why upgrade for the sake of it?



Go to top
Re: mercurial fails to install?
Home away from home
Home away from home


See User information
Quote:

broadblues wrote:
Quote:

I hope we will get a fix for it with the next SDK.


Python isn't part of the SDK it's part of AmigaOS (it's in sys:system/python)

Quote:


I have PATH set to "/gcc/bin:/SDK/C:/SDK/Local/C:/SDK/Local/newlib/bin:/SDK/Local/clib2/bin:/C:" and still get sometimes requesters from scripts/projects.


That path is suitable for a program such as abc-shell using linux paths, it won't work for Python that uses AmigaOS Path.


I see, misunderstanding from my side then, sorry

Quote:

Quote:

What about a new mercurial/hg version?
I tried myself but as i wrote i went back to your version because of lots of miscief :-/


Don't really have time at the moment, and I don't see the need for it. Unless there are significant cases where its failing in regular use, why upgrade for the sake of it?


Bugfixes (under the hood) and new features (especially more options supported in the hg-git part)

But of course i understand the time issues, just wanted to nudge you again

Go to top
Re: mercurial fails to install?
Just can't stay away
Just can't stay away


See User information
I had install problems. Can't remember exactly what I did. Maybe I loaded "sh" first.

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 2 ( 0 members and 2 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project