akshayrkulkarni / gui2exe

Automatically exported from code.google.com/p/gui2exe
0 stars 0 forks source link

Use of absolute paths reduces the tools usefulness #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Generate an install script in the same directory as your source
2. Move/copy the directory, or if it is a removable disk unmount and mount 
so it has a different drive letter.  If it is a copy then make an obvious 
mode to your app - e.g. icon/title/bgcolour change
3. Try running setup.py in the new location

What is the expected output? What do you see instead?
Expect the same output as in old directory, if directory/drive moved lots 
of file not found messages, if copy then changes not present in output 
files. (Note this is also the issue with the setup.py install in gui2exe 
itself).

What version of GUI2Exe, Python and wxPython are you using? On what 
operating system?

Please provide any additional information below.
This problem arrises because data_files, icon_resources, etc, all use 
absolute paths, in practical use it is not that unusual to have code in 
varing locations.  The solution is to either use relative paths for all 
names that start with the directory that setup.py is stored in or possibly 
offer the user the option of using relative paths on any file select.

Original issue reported on code.google.com by GadgetSt...@hotmail.com on 23 Dec 2009 at 8:53

GoogleCodeExporter commented 9 years ago
Sorry, forgot the version information:
GUI2Exe v0.4.0
Python 2.6  (r26:66721, Oct  2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)]
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Windows 7, Vista & XP

Original comment by GadgetSt...@hotmail.com on 23 Dec 2009 at 9:00

GoogleCodeExporter commented 9 years ago
Hi,

this is a good suggestions, I'll implement it using relative paths instead of 
absolute ones. One thing, however: you wrote:

" Note this is also the issue with the setup.py install in gui2exe itself. "

GUI2Exe is not meant to be installed as site-package with this command:

python Setup.py install

Nor to be compiled as executable. GUI2Exe should be used as-is, like a normal 
Python 
file, i.e., double-clicking on the GUI2Exe.py file on Windows or writing:

python GUI2Exe.py

This is also mentioned in the main GUI2Exe page, and the old Setup.py file in 
the 
GUI2Exe distribution is now gone in version 0.5 and SVN.

Original comment by andrea.gavana@gmail.com on 23 Dec 2009 at 10:04

GoogleCodeExporter commented 9 years ago
With the setup file gone users will be less likely to moan about "setup.py 
install" 
not working, b.t.w. it did work fine if the paths were changed to relative 
ones.  
A minor suggestion since I and I am sure many others have got into the habit of 
running setup.py install on any new package we get, have you considered 
replacing 
the contents of setup.py with something like the following?

print "GUI2Exe is not meant to be installed as site-package with this 
command:\n"
print "python Setup.py install\n"
print "Please run here or move the entire directory structure to a prefered 
location"

Original comment by GadgetSt...@hotmail.com on 23 Dec 2009 at 12:34

GoogleCodeExporter commented 9 years ago
Fixed in SVN and in release 0.5.1 (on the download page).

Original comment by andrea.gavana@gmail.com on 24 Aug 2011 at 5:19