eudicots / Cactus

Static site generator for designers. Uses Python and Django templates.
BSD 3-Clause "New" or "Revised" License
3.46k stars 314 forks source link

Error when installing Cactus from pip with Python 3.4 #215

Closed foxmask closed 8 years ago

foxmask commented 8 years ago

here is the error when I do pip install cactus from a virtualenv made with pyvenv-3.4

foxmask@localhost:~/venv $ pyvenv-3.4 smcomm
foxmask@localhost:~/venv $ cd $_
foxmask@localhost:~/venv/smcomm $ source bin/activate
(smcomm) foxmask@localhost:~/venv/smcomm $ pip install cactus
Downloading/unpacking cactus
  Downloading Cactus-3.3.2-py2.py3-none-any.whl (320kB): 320kB downloaded
Downloading/unpacking colorama (from cactus)
  Downloading colorama-0.3.3.tar.gz
  Running setup.py (path:/tmp/pip-build-5rob2map/colorama/setup.py) egg_info for package colorama

Downloading/unpacking argparse (from cactus)
  Downloading argparse-1.4.0-py2.py3-none-any.whl
Downloading/unpacking keyring (from cactus)
  Downloading keyring-5.6.tar.gz (69kB): 69kB downloaded
  Running setup.py (path:/tmp/pip-build-5rob2map/keyring/setup.py) egg_info for package keyring

    Installed /tmp/pip-build-5rob2map/keyring/setuptools_scm-1.9.0-py3.4.egg
    your setuptools is too old (<12)
    setuptools_scm functionality is degraded

Downloading/unpacking tornado>=3.2 (from cactus)
  Downloading tornado-4.3.tar.gz (450kB): 450kB downloaded
  Running setup.py (path:/tmp/pip-build-5rob2map/tornado/setup.py) egg_info for package tornado

    no previously-included directories found matching 'docs/build'
    warning: no files found matching 'tornado/test/README'
Downloading/unpacking colorlog (from cactus)
  Downloading colorlog-2.6.0-py2.py3-none-any.whl
Downloading/unpacking boto>=2.4.1 (from cactus)
  Downloading boto-2.38.0-py2.py3-none-any.whl (1.3MB): 1.3MB downloaded
Downloading/unpacking django-markwhat>=1.4,<2 (from cactus)
  Downloading django-markwhat-1.4.tar.gz
  Running setup.py (path:/tmp/pip-build-5rob2map/django-markwhat/setup.py) egg_info for package django-markwhat

Downloading/unpacking Django>=1.6,<1.7 (from cactus)
  Downloading Django-1.6.11-py2.py3-none-any.whl (6.7MB): 6.7MB downloaded
Downloading/unpacking six>=1.9.0 (from cactus)
  Downloading six-1.10.0-py2.py3-none-any.whl
Downloading/unpacking markdown2 (from cactus)
  Downloading markdown2-2.3.0.zip (145kB): 145kB downloaded
  Running setup.py (path:/tmp/pip-build-5rob2map/markdown2/setup.py) egg_info for package markdown2

Downloading/unpacking backports-abc>=0.4 (from tornado>=3.2->cactus)
  Downloading backports_abc-0.4-py2.py3-none-any.whl
Installing collected packages: cactus, colorama, argparse, keyring, tornado, colorlog, boto, django-markwhat, Django, six, markdown2, backports-abc
*** Error compiling '/tmp/pip-build-5rob2map/cactus/cactus/skeleton/plugins/haml.disabled.py'...
  File "/tmp/pip-build-5rob2map/cactus/cactus/skeleton/plugins/haml.disabled.py", line 42
    print path
         ^
SyntaxError: Missing parentheses in call to 'print'

*** Error compiling '/tmp/pip-build-5rob2map/cactus/cactus/tests/data/skeleton/plugins/haml.disabled.py'...
  File "/tmp/pip-build-5rob2map/cactus/cactus/tests/data/skeleton/plugins/haml.disabled.py", line 42
    print path
         ^
SyntaxError: Missing parentheses in call to 'print'

  Running setup.py install for colorama

  Running setup.py install for keyring
    your setuptools is too old (<12)
    setuptools_scm functionality is degraded

    Installing keyring script to /home/foxmask/venv/smcomm/bin
  Running setup.py install for tornado
    building 'tornado.speedups' extension
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/home/foxmask/venv/smcomm/include -I/usr/include/python3.4m -c tornado/speedups.c -o build/temp.linux-x86_64-3.4/tornado/speedups.o
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.4/tornado/speedups.o -o build/lib.linux-x86_64-3.4/tornado/speedups.cpython-34m.so

    no previously-included directories found matching 'docs/build'
    warning: no files found matching 'tornado/test/README'
  Running setup.py install for django-markwhat

  Running setup.py install for markdown2
    changing mode of build/scripts-3.4/markdown2 from 644 to 755

    changing mode of /home/foxmask/venv/smcomm/bin/markdown2 to 755
Successfully installed cactus colorama argparse keyring tornado colorlog boto django-markwhat Django six markdown2 backports-abc
Cleaning up...
krallin commented 8 years ago

Can you please post the full output: from the line where you created the virtualenv down to where your shell resumed control after installing Cactus?

Thanks!

foxmask commented 8 years ago

I updated the original post

krallin commented 8 years ago

@foxmask:

`Successfully installed cactus colorama argparse keyring tornado colorlog boto django-markwhat Django six markdown2 backports-abc``

The error you're seeing is a warning. It's not an error. Try running cactus, it should work just fine.

Cheers,

foxmask commented 8 years ago

so you ignore the line 42 in the plugin file haml.disabled.py ?

krallin commented 8 years ago

@foxmask

If you do try using the haml plugin, then that will not work. You'll get a syntax error and a crah.

However, unless you enable that plugin, that file is never going to be run, so the fact that it doesn't work under Python 3 isn't going to be a problem.

The reason why you're seeing an error is because pip attempted to compile all the py files it found when it installed Cactus, and that one failed because that one doesn't work in Python 3.

But in practice, you're probably not using the haml plugin, so you don't need to care.

Cheers,