pinard/Pymacs

pppp does not appear to be working

Opened this issue · 3 comments

So I'm trying to get freex working with Emacs 24. When I run it I get this error: Pymacs helper did not start within 30 seconds and in the *Pymacs* buffer I see:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/Elliot/.emacs.d/el-get/pymacs/Pymacs.py", line 40, in <module>
    if PYTHON3:
NameError: name 'PYTHON3' is not defined

Process pymacs exited abnormally with code 1

This seems to be because pppp is not substituting the preprocessor symbols with any value. I tried running make -k prepare but didn't see any suspicious output. Any idea of what is happening?

My setup is: Windows 8, Cygwin Emacs24 & Cygwin Python.

On Sat, Mar 1, 2014 at 11:11 PM, Elliot Bulmer notifications@github.comwrote:

if PYTHON3:

NameError: name 'PYTHON3' is not defined

Hi, Elliot. You are sure you installed the .py file, and not the
.py.infile? As you diagnosed that pppp might not be working, I would
guess you
understand how it is meant to work and did not make that error. Sigh!

This seems to be because pppp is not substituting the preprocessor symbols
with any value. I tried running make -k prepare but didn't see any
suspicious output. Any idea of what is happening?

How strange. I did not touch pppp in quite a long time.

Are your starting from a (not too old) GitHub copy? I heard that some
people package Pymacs while being much more interested in pushing for their
packaging tool of the day, than in Pymacs itself, do not much understand
what they do, and goof. I got a few reports from people using some
packaged Pymacs, and so far, the problem always has been in the packaging
or related installation.

My setup is: Windows 8, Cygwin Emacs24 & Python.

Out of despair, you might patch the installed Pymacs.py file and add an
explicit "PYTHON3 = False" (if this is appropriate). pppp was designed so
this should be possible. However, beware @symbol@ substitutions in the
source file, which are not valid Python. I would not think
Pymacs.py.inhas many of those, if any.

Of course, if you get more information about the pppp problem, please tell
me!

François (not fully available however, surgery planned in two days).

François Pinard http://pinard.progiciels-bpi.ca

Hi @pinard,

Cheers for your quick reply. I am definitely loading the pymacs.py file produced by the make step. I installed pymacs using el-get. This is the recipe:

(:name pymacs
       :description "Interface between Emacs Lisp and Python"
       :type github
       :pkgname "pinard/Pymacs"
       :prepare
       (progn
         ;; do PYTHONPATH=~/.emacs.d/el-get/pymacs/:$PYTHONPATH
         (el-get-envpath-prepend "PYTHONPATH" default-directory)
         (autoload 'pymacs-load "pymacs" nil t)
         (autoload 'pymacs-eval "pymacs" nil t)
         (autoload 'pymacs-exec "pymacs" nil t)
         (autoload 'pymacs-call "pymacs")
         (autoload 'pymacs-apply "pymacs"))
       :build ("make"))

I'm pretty sure this is fetching pymacs straight from the github repo, setting up some autoloads and running make. The HEAD of the package directory is 352ed4f. I'll try running pppp manually with the -v option and see what output I get.

The -v option didn't quite do what I thought it would. But I did try manually defining the variables at the top of pymacs.py as you suggested and that seems to have fixed the problem.