|
From: Nadezhda D. <den...@st...> - 2006-01-25 15:51:38
|
Hello,
I somehow missed all the action between matplotlib 0.84 and 0.86.2.
Trying to install v0.86.2 I find data files are not installed correctly
in all cases. Specifically support for '--home=' and '--install-data' is
broken. (We use --install-data for our installations.)
I know this is a very tricky issue (in fact if someone can tell me
how to get this done correctly for bdist_wininst, I'll be very gratefull)
but here's a suggestion which worked for me. I am copying the relevant
part from setup.py and hope someone has a better solution.
Thanks,
Nadia Dencheva
if has_setuptools: # EGG's make it simple
datapath = os.path.curdir
datapath = os.sep.join([datapath, 'matplotlib', 'mpl-data']) # This is where mpl data
will be installed
# logic from distutils.command.install.finalize_options
elif os.name == 'posix':
py_version_short = sys.version[0:3]
#datapath = INSTALL_SCHEMES['unix_prefix']['platlib']
#datapath = datapath.replace('$platbase/', '').replace('$py_version_short',
py_version_short)
#datapath = os.sep.join(['mpl-data']) # This is where mpl data will be installed
args = sys.argv
for a in args:
if a.startswith('--home='):
dir = os.path.abspath(a.split('=')[1])
datapath = os.path.join(dir, 'lib', 'python', 'matplotlib', 'mpl-data')
elif a.startswith('--prefix='):
dir = os.path.abspath(a.split('=')[1])
pythonver = 'python'+py_version_short
datapath = os.path.join(dir, 'lib', pythonver, 'site-packages', 'matplotlib',
'mpl-data')
elif a.startswith('--install-data='):
dir = os.path.abspath(a.split('=')[1])
datapath = os.path.join(dir, 'mpl-data')
else:
pythonlib = distutils.sysconfig.get_python_lib(plat_specific=1)
datapath = os.path.join(pythonlib, 'matplotlib', 'mpl-data')
else:
datapath = INSTALL_SCHEMES[os.name]['platlib'].replace('$base/', '')
datapath = os.sep.join([datapath, 'matplotlib', 'mpl-data']) # This is where mpl data
will be installed
Charlie Moad wrote:
> Alright, I'll give it a shot and let you know.
>
> On 12/7/05, John Hunter <jdh...@ac...> wrote:
>
>>>>>>>"Charlie" == Charlie Moad <cw...@gm...> writes:
>>
>> Charlie> Would it be considered cleaner to embed the mpl data into
>> Charlie> the matplotlib module? This would make it easier to
>> Charlie> clean a mpl install. The data path could be expressed
>> Charlie> fairly easily too, as a one-liner:
>>
>> Charlie> os.sep.join([os.path.split(matplotlib.__file__)[0],
>> Charlie> 'matplotlib-data'])
>>
>>Yes, if you can engineer in a way that works with setup w/ and w/o a
>>--prefix arg it would be preferable, in my view.
>>
>>JDH
>>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
|