Complete output from command python setup.py egg_info:
Please put "# distutils: language=c++" in your .pyx or .pxd file(s)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/k8/nj0z1bkd11dcs1v5hbh_tknc92p43w/T/pip-build-41Ncor/snappy/setup.py", line 435, in <module>
new = max(os.path.getmtime(file) for file in glob('cython/core/*.pyx'))
ValueError: max() arg is an empty sequence
I had a similar issue. The fix was
- to install mercurial on your distro or with:
sage -pip install mercurial
building 'mercurial.cext.osutil' extension
gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -Imercurial -I/Users/karl.crisman/Downloads/sage/local/include/python2.7 -c mercurial/cext/osutil.c -o build/temp.macosx-10.9-x86_64-2.7/mercurial/cext/osutil.o -DHAVE_BSD_STATFS
In file included from /System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h:18:0,
from /System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9,
from /System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11,
from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:35,
from mercurial/cext/osutil.c:1320:
/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFont.h:53:40: error: initializer element is not constant
static const CGFontIndex kCGGlyphMax = kCGFontIndexMax;
^~~~~~~~~~~~~~~
error: command 'gcc' failed with exit status 1
You are using pip version 9.0.3, however version 18.0 is available.
On 2018-10-02 16:50, kcrisman wrote:
> Thanks, Thierry. Sounds like we need a ticket for this.
I assume you mean a Snappy ticket since the problem with Snappy is
completely unrelated to Sage.
One can also get the "Computational topology Sage Docker image":https://hub.docker.com/r/computop/sage/It ships among other things:- SageMath- SnapPy- Regina- PHCpack
It's bad packaging by upstream: it's running Cython but the Cython
source files are not in the snappy source tarball.
On Tue, Oct 2, 2018 at 4:44 PM Nathan Dunfield <nat...@dunfield.info> wrote:
>>
>> It's bad packaging by upstream: it's running Cython but the Cython
>> source files are not in the snappy source tarball.
>
>
> Yes, we ship the Cython generated C/C++ files rather than Cython code itself. My understanding from the Cython docs is that this is the recommended approach for non-Sage packages, and we have always done this.
Really? Could you point out the place in the docs that recommends this?
Letting Cython to do necessary adjustments for the target C/C++
compiler seems like the most natural thing to do...
Thanks, Thierry. Sounds like we need a ticket for this. In particular, I wasn't even able to get sage -pip install mercurial to work on OS X.
> The idea is that cython produces fully compliant C code, so that no tuning
> of the generated C code is required. Distributing the cythonized c-files
> has the advantage that the installing user does not need cython installed.
> In sage we have run into trouble with that due to API incompatibilities
> between Py2 and Py3, and it doesn't seem possible to specify the right
> conditionals in the cython file to produce an appropriate c file with the
> right conditional pieces of code in.
As far as I remember, snappy deals with that by providing file.py2.c and
file.py3.c. Nathan could infirm/confirm.
This is a known bug and we are working on it (there's even a ticket). It should be fixed soon. It's some issue with our configuration script.