Closed rudylattae closed 13 years ago
I have acknowledged the problem and I am willing to make the changes. However, there is an explicit reason why this is the case, and it is to avoid the horrible pkg_resources
which delays everything while it looks for the right version.
There is another catch: I am not looking forward for Windows testing. Konira is tested against Linux/Unix with Python2.5, 2.6 and 2.7 and PyPy 1.5 and 1.6
I've investigated this issue and looked at how Mercurial solves it: it appends another win-compatible script to the script list that it is a bat
file.
Could you please take a look at this gist: https://gist.github.com/1195540 And tell me if you think this would work? Again, I don't have access to a windows box and would prefer not to need one :)
I tried that gist out and updated with my comments. I think it's a good fix so ship-it :)
Thanks for the speedy response.
WRT testing on Windows. I'll be willing to do that. I already tried to run the konira tests through tox on my Win7 box but I end up with an error rsied by the subprocess
module, something along the lines of "WindowsError: [Error 2] The system cannot find the file specified"
I've not looked into it much, but it could be due to my funky Python setup. I'll take another look later when I have some time and see if we can't get konira testing itself on Windows as well.
FYI: I used a stripped down tox.ini (py26, py27) for my first stab at testing konira on Windows -- https://gist.github.com/1196364
Can you try and install from scratch the latest push from ms-support branch? I have implemented this fix.
Tested. Works as expected. :thumbsup:
Thanks
Out the box, it is impossible to run konira on Windows because the shell script that is installed is really only *nix-friendly.
Kindly consider using the
entry_points
parameter to thesetup()
function insetup.py
. You could make it refer tokonira:main
or some other entry point that does the same thing that thekonira
script does currently, i.e callKoniraCommands()
With this directive, setup-tools will install the relevant "script" for the platform in question. E.g. on Windows this would probably be
konira.exe
which loadskonira-script.py
.Aside: For those looking for a temporary fix till this issue is resolved, here is my current work-around.
\path-to-python-install\Scripts
konira
script tokonira-script.py
.konira.cmd
DOS batch script with the contents:Of course this is really just a hassle, especially for anyone like me who does all their python work in virtualenvs. I'd have to apply this band-aid to every venv I install konira into. It would be great to have a real fix. :)