Changes between Version 38 and Version 39 of InstallationGuidelines/Mac/Developer/Manual


Ignore:
Timestamp:
09/13/17 17:15:47 (4 years ago)
Author:
hassan
Comment:

I stripped all the MacPorts stuff; it could be reinserted as its own section if you think anyone still uses it.

Legend:

Unmodified
Added
Removed
Modified
  • InstallationGuidelines/Mac/Developer/Manual

    v38 v39  
    33
    44== Install Apple Xcode Developer Tools ==
    5 You will need [http://developer.apple.com/technologies/tools/ Apple's Xcode Developer Tools] (version 4.1 or later for Lion, 3.2 or later for Snow Leopard, or 3.1 or later for Leopard), found at the Apple Developer Connection site, on your Mac OS X installation CDs/DVD, or in the [http://itunes.apple.com/us/app/xcode/id497799835 Mac App Store]. Using the latest available version that will run on your OS is highly recommended. Ensure that the optional components for command line development are installed ("Command Line Tools" in the newest, "UNIX Development", plus "System Tools" in less-new versions, or "Command Line Support" in older ones).
     5You will need [http://developer.apple.com/technologies/tools/ Apple's Xcode Developer Tools], found at the Apple Developer Connection site or in the [http://itunes.apple.com/us/app/xcode/id497799835 Mac App Store]. Using the latest available version that will run on your OS is highly recommended.
    66=== Install Command Line Tools ===
    77The Xcode Command Line Tools need to be installed after Xcode has been installed. To install the Command Line Tools:
     
    1313
    1414// Caution: The Xcode download is over 3GB. //
    15 // LR October 2014: This step may not work for the last release of Xcode. //
    1615
    17 == Install !MacPorts ==
    18 The !MacPorts Project is an open-source community initiative to design an easy-to-use system for compiling, installing, and upgrading either command-line, X11 or Aqua based open-source software on the Mac OS X operating system. Installing !MacPorts will make installing some of the dependencies easier.
    19 * [http://www.macports.org/install.php Download and Install] !MacPorts
    20 Before installing any new software with !MacPorts, make sure to run the following command to ensure that the Portfiles are up to date.
    21 {{{
    22 sudo port -v selfupdate
    23 }}}
    24 Note, if you get this error...
    25 {{{
    26 Warning: xcodebuild exists but failed to execute
    27 }}}
    28 ... when running port, and have had old versions of Xcode that used the \Developer directory, you may need to run this command to update the Xcode directory.
    29 {{{
    30 sudo /usr/bin/xcode-select -switch /Applications/Xcode.app
    31 }}}
    32 == Install GIS tools ==
     16== Installation via Homebrew ==
     17If you aren't already using Homebrew, [https://brew.sh/ install it now].
     18
     19=== GIS tools ===
    3320For some GIS features of Eden (e.g. if you would rather use PostgreSQL with PostGIS instead of MySQL) you are required to install the [http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries GDAL framework]. [http://trac.osgeo.org/geos/ GEOS] is also required, and is a dependency of shapely.
    3421
    35 '''!MacPorts Install (recommended)'''
    3622{{{
    37 sudo port install gdal geos
    38 }}}
    39 == Install Python ==
    40 The current preferred version for Python for developers is version 2.7. If you are running the default Apple Python installation, several dependencies will fail to install. Be sure to install a version of Python, from the  [http://python.org Python Website], or using !MacPorts.
    41 
    42 '''!MacPorts Install (recommended)'''
    43 {{{
    44 sudo port install python27; sudo port select --set python python27
    45 }}}
    46 == Install Python packages ==
    47 '''!MacPorts install (recommended)'''
    48 {{{
    49 sudo port install py27-lxml py27-shapely py27-reportlab py27-xlrd py27-xlwt py-serial py27-tweepy py27-dateutil py27-pil
    50 }}}
    51 '''!EasyInstall'''
    52 You can use [http://peak.telecommunity.com/DevCenter/EasyInstall easy_install] or [http://www.pip-installer.org/ pip] for these installations. Be sure to include the "export" line, otherwise these will fail to install because they build for powerPC by default.
    53 {{{
    54 export ARCHFLAGS="-arch i386 -arch x86_64" STATIC_DEPS=true
    55 sudo easy_install python-dateutil
    56 sudo easy_install lxml
    57 sudo easy_install shapely
    58 sudo easy_install reportlab
    59 sudo easy_install xlrd
    60 sudo easy_install xlwt
    61 sudo easy_install pyserial
    62 sudo easy_install tweepy
    63 sudo easy_install pil
     23brew install gdal geos
    6424}}}
    6525
    66 == Install PostgreSQL + PostGIS extensions ==
     26=== Python ===
     27It's probable that you already have Python 2.7.x installed but check with {{{python -V}}}.
     28If you don't, or want an OS-version-independent installation, install with Homebrew: {{{brew install python}}}.
     29
     30The Homebrew version of Python also installs {{{pip}}} which you'll use for the following required Python packages:
     31
     32{{{
     33pip install python-dateutil
     34pip install lxml
     35pip install shapely
     36pip install reportlab
     37pip install xlrd
     38pip install xlwt
     39pip install pyserial
     40pip install tweepy
     41pip install Pillow
     42}}}
     43
     44=== PostgreSQL + PostGIS extensions ===
     45
    6746If you want to use PostgreSQL - PostGIS (for which you will need GDAL, above):
    68  * Install the one clickInstaller sponsored by EnterpriseDB PostgreSQL and select also installation of PostGIS, following [http://schwuk.com/articles/2009/09/10/psycopg2-on-os-x this post]
    69  * Please note - If you are installing on Mac OSX Lion, and you encounter errors upon installing the Postgresql through EnterpriseDB version specified in the above link, you could go to [http://www.enterprisedb.com/downloads/postgres-postgresql-downloads this link] and download EnterpriseDB Postgresql 9.3.1
    70  * Install the Python database driver [http://initd.org/psycopg/ psycopg2] for Postgres 9.3 as the web2py default pg8000 has a few mappings missing. Use that as the driver instead.
     47{{{
     48brew install postgresql postgis
     49}}}
    7150
    72 == Install Git ==
     51=== Git ===
     52
    7353Check whether you already have git installed by:
    7454{{{
    7555which git
    7656}}}
    77 If not then...
    78 
    79 '''!MacPorts Install (recommended)'''
     57If not then
    8058{{{
    81 sudo port install git-core +doc +gitweb
     59brew install git
    8260}}}
    83 
    84 If you get this error
    85 
    86 {{{Error: git-core has been replaced by git; please install that instead.}}}
    87 
    88 Then use this code
    89 {{{
    90 sudo port install git +doc +gitweb
    91 }}}
    92 == Trouble? ==
    93  * Missing macport installed python packages? You might need to update {{{PYTHONPATH}}} in your {{{~/.bash_profile}}} try:
    94 {{{
    95 export PYTHONPATH="/opt/local/bin/python2.7:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages:$PYTHONPATH"
    96 }}}
    97  * {{{lxml}}} can give trouble on OS X.  Try:
    98   * {{{STATIC_DEPS=true sudo easy_install lxml}}} (adapted from [http://blog.ianbicking.org/2008/12/10/lxml-an-underappreciated-web-scraping-library/ this blog post])
    99   * remove other {{{libxml2}}} versions, such as may have been installed by {{{fink}}} or !MacPorts - ONLY works in unmodified Python setup. In case you have modified your Python you must link some how the python directory with /frameworks/python otherwise lxml will not being found(not tested)
    10061
    10162== Next ==