tl;dr: Sergey's "unbundle mpmath" patches have created a substantial
entry barrier for GSoC students (and people with similar low Python
experience), and complicated the process of starting a debugging or test
session.
Also, I'm pretty p*ssed because I predicted exactly this, and got some
dismissive non-answers instead of seeing the issues addressed.
Full story:
I have to say that my fears have fully become reality: The process of
installing mpmath, while simple, isn't described in a way that "just
works", and still invites subtle error.
As a developer, I expect to be able to download the git repo and start
working. Possibly after reading a README file.
Okay, let's see how a new dev with little knowledge of Python and no
knowledge of SymPy would fare...
* README.rst is available. Fair enough.
* It says "git clone" - okay, I just did that.
* It sends me to
http://docs.sympy.org/dev/install.html - erh, a detour.
Let's put that aside, I haven't fully read the readme and don't even
know yet that anything is missing.
* Okay, "Documentation and Usage", that sounds promising.
Says "Everything is at" and another URL - also instructions for
generating docs locally: cd docs; make html
Oh. I'm getting this:
Makefile:121: warning: overriding commands for target
`_build/cheatsheet/cheatsheet.pdf'
Makefile:116: warning: ignoring old commands for target
`_build/cheatsheet/cheatsheet.pdf'
rm -rf _build/logo
mkdir -p _build/logo
python ./generate_logos.py -d
INFO:root: File saved: ./_build/logo/sympy-notail.svg
INFO:root: File saved: ./_build/logo/sympy-notailtext.svg
INFO:root: File saved: ./_build/logo/sympy-notext.svg
ERROR:root:rsvg-convert: command not found
make: *** [logo] Error 127
OK, that's "just a detour" because I'm really after mpmath, not html,
and I was able to ask Ubuntu what package I needed to get installed.
However, this would add to the problems a new dev would have to
overcome; maybe it's a good idea to list rsvg-convert among the required
installs in the documentation building docs.
The same goes for convert (from imagemagick).
I'm giving up at sphinx-build since it does not have a Debian package.
I suppose I can easily install it via a Python installer, a newbie might
not know that.
So... no local docs, skipping that section. (Also, getting a bit
frustrated.)
(Taking off my newbie hat, I also didn't want to pursue that detour
further. Maybe somebody else has more interest in getting the docs
building instructions back on track.)
* Now the "Usage" part of "Documentation and Usage"
It says I should just start python and run a few import statements.
... aaand I'm getting this:
$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from sympy import Symbol, cos
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "sympy/__init__.py", line 37, in <module>
from .core import *
File "sympy/core/__init__.py", line 8, in <module>
from .expr import Expr, AtomicExpr
File "sympy/core/expr.py", line 7, in <module>
from .evalf import EvalfMixin, pure_complex
File "sympy/core/evalf.py", line 9, in <module>
import mpmath.libmp as libmp
ImportError: No module named mpmath.libmp
So okay, I bet the instructions are elsewhere, but somebody who just
walks down the README.rst is hosed.
As expectation had it, bin/isympy would fail with exactly the same error.
* Oh, *now* there's an "Installation" section!
* python setup.py install
Which gives me this:
running install
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied:
'/usr/local/lib/python2.7/dist-packages/test-easy-install-15567.write-test'
There's a long explanation and a link... but it does not explain what to
do with a "permission denied" situation. Luckily, I know that virtualenv
helps (but it's still a pain because virtualenv is a pain for me,
somehow I'm not finding a good way to set up shortcuts so I'm still
forced to type a whole lot of incantations in each new shell window just
to get into the virtualenv).
Still. I'm not after almost 100 lines of writeup, with several problems
along the way.
Sergey said "it's easy" and "you should do your reading". Well, I did
and it still isn't, it took me more than an hour to try all these things.
Compared to the way before the unbundling, it's a big step backwards. I
could simply download git repo, start bin/isympy or bin/test, and it all
worked out of the box; now I have an odysseus tour through various
procedures and problems (the writeup now nearing the 100-line mark), I
have to know virtualenv, I have to organize my shortcuts, before I can
start hacking... Sergey, this wasn't the finest thing to do,
particularly for a change that never had a clear motive (except making
life easier for packagers - heck no, sympy was standalone and worked
well with that, and if somebody really ran into a library conflict,
then, well, the conflict wouldn't go away by unbundling anyway, so what
was the point???)
Yeah, sorry for the rant.
I'm not saying that unbundling libraries was misguided.
But I'm really questioning the wisdom of unbundling the most critical
library first. We should have done this with some other dependency.
pep8.py comes to mind - it's not needed for running SymPy, and the tests
that it is useful for are entirely optional, so that would have been a
good testbed for trying out packaging and stuff.
Ah well. Dropped eggs and all that.
Fair warning: Given the way Sergey tried to talk me out of predicting
exactly this kind of problem, and being somewhat down the nose about it
as well, I'm having a very, very short fuse about this all.
Regards,
Jo