[Distutils] stdeb-0.3 error

Gerry Reno greno at verizon.net
Fri Sep 18 05:45:04 CEST 2009


sudo easy_install stdeb  # brought in stdeb 0.3

$ cd myappdir # where my setup.py is located

$# following http://github.com/astraw/stdeb/  quickstart 1

$ python -c "import stdeb; execfile('setup.py')" sdist_dsc && \
 >   cd `find deb_dist -mindepth 1 -maxdepth 1 -type d` && \
 >   dpkg-buildpackage -rfakeroot -uc -us && \
 >   cd ../.. &&
 >   echo ".deb created successfully in deb_dist/"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "setup.py", line 41, in <module>
    
sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)), 
"bin"))
NameError: name '__file__' is not defined


=========================================================

The error is coming from the setup.py line:

import imp
import sys
import os
import glob

from distutils.core import setup, Command
from distutils.command.install import install

if os.name == 'nt':
    import py2exe

sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)), 
"bin"))

===========================================================

I do not get this error when I run setup.py normally for other commands 
like 'sdist'.

How can I fix this?


Regards,
Gerry






More information about the Distutils-SIG mailing list