pablorecio / Cobaya

Set of scripts used to synchronize Hamster (gnome time track app) with other systems
GNU General Public License v3.0
6 stars 2 forks source link

Error when running setup.py bdist_egg #3

Closed erny closed 13 years ago

erny commented 13 years ago

The error is: NameError Traceback (most recent call last)

/home/erevilla/proyectos/Cobaya/setup.py in <module>()
     31     long_description=(
     32         read('README')
---> 33         + '\n\n' +
     34         read('CHANGES')
     35         ),

/home/erevilla/proyectos/Cobaya/setup.py in read(*rnames)
     21 
     22 def read(*rnames):
---> 23     return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
     24 
     25 setup(

NameError: global name '__file__' is not defined

You can't use file in setup.py, only in imported files, as setup.py is the main file.

erny commented 13 years ago

This happens as of 0.7 (4f15f6bfd2dd62b8a8a64fa348cfa5a6f6891b91), under python 2.6.6 / Ubuntu / amd64.

pablorecio commented 13 years ago

It works fine for me, but due that README and CHANGES file are empty I make a little workaround and now should work fine (70b107dea5f31f51e7b6738da3c2a1df5b9f3f20)

erny commented 13 years ago

Works for me now. Thanx!