Dear Kenneth,

Kenneth Hoste <[email protected]> writes:

> Dear Loris,
>
> On 13/08/2020 15:31, Loris Bennett wrote:
>> Loris Bennett <[email protected]> writes:
>>
>>> Loris Bennett <[email protected]> writes:
>>>
>>>> Hi,
>>>>
>>>> I am trying to write an EC for pyPaSWAS:
>>>>
>>>>    https://github.com/swarris/pyPaSWAS
>>>>
>>>> Under installation it says:
>>>>
>>>>    In most cases it is enough to clone the repository
>>>>
>>>> and there is no 'setup.py'
>>>>
>>>> I tried using 'PythonPacakge' but skipping the install step, but the
>>>> sanity check failed since the following directory
>>>>
>>>>    
>>>> ~/easybuild/software/pyPaSWAS/3.6-fosscuda-2019b-Python-3.7.4/lib/python3.7/site-packages/
>>>>
>>>> is empty.
>>>>
>>>> Can PythonPackage be used in such cases or should I be using 'CmdCp'
>>>> instead?
>>>
>>> If I use 'CmdCp' it seems I just need to unpack the downloaded file via
>>> 'cmds_map':
>>>
>>>    sources = ['v%(version)s.tar.gz']
>>>    cmds_map = [(sources[0], 'tar -zxf %(source)s')]
>>
>> This leads to everything ending up in
>>
>>    ~/easybuild/software/pyPaSWAS/3.6-fosscuda-2019b-Python-3.7.4/
>>
>> whereas looking at a module like 'matplotlib' the path should maybe more like
>>
>>    
>> ~/easybuild/software/pyPaSWAS/3.6-fosscuda-2019b-Python-3.7.4/lib/python3.7/site-packages/
>>
>> How would I create
>>
>>    lib/python%(pyshortver)s/site-packages
>>
>> in my EC and then get tar to extract into there?
>
> The site-packages directory is automatically created by Python installation
> tools like pip or when installing via setup.py (which usually means using
> setuptools).
>
> There's no strict requirement for that directory though.
>
> In your case, I would use the 'Tarball' easyblock (which just unpacks the
> sources and copies it to the installation directory), and update $PYTHONPATH 
> via
> modextrapaths, like so:
>
> modextrapaths = {'PYTHONPATH': ''}
>
> (the value passed is relative to the installation directory, hence '')
>
>
> Do let us know if this helps...

Yes, indeed it did.

Thanks,

Loris

-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin         Email [email protected]

Reply via email to