|
From: John H. <jdh...@ac...> - 2004-09-20 15:30:49
|
Many new users have been bitten by trying to run matplotlib from the matplotlib src dir, only to get an inscrutable error about not being able to find some extension code, as described in this FAQ http://matplotlib.sourceforge.net/faq.html#WRONGDIR. Recently, I've added pytz and dateutil for improved timezone and date ticking to the src distro. I want to conditionally install these packages with matplotlib, only if the user hasn't installed them already. So in setup.py, I do for example try: import dateutil except ImportError: packages.append('dateutil') But I was bitten by the same bug. Because dateutil was in the matplotlib root dir, it was imported successfully and not installed. My proposal is to move all the python library code into a lib subdir, which currently would look like lib\matplotlib lib\pytz lib\dateutil and use package_dir = {'': 'lib'} in setup.py, which would fix both problems. Of course, I'll have to submit an admin request to sourceforge just to get the old dirs purged. Sure would be nice if CVS supported basic rename and delete operations on directories. Comments, suggestions, objections... JDH |