post

Quick Python/Developer tips for OSX Lion

Detta är ett hittat inlägg som jag delat ut via Google Reader. Alla rättigheter tillhör orginalskribenten.

OBS! Det är inte möjligt att kommentera delade inlägg här, gör det istället där det först publicerades.

Lion king 5067

Yes; of course I upgraded to OSX Lion on day one. To quote myself from twitter:

I am happy in the warm cozi­ness and stark white­ness of Steve Jobs’ monoculture.

Regard­less of that though, I had very few hic­cups with Lion itself — but a few things you need to deal with going in:

  • Be on a high band­width con­nec­tion. The down­loads you have to make are huge.
  • XCode 4.x is now free in the App Store — you need this — the first thing you need to install after Lion is the lat­est ver­sion of XCode from the App Store, if you do this, all your vir­tualenvs, your home­brew envi­ron­ment (at least mine) just Keep Work­ing. Save your­self some pain.
    • Side note: @kennethreitz, gen­tle­man scholar, has actu­ally done a cus­tom osx-gcc-installer — this con­tains a sys­tem install of GCC and all the good­ness you need (such as install_name_tool) for Python hack­ing. So you might be able to skip the mas­sive XCode install.
    • When installing XCode, for some unknown unholy rea­son, if you have not quit itunes, and itunes helper (see activ­ity mon­i­tor) prior to start­ing the XCode installer, the install will hang. Do your­self a favor and kill it with fire.
    • Remem­ber; the binary direc­tory for the dev tools is in /Developer/usr/bin/ — this includes gcc-4.2
    • Do your­self a favor, drop “export ARCHFLAGS=”-arch x86_64”” into your .bash_profile.
  • If you’re run­ning home­brew; after the upgrade, I rec­om­mend a brew update && brew upgrade
  • If you use mer­cu­r­ial — you need to install the updated ver­sion found here.
  • Just for good mea­sure, do a global (sudo) rein­stall of vir­tualenv; vir­tualen­vwrap­per and pip. Make sure they’re pointed at the write default Python (in my case the sys­tem one).
  • If you are using VMWare Fusion: You really need to be run­ning the lat­est ver­sion of 3.x.

Other than the above; my dev envi­ron­ment pretty much just kept rock­ing — Lion’s default Python install is a healthy Python 2.7.1 — dou­ble nice++ — MacVim, edi­tor of choice just kept plug­ging away, although I have not tried the “offi­cial unre­leased” ver­sion they have for Lion. I have a slight aver­sion to run­ning beta builds of my editor.

Some of you are going to run into some annoy­ances; I can’t help you with all of them, but I can help you with the two inter­face changes I could not deal with (I actu­ally like all the other ones).

  • First; go into sys­tem pref­er­ences > mis­sion con­trol and uncheck “Auto­mat­i­cally rearrange spaces based on most recent use” — trust me, you’ll thank me.
  • Sec­ond, there’s this … annoy­ing ani­ma­tion when you make new appli­ca­tion win­dows (See the Ars Lion Review | kin­dle ver­sion). The ani­ma­tion offends me on a cel­lu­lar level. You dis­able it by run­ning: “defaults write NSGlob­al­Do­main NSAuto­mat­icWin­dowAn­i­ma­tion­sEn­abled –bool NO” on the com­mand line.
  • Show hid­den files in finder: “defaults write com.apple.finder AppleShowAll­Files –bool YES
  • Show full paths in finder: “defaults write com.apple.finder _FXShowPosixPathInTitle –bool YES

Other than that; I’m a happy camper. The new scroll behav­ior on the track­pads is amaz­ing, if not jar­ring when using a mouse. Every­thing just pretty much kept work­ing for me. But then again, I’m pretty easy to please.

See also — “Four Lion Ter­mi­nal Hacks” from Mac­world and “Top 10 Secret Fea­tures in OSX Lion” from Life­hacker — if you really, really hate the UI changes, see “How to de-IOSify” from Lifehacker.

p.s. I orig­i­nally for­got to men­tion this — but the full disk encryp­tion in Lion is imple­mented damn well — it’s easy for users to “get” — seam­less, and trans­par­ent. In my hon­est opin­ion, this is worth the price of upgrad­ing alone if you have a lap­top. It’s so well done, and it sim­ply shows how crappy fil­e­vault was — it also goes to show that if you make crypto easy and trans­par­ent for users, they might actu­ally use it. See the Ars Review for a deeper dive. See also “PGP WDE vs. Lion Disk Encryp­tion


Yes; of course I upgraded to OSX Lion on day one. To quote myself from twitter:

I am happy in the warm coziness and stark whiteness of Steve Jobs\’ monoculture.

Regardless of that though, I had very few hiccups with Lion itself – but a few things you need to deal with going in:

Be on a …

  • Thanks for the tips.  Did you run into any prob­lems with MacVim not remem­ber­ing its win­dow size after a relaunch?  (I don’t want to :set columns and :set lines because I sync the con­fig between com­put­ers with dif­fer­ent res­o­lu­tion displays).

  • Nope, but I set columns and lines…

  • Thanks for the shout out!

    Also, since Lion is 64bit-only, I think only “export ARCHFLAGS=”–arch x86_64” is necessary. 

  • Thanks! Amended, I had for­got­ten I swapped to x86_64 only

Orginalpost: Quick Python/Developer tips for OSX Lion

Related posts:

  1. iPad typing tips: how to get quick caps, rapid numbers, and instant apostrophes
  2. bolstad: RT @ronnestam: Grey is the new black (or at least 10% of it) #lion #wordpress
  3. bolstad: @PeterRosdahl Nej, men jag vill ju köra Lion när det den väl kommer. Så jag väntar på släppet …
  4. bolstad: RT @mdhughes: #WWDC keynote predictions: iOS5 runs on potatoes, no more batteries! iCloud allows teleportation-over-IP. A real lion will …
  5. Handlink Wi-Fi Base Station: Quick Net Access at Drop of a Coin [Wi-Fi]

Speak Your Mind

*