On Thu, Jul 2, 2015 at 3:23 PM, Martin Blais <[email protected]> wrote:

> On Wed, Jul 1, 2015 at 10:54 AM, Simon Michael <[email protected]> wrote:
>
>> Nice! Fewer clearer more cross-platform install steps is always good.
>
>
>> Installation worked for me on osx just now. I may have had some
>> prerequisites installed from before, such as python3 from brew.
>>
>> I thought I was done when bean-check ran, but just out of interest I ran
>> bean-doctor from the next section and got a traceback showing that I
>> still needed lxml. I confirmed that by re-reading your release notes and
>> installed it with pip3 install lxml.
>
>
> Ah! How could I forget. Thanks for pointing this out.
> I added lxml to checkdeps.
>
>
>
>> The next traceback mentioned
>> datetime, so pip3 install python-datetime.
>
>
> You mean python-dateutil, not python-datetime.
> (datetime is part of the stdlib and should require no install.)
>
>
>
>> Finally bean-doctor showed a
>> nice list of dependencies and their status. I had bottle from before,
>> and upgraded it with pip3 install bottle --upgrade, and ply sounds
>> useful so pip3 install ply.
>>
>
> You need PLY for bean-query.
>
>
> bean-doctor is nice, it helps reassure me that I won't be getting
>> dependency-related tracebacks later while using the tool.
>
>
> "bean-doctor checkdeps" is only required to run Beancount directly from
> the clone.
>
> I'd been having problems with setup.py in that it's supposed to be able to
> install dependencies by default, so in theory you shouldn't have to install
> anything but Beancount now. It hadn't been working before.
>
> Here's some background, in case anyone's interested: Python has two active
> supporting projects for packaging:
>
> (1) distutils, which comes with it in the stdlib, and
> (2) setuptools, which is newer and better, but which needs to be installed
> on top of the stdlib.
>
> There's a deep history of why that is and many projects have come and gone
> trying to make this better (e.g. distribute). The main issue with disutils
> is that it does not support automatic installation of dependencies (it's
> really old but a ton of packages still depend on it, that's the price of
> popularity). Setuptools does support it, the packager can declare
> dependencies and pip3 should be able to pull in and install all
> requirements automatically.  I could not get setuptools to install my
> dependencies due to a namespace collision with the 'parser' module (was my
> fault).
>
> Now that I've made changes, Beancount supports setuptools and installs
> dependencies automatically. If you don't have setuptools installed, it
> falls back on distutils (and you have to install the dependencies manually,
> e.g. it's a one-liner:  "pip3 install python-dateutil lxml bottle ply").
>

Okay, an update: the state of setuptools / distutils Python distribution
tools is in a really sorry state indeed. I've spend much of my afternoon
dealing with some more setuptools brokenness and running around its sad,
sad source code. When I use

  python3 setup.py build_ext -i

with setuptools installed, it puts the _parser.so library under src/python
and not under src/python/beancount/parser where it should be, so that's a
no go.

This is using setuptools v15. Manually installing the latest v18 puts the
.so in the right place but there is an annoying warning about not running
it with pip3.

#$&*# this. No seriously, I've had enough. I want to spend my time building
features instead of packaging, and I've wasted the better part of a
beautiful vacation day just dealing with setuptools and reading conflicting
information on the web. I'm ditching support for setuptools.

Beancount will use distutils, which is basic, comes with all versions of
Python, and does the right thing by default. It's only drawback is that you
need to install the dependencies manually. It won't do the dependencies
automatically. It's a one-liner to install dependencies. No big deal in my
book.

Python seriously needs a brand new, rewritten from scratch packaging system.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to