Simplify build process

@cap @stephentu 
My intent in distinguishing _dbg is in error handling: I prefer `abort()`
in C++ standalones and `throw` in python-bound C++, since `throw`
compatible with python's `catch`. This is controlled by
`DIST_THROW_ON_ERROR` via common.hpp. Do you have a preference? We could
easily make `throw` the default and `abort` the special case.
On Aug 19, 2014 5:47 PM, "Stephen Tu" <notifications@github.com> wrote:

> In setup.py:
>
> > -        else:
> > -            sources += [
> > -                'src/common.cc',
> > -                'src/special.cc',
> > -                'src/random.cc',
> > -                'src/vector_math.cc',
> > -            ]
> > -            if name == 'lp.clustering':
> > -                sources.append('src/clustering.cc')
> > -            elif name in ('lp.models.nich', 'lp.models._nich'):
> > -                sources.append('src/models/nich.cc')
> > -            elif name in ('lp.models.niw', 'lp.models._niw'):
> > -                sources.append('src/models/niw.cc')
> > -            elif name in ('lp.models.gp', 'lp.models._gp'):
> > -                sources.append('src/models/gp.cc')
> > +        libraries = ['distributions_shared_dbg'] + libraries
>
> Why does the python wrapper use the debug library?
>
> I worry about this b/c datamicroscopes's C++ library links against
> libdistributions_shared, but we also make use of the python wrappers (so
> this would cause both libdistributions_shared and
> libdistributions_shared_dbg to be linked and I don't know what would happen
> then)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/forcedotcom/distributions/pull/79/files#r16453568>.
>