jpivarski / svgfig

Automatically exported from code.google.com/p/svgfig
BSD 3-Clause "New" or "Revised" License
12 stars 10 forks source link

Compiler dependency for installing svgfig v2 #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
As of v2, svgfig depends on a C compiler for installation, due to _viewer
and _curve modules. _curve is needed for Curve, Curve is needed for [XY]Axis.

I am looking at svgfig from the perspective of a MoinMoin wiki developer.
We currently use gdchart (v1) to draw some statistics charts.
gdchart v1 is old and has some problems, some linux distributions already
removed it, so we need something new. gdchart v2 doesn't look very healthy
either, so we are looking for alternatives.
Best for us is stuff that is either widely available for many platforms or
stuff that is tiny enough so we can just bundle it with MoinMoin.
As we don't require a C compiler for moin installation, we don't want it
for stuff we bundle either, of course. No big issue on Linux, but Windows
users usually don't have a compiler installed (and we don't want to
distribute compiled stuff either).

Back to svgfig:

_viewer is something we likely won't need, so no big issue with that.

_curve first looked like something we don't need either, but then I saw
that [XY]Axis inherits from Curve and Curve needs _curve, so this IS a
problem as we need Axes.

svgfig v1 seems to not have this problem.

So the question is:
Could one have a fallback python implementation of _curve?
Could one have a easier [XY]Axis not needing Curve?
Same for _viewer?

Original issue reported on code.google.com by Thomas.J...@gmail.com on 30 Nov 2008 at 12:31

GoogleCodeExporter commented 9 years ago
https://code.google.com/p/svgfig/wiki/Version2Announcement seems like it might 
be in error when it says you can use "from svgfig.interactive import *" even if 
_curve didn't compile. I don't know if I should make a separate Issue of this, 
it seems related to this one.

my evidence to back up this claim:
Python 2.7.5+ (default, Feb 27 2014, 19:37:08) 
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import svgfig
>>> exit()
[...]:~/src/py/svgfig$ python test.py
Traceback (most recent call last):
  File "test.py", line 4, in <module>
    from svgfig.interactive import *
  File "/home/[...]/src/py/svgfig/svgfig/interactive.py", line 1, in <module>
    import curve, defaults, glyphs, pathdata, plot, svg, trans
  File "/home/[...]/src/py/svgfig/svgfig/curve.py", line 2, in <module>
    import defaults, svg, trans, pathdata, glyphs, _curve
ImportError: No module named _curve

Original comment by macgini...@gmail.com on 12 Mar 2014 at 5:51