At 07:43 AM 7/15/2009 -0700, Peter Bengtsson wrote:
Crap!
That didn't work either!
IOError: [Errno 20] Not a directory: '/home/peterbe/virtualenvs/
djangopeoplenet/lib/python2.5/site-packages/premailer-1.2-py2.5.egg/
premailer/version.txt'
This must be because of some egg magic that I don't understand.
What I did was this (in premailer.py):
__version__ = open(os.path.join(os.path.dirname(__file__),
'version.txt')
).read().strip()
from pkg_resources import resource_string
__version__ = resource_string(__name__, 'version.txt').strip()
Make sure that you either list 'version.txt' in your setup()
data_files or else use include_package_data=True and a revision
control system that includes the version.txt file, or else the
version.txt won't be included in your sdists and eggs.
_______________________________________________
Distutils-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig