setup.py fails on macosx

Bug #381169 reported by robinmills
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Phatch
Fix Released
Critical
Stani
0.2
Fix Released
Critical
Stani

Bug Description

I downloaded Phatch 0.1.15 for my Mac (Leopard 10.5.7) and executed the command:

sudo python setup.py install
and was rewarded with the message:
"Sorry your platform is not yet supported."

I defeated him by changing phatch/core/config.py line #40
from
    if sys.platform[:5] == 'linux' :
to
    if ((sys.platform[:5] == 'linux') or (sys.platform[1:6] == 'arwin')) :

then tried again:
sudo python setup.py install
... stuff deleted ...
Installation finished! You can now run Phatch by typing 'phatch'

And indeed phatch runs as advertised.

----///----

I had to install wxPython for Leopard (wx 2.8 for python 2.5) and I'm providing this information as someone else may find this useful.
I following the sourceforge links from:
http://www.wxpython.org/download.php
to
http://sourceforge.net/project/showfiles.php?group_id=10718&package_id=10559
I downloaded and installed this:
wxPython2.8-osx-ansi-2.8.10.1-universal-py2.5.dmg

Revision history for this message
Stani (stani) wrote :

I didn't feel comfortable enough to allow it for a Mac. But in this case would it not be better to use:

if not sys.platform.startswith('win')?

Changed in phatch:
assignee: nobody → stani (stani)
importance: Undecided → Critical
status: New → Incomplete
Revision history for this message
Stani (stani) wrote :

I've changed it upstream already. Can you please download Phatch with bazaar (bzr branch lp:phatch) and confirm it works?

$ bzr diff -r612
=== modified file 'phatch/core/config.py'
--- phatch/core/config.py 2009-05-26 20:52:32 +0000
+++ phatch/core/config.py 2009-05-28 12:35:42 +0000
@@ -43,7 +43,13 @@
     PHATCH_SHARE_PATH = os.path.join(sys.prefix, "share") #also for win?
     PHATCH_FONTS_PATH = os.path.join(PHATCH_SHARE_PATH,"phatch","fonts")

- if sys.platform[:5] == 'linux':
+ if sys.platform.startswith('win'):
+ sys.stderr.write(
+ 'Sorry your platform is not yet supported.\n' \
+ + 'The instructions for Windows are on the Phatch website.'
+ )
+ sys.exit()
+ else:
         return {
             "PHATCH_IMAGE_PATH" : os.path.join(PHATCH_SHARE_PATH,"phatch","images"),
             "PHATCH_LOCALE_PATH": os.path.join(PHATCH_SHARE_PATH,"locale"),
@@ -51,9 +57,6 @@
             "PHATCH_FONTS_PATH" : PHATCH_FONTS_PATH,
             "PHATCH_ACTIONLISTS_PATH": os.path.join(PHATCH_SHARE_PATH,"phatch","actionlists"),
         }
- else:
- sys.stderr.write('Sorry your platform is not yet supported.\n')
- sys.exit()

 def add_user_paths(config_paths):
     config_paths["USER_PATH"] = USER_PATH

Revision history for this message
Stani (stani) wrote :

Robin confirmed this fix worked.

Changed in phatch:
status: Incomplete → Fix Committed
Stani (stani)
Changed in phatch:
milestone: none → 0.2.1
Stani (stani)
Changed in phatch:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.