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"). > Here are some > ideas make it even better: > - always show the dependency list instead of a traceback > Hmm I've done such things in the past, and my experience is that it's often better to just let an unexpected exception trickle through: if I put too much magic in the runner and then _that_ magic fails, then you have an even more cryptic error message: the original exception, and maybe another exception occurring in the error detection code on top of it. Installing dependencies is boiled down to something pretty simple at this point: pip3 install python-dateutil lxml bottle ply That's it. Beancount isn't much different than other Python softwares and the other packages don't wrap all their imports with try-except all over the place. The only difference is that many users will be running from source. I prefer to keep things simple. Nonetheless, I'll experiment with the idea. > - include the new lxml dependency in the list > Done. > - indicate which libs are required > In docs and checkdeps output. > - for not-yet-installed libs, suggest the pip command to install them > That's great idea. Done. I've added a message to the checkdeps output. > - maybe have each bean tool check for required dependencies at startup ? > Thanks a lot Simon. Can I count you as one of my users now? ;-) Thanks, On 6/28/15 11:09 PM, Martin Blais wrote: > > 2015-06-27 > > > > - Complete the design doc and made it public. > > > 2015-06-09 > > > > - Rewrote the Installation Instructions document completely to make it > > simpler. Some users had found it daunting. > > http://furius.ca/beancount/doc/install > > > > - Tested Windows installation using Cygwin and added it to the > > installation > > instructions. > > http://furius.ca/beancount/doc/install > > > -- > > --- > 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. > -- --- 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.
