Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 07-25-2012, 06:15 PM   #1
GRiker
Comparer of the Ephemeris
GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.
 
Posts: 1,497
Karma: 424627
Join Date: Mar 2009
Device: iPad
OS X 10.8 (Mountain Lion) Development Environment

Apparently 10.8 changes the way environment variables are passed. ~/.MacOSX/environment.plist is no longer used. According to this post, environment variables are now specified in the app's info.plist file:

Quote:
Change the Info.plist of the .app itself to contain an "LSEnvironment" dictionary with the environment variables you want.
~/.MacOSX/environment.plist is no longer supported.
It's not the app bundle, it's the calibre-debug executable in usr/bin that needs to be launched with the environment variable, but that's not an app bundle.

Ideas?

UPDATE:
I found this article indicating that it's possible to export an environment variable specified in /etc/launchd.conf.

That seems to resolve it. I am now properly running from source.

I'd appreciate it if someone else could confirm this solution, and then the docs should be updated to reflect this change for 10.8+.

G

Last edited by GRiker; 07-25-2012 at 06:58 PM.
GRiker is offline   Reply With Quote
Old 07-25-2012, 07:25 PM   #2
GRiker
Comparer of the Ephemeris
GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.
 
Posts: 1,497
Karma: 424627
Join Date: Mar 2009
Device: iPad
Another stumble - bzr explorer is not working after the update to 10.8. There's no environment variable PYTHON_PATH including the location of the bzrlib file.

UPDATE:
I reinstalled bzr explorer (version 2.5) and now it's working again.

G

Last edited by GRiker; 07-25-2012 at 07:45 PM.
GRiker is offline   Reply With Quote
 
Advertisement
Old 07-25-2012, 07:48 PM   #3
KevinH
Wizard
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 1,019
Karma: 444444
Join Date: Nov 2009
Device: many
Hi,

Have you tried simply adding your environment variables to a .bash_profile file found in your home directory.

Mine says the following:

kbhend$ cat .bash_profile

# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH

export CALIBRE_DEVELOP_FROM=/Users/kbhend/calibre_trunk/calibre/src


This should still work given the unix underpinnings of Mac OS X and the use of the bash shell.

Please let us know if this works for you or not as I am thinking of upgrading to ML but wanted to make sure my development environment still worked.

Thanks,

KevinH


Quote:
Originally Posted by GRiker View Post
Another stumble - bzr explorer is not working after the update to 10.8. There's no environment variable PYTHON_PATH including the location of the bzrlib file.

UPDATE:
I reinstalled bzr explorer (version 2.5) and now it's working again.

G
KevinH is offline   Reply With Quote
Old 07-26-2012, 01:30 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,325
Karma: 5382313
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I suggest you create a simple bash script to launch calibre, that way you wont have trouble when/if Apple decides that setting environment variables is not something their users should be allowed to do.

Code:
#!/bin/sh
export CALIBRE_DEVELOP_FROM=whatever
calibre-debug -g
Save this file as /usr/bin/calibre-develop and run
chmod +x /usr/bin/calibre-develop
kovidgoyal is offline   Reply With Quote
Old 07-26-2012, 08:29 AM   #5
GRiker
Comparer of the Ephemeris
GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.
 
Posts: 1,497
Karma: 424627
Join Date: Mar 2009
Device: iPad
Quote:
Originally Posted by kovidgoyal View Post
I suggest you create a simple bash script to launch calibre, that way you wont have trouble when/if Apple decides that setting environment variables is not something their users should be allowed to do.

Code:
#!/bin/sh
export CALIBRE_DEVELOP_FROM=whatever
calibre-debug -g
Save this file as /usr/bin/calibre-develop and run
chmod +x /usr/bin/calibre-develop
A much better solution.
GRiker is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up a development environment ... BWinmill Kobo Developer's Corner 27 06-16-2014 09:21 AM
Calibre + OS X 10.8 (Mountain Lion) - no apparent problems GRiker Calibre 9 07-27-2012 12:10 AM
Re: Fantasy Short Story - Year of the Mountain Lion BearMountainBooks Self-Promotions by Authors and Publishers 1 06-23-2011 03:21 PM
setup development environment JeffElkins Calibre 21 10-22-2008 04:25 PM
Setting up development environment tompe OpenInkpot 9 08-27-2008 03:26 PM


All times are GMT -4. The time now is 09:19 AM.


MobileRead.com is a privately owned, operated and funded community.