Add build instructions with homebrew and LXML debugging tip
authorDamiano Boppart <damiano@pep-security.net>
Wed, 06 Dec 2017 18:26:13 +0100
changeset 22961a12f577ac71
parent 2295 67d86917978d
child 2297 a3d936f31f04
child 2307 c33ec7f88dd9
child 2309 b4c78872e2c1
child 2312 b078c7c38b51
child 2320 e5c008a12298
child 2321 b71b768466e6
Add build instructions with homebrew and LXML debugging tip
doc/build-macos.md
     1.1 --- a/doc/build-macos.md	Wed Nov 22 10:28:40 2017 +0100
     1.2 +++ b/doc/build-macos.md	Wed Dec 06 18:26:13 2017 +0100
     1.3 @@ -6,10 +6,9 @@
     1.4  # Build instructions for macOS Sierra
     1.5  
     1.6  # Installing packaged dependencies
     1.7 +You will find instructions for using either Macports or Homebrew below to install the compile-time dependencies.
     1.8  
     1.9  ## MacPorts
    1.10 -
    1.11 -MacPorts is needed to install some compile-time dependencies.
    1.12  Install MacPorts according to the instructions found [here](https://www.macports.org/install.php).
    1.13  Ensure that Macports' binary paths (`/opt/local/bin` and `/opt/local/sbin`) are in your `PATH` environment variable.
    1.14  
    1.15 @@ -32,8 +31,38 @@
    1.16  sudo port select python python27
    1.17  ~~~
    1.18  
    1.19 +## Homebrew
    1.20 +Install Homebrew according to the instructions found [here](https://docs.brew.sh/Installation.html).
    1.21 +Ensure that Homebrew's binary path (`/usr/local/bin`) is in your `PATH` environment variable.
    1.22 +
    1.23 +~~~
    1.24 +# general
    1.25 +brew install mercurial
    1.26 +# YML2
    1.27 +# If you don't have pip with your Python 2 distribution, you can install it with brew
    1.28 +brew install python
    1.29 +pip2 install --user lxml
    1.30 +# libetpan
    1.31 +brew install git autoconf automake libtool
    1.32 +# asn1c
    1.33 +brew install asn1c
    1.34 +# engine
    1.35 +brew install gpgme
    1.36 +~~~
    1.37 +
    1.38  # Installing unpackaged dependencies
    1.39  ## YML2
    1.40 +To check if lxml is properly installed, you can use this lxml "hello world" command:
    1.41 +
    1.42 +~~~
    1.43 +python2 -c 'from lxml import etree; root = etree.Element("root"); print(root.tag)'
    1.44 +~~~
    1.45 +
    1.46 +It should generate the following output:
    1.47 +
    1.48 +~~~
    1.49 +root
    1.50 +~~~
    1.51  
    1.52  ~~~
    1.53  mkdir -p ~/code/yml2