Mac OS Issues
Mac issues experienced to date in GNUmed:
Window sizes often awkward (not unique to Mac, but Mac in some cases suffers more). In the case of the main client window opening too large and with its top edge above the screen display, it is fixable using the GNUmed menu Windows > Zoom.
This must be rectified before a GNUmed database can be bootstrapped onto the Mac. See
http://docs.info.apple.com/ searching on "enable root" for the version of Mac OS that is in use.
On the Mac, the shell command
su -c seems not supported… lack of which would only (non-fatally) disable one check and one cleanup routine in bootstrapping.
While the alternative opening of a root shell
sudo -s in which to run the script would work
despite the su -c errors displayed, this too would disable (during bootstrap-latest.sh) one check and one cleanup routine but, so far, non-fatal.
The version of Python shipped with Mac OS can lag behind what is required for GNUmed, and may have undergone arbitrary modification by Apple. The installed version can be identified while logged into a standard Mac user account by opening a window in the Terminal application
- at the command line, enter
sudo python -V and provide the user's password
- Mac OS 10.5 "Leopard" – default Python (2.5.1) is adequate for GNUmed
- Mac OS X "Tiger" – default Python (2.3.5) is no longer adequate
- more on Python frameworks (on the Mac) at
When it would be necessary to install a non-default Python, the alternative python's directory (for the MacPython distribution, it is
/usr/local/bin) needs to appear in your path before
/usr/bin
-
- use the commands
echo $PATH
- if needed (assuming that you are using bash whereas tsch requires the setenv command):
export PATH=/usr/local/bin:$PATH
- then run
./gm-from-cvs.sh as in the following example:
iMac:~/Desktop/GNUmed-0.2.7.0/client jb$ echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
iMac:~/Desktop/GNUmed-0.2.7.0/client jb$ export PATH=/usr/local/bin:$PATH
iMac:~/Desktop/GNUmed-0.2.7.0/client jb$ echo $PATH
/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
iMac:~/Desktop/GNUmed-0.2.7.0/client jb$ ./gm-from-cvs.sh
Gnumed -> client
gm-from-cvs.log
...
also, you should add this same
export line to your startup file (.bash_profile if you're using bash) so that this is the default for new terminals. Create the following text file and save it as ".bash_profile" in your home directory:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=/usr/local/bin:/$PATH;export PATH
# End of File
Credit for the above to
from a post to gnumed-devel from Sep 28, 2007:
A potentially useful site for Python on the Macintosh:
http://www.nabble.com/Python---pythonmac-sig-f2970.html
Pasted forums notes:
I'll add a note in bold on the python.org Macintosh downloads page saying not to remove the Apple-provided version.
http://www.nabble.com/forum/ViewPost.jtp?post=3957711&framed=y
--The "Recommended Option" -- for users without special needs or
newbies that don't know what they need
----- use binary Python 2.4.* installer
----- ... after installing:
-- Install
TigerPython24Fix (dunno if still necessary in 2007)
-- Add /usr/local/bin to your PATH
http://www.nabble.com/forum/ViewPost.jtp?post=2788866&framed=y
Yes. It works after I type export PATH=/usr/local/bin:$PATH. But next time if I open the terminal, I need do it again. How can I make it permanent?
http://www.nabble.com/forum/ViewPost.jtp?post=2780641&framed=y
The python you installed lives in /usr/local/bin. If you want it to run when you type 'python' at the prompt you need to make sure that /usr/local/bin is before /usr/bin in your path.
http://www.nabble.com/forum/ViewPost.jtp?post=745652&framed=y
To make sure /usr/local/bin is in your path before /usr/bin if your shell is bash, type...
http://www.nabble.com/forum/ViewPost.jtp?post=2778505&framed=y
Create the following text file and save it as ".bash_profile" in your home directory.
http://www.nabble.com/forum/ViewPost.jtp?post=2781399&framed=y
The thing I'm slightly unclear about is the best way to change my path on OSX. Changing things like ~/.profile and ~/.bash_profile change it for the shell, but do not change it systemwide. I've
modified my ~/.MacOSX/environment.plist, which seems to do the job
...Yes. It is the way to change it system wide for any applications the do not check the $PATH environment variable.
I only change the environment in those two ways (shell vars and environment.plist) and have no problems. And if I want a specific Python, /usr/bin/python or /usr/local/bin/python finds the one I intend to access. Maybe some of the more sage members of this community have more detailed or better advice, but that's what I recommend from my experience.
http://www.nabble.com/forum/ViewPost.jtp?post=3934949&framed=y
Add /Library/Frameworks/Python.framework/Versions/Current/bin to your shell's PATH, which the macpython installer should do automatically.
The major advantages of that are that all python stuff is nicely self-contained in the python framework and it is possible to do side-by-side installations of multiple versions of python (such as Python 2.4 and 2.5).
http://www.nabble.com/forum/ViewPost.jtp?post=7735746&framed=y
>
What's the "framework"? If that's the entire Python interpreter and
>
library, installed in a way that can't interfere with whatever the
>
user is using for whatever other Python needs they have on their
>
machine -- that's what I'd need if I were to use something other than
>
the system Python.
And that is what py2app does. It will add the subsection of Python.framework that is needed for your application (based on the contents of setup.py and static analysis of the application) into the app bundle. Loader commands of binaries in the app bundle are rewriten to make sure they refer to the framework (and other libraries) inside the bundle instead of versions outside of the bundle.
http://www.nabble.com/forum/ViewPost.jtp?post=3416888&framed=y
Why do I need
MacPython ? What does it do?
http://www.nabble.com/forum/ViewPost.jtp?post=6400598&framed=y
MacPython-specific programming info available at
For a long time I've been building apps with
MacPython and wxPython that run just fine on Mac and Windows, using py2app and py2exe to build the executables, and packaging the Win version with
InnoSetup and for Mac just making a double-clickable .dmg -- both dead simple for users (whom I expect to know even less than I do)
http://www.nabble.com/Recurring-question---which-python-should-I-use--tf1278715.html#a3400430
You can use native extensions with the universal build, but you cannot use PPC extensions on Intel. To answer you're question: you're going to need a universal or Intel build of wxPython to create wx gui's on an intel mac.
http://www.nabble.com/Recurring-question---which-python-should-I-use--tf1278715.html#a3400430
>
What do I need to hack to get the frameworks to install in my preferred
>
location, instead of the default? And why doesn't Python pick up the
>
./configure flags correctly anyway?
It does pick up the configure flags correctly, but you need to pass the correct configure flags. If you'd have used --help you'd have seen that --enable-framework takes a path, which defaults to /Library/Frameworks. If you want it to go somewhere else, give it a different path.
http://www.nabble.com/forum/ViewPost.jtp?post=6837806&framed=y
Older Mac OS Python-related information posted on the gm-devel list on
Sep 15, 2005
Mac OS 10.3 Panther keeps the mxDateTime and pyPgSQL modules installed in
/Library/Python/2.3/
Deprecated:
Mac could not properly run from cvs using the base gm-from-cvs file
-
- sashwindow's OnSize method requires manual setting
- unresolved as at Aug 9, 2004
- reference: gm-devel posting
- Aug 15, 2004: wxpython 2.5.2.7 seemed to wipe out the "sash" bug in earlier versions of python