easybuilders / easybuild-easyblocks

Collection of easyblocks that implement support for building and installing software with EasyBuild.
https://easybuild.io
GNU General Public License v2.0
106 stars 284 forks source link

Own easyblocks repository broken in 2.7? #909

Closed thiell closed 8 years ago

thiell commented 8 years ago

With EasyBuild 2.7, I am not able to setup a custom easyblocks installation anymore (according to https://github.com/hpcugent/easybuild-wiki/blob/master/Setting-up-your-own-easyblocks-repository.md).

I guess #827 broke things. Indeed commit dc3d2d6140c193c757681bb11b0acd0a84b26e31 changed pkgutil to pkg_resource, but AFAIK pkg_resource is not recommended (http://stackoverflow.com/questions/1675734/how-do-i-create-a-namespace-package-in-python).

I checked PYTHONPATH, MYEBDIR, the presence of __init__.py and python -vv shows that my own easyblocks aren't searched with EasyBuild 2.7 (RHEL 6.7, Python 2.6.6, python-setuptools-0.6.10-3.el6.noarch). Have you seen this problem?

thiell commented 8 years ago

I did a simple test: replaced the 2.7's __init__.py (using pkg_resources) by the one from 2.6 (using pkgutil) and it worked, my own easyblocks are found.

boegel commented 8 years ago

@thiell spot on, but is there any reason you're not using --include-easyblocks? Cfr. http://easybuild.readthedocs.io/en/latest/Including_additional_Python_modules.html#include-easyblocks?

We need to use pkg_resources.declare_namespace because we spread the easybuild namespace across multiple directories, cfr. https://pythonhosted.org/setuptools/setuptools.html#namespace-packages

thiell commented 8 years ago

thanks @boegel for the quick answer! I didn't know the include-easyblocks option!

I just tried in command line and in config file, and that seems to work. I tend to prefer the previous method of having an own easyblocks repository (that I used since EB 2.3), now explicit listing of all easyblocks py file is needed. But well, the option in the config file seems cleaner tho, and I don't have that many easyblocks. :)

ocaisa commented 8 years ago

Just dump them all in one directory and use '--include-easyblocks=/path/to/easyblocks/*.py'

On 8 May 2016 at 23:24, thiell notifications@github.com<mailto:notifications@github.com> wrote:

thanks @boegelhttps://github.com/boegel for the quick answer! I didn't know the include-easyblocks option!

I just tried in command line and in config file, and that seems to work. I tend to prefer the previous method of having an own easyblocks repository (that I used since EB 2.3), now explicit listing of all easyblocks py file is needed. But well, the option in the config file seems cleaner tho, and I don't have that many easyblocks. :)

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHubhttps://github.com/hpcugent/easybuild-easyblocks/issues/909#issuecomment-217747070

Dr. Alan O'Cais E-CAM Software Manager Juelich Supercomputing Centre Forschungszentrum Juelich GmbH 52425 Juelich, Germany

Phone: +49 2461 61 5213 Fax: +49 2461 61 6656 E-mail: a.ocais@fz-juelich.demailto:a.ocais@fz-juelich.de WWW: http://www.fz-juelich.de/ias/jsc/EN



Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,

Prof. Dr. Sebastian M. Schmidt


thiell commented 8 years ago

@ocaisa: great!! I just had to remove an empty __init__.py that was present in my easyblocks repo and after that it seems to work well. Closing issue!

boegel commented 8 years ago

@thiell thanks for the update; the issue with __init__.pys being picked up will be fixed in the next EasyBuild release, cfr. https://github.com/hpcugent/easybuild-framework/pull/1704