Hi Detlev,

unfortunateley 'prefix' is no environment variable which can be tested via 
os.environ.

It's more like an variable for the install dir, set by the package manager 
Homebrew via the formula and which puts normaly a 
"usr/local/Cellar/PackageName/Version/"  before the softwares install path. 
Example for Homebrews directory structure: 
http://img4.picload.org/image/lolagaa/09_04_14_22_09.jpg

So for instance some files of eric5 landed in 
"/usr/local/Cellar/python3/3.4.0_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4//site-packages"
 which is a symlink to "/usr/local/lib/python3.4/site-packages"

Maybe these links can explain it a bit better: 
https://github.com/Homebrew/homebrew/wiki/Homebrew-and-Python 
andhttps://github.com/Homebrew/homebrew/wiki/Gems,-Eggs-and-Perl-Modules

Somehow this doesn't work with the macAppBundle. A  Homebrew dev suggested it 
is because of a hardcoded path in install.py.


Michael


Am 08.04.2014 um 19:07 schrieb Detlev Offenbach <[email protected]>:

> Hello,
>  
> is it correct that 'prefix' is an environment variable that can be tested for 
> with code like
>  
> if 'prefix' in os.environ:
>  
> Detlev
>  
> On Tuesday 08 April 2014, 18:43:58 Hirschfeld Michael wrote:
> > Hi,
> >
> > currently I wrote a 'formula/receipt' for the Homebrew package manager to
> > build and install eric5 at OS X [1].
> >
> > It builds and installs fine except for one thing. Homebrew installs all
> > software into its own 'prefix' in '/usr/local' and almost all of
> > eric5-files also went there. But the target for the application bundle is
> > hardcoded in install.py and installs Eric5 in /Applications regardless of
> > the prefix:
> >
> > def createMacAppBundle(pydir):
> > """
> > Create a Mac application bundle.
> >
> > @param pydir the name of the directory where the Python script will
> > eventually be installed (string)
> > """
> > global cfg, sourceDir, macAppBundleName, macPythonExe
> >
> > dirs = {"contents":
> > "/Applications/{0}/Contents/".format(macAppBundleName), "exe":
> > "/Applications/{0}/Contents/MacOS".format(macAppBundleName), "icns":
> > "/Applications/{0}/Contents/Resources".format(
> > macAppBundleName)}
> > os.makedirs(dirs["contents"])
> > os.mkdir(dirs["exe"])
> > os.mkdir(dirs["icns"])
> >
> > So the Homebrew test bot failed with a "PermissionError: [Errno 13]
> > Permission denied: '/Applications/eric5.app'" [2] You can follow the
> > discussion from the pull request at [3].
> >
> > Any chance to get the install target changed, maybe by a conditional test
> > a'la if $prefix is set
> > install in $prefix
> > else
> > install in /Applications
> >
> >
> > Thanks,
> > Michael
> >
> >
> >
> > [1] https://github.com/Homebrew/homebrew/pull/28205/commits
> > [2]
> > http://bot.brew.sh/job/Homebrew%20Pull%20Requests/9512/version=mavericks/te
> > stReport/junit/brew-test-bot/mavericks/install_eric5/ [3]
> > https://github.com/Homebrew/homebrew/pull/28205
> > _______________________________________________
> > Eric mailing list
> > [email protected]
> > http://www.riverbankcomputing.com/mailman/listinfo/eric
> --
> Detlev Offenbach
> [email protected]

_______________________________________________
Eric mailing list
[email protected]
http://www.riverbankcomputing.com/mailman/listinfo/eric

Reply via email to