Skip to content

easybuild is a namespace package (2nd attempt) (REVIEW)#1593

Merged
boegel merged 13 commits intoeasybuilders:developfrom
boegel:easybuild_namespace
Mar 10, 2016
Merged

easybuild is a namespace package (2nd attempt) (REVIEW)#1593
boegel merged 13 commits intoeasybuilders:developfrom
boegel:easybuild_namespace

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Feb 6, 2016

another attempt at #1591 (after that was reverted in #1592)

PR tester has been enhanced, and should now see the problem reported in #1592 that warranted a rollback of #1591...

documentation on namespace packages is available at https://pythonhosted.org/setuptools/pkg_resources.html#namespace-package-support

@boegel boegel added this to the v2.7.0 milestone Feb 6, 2016
@boegel boegel changed the title easybuild is a namespace package easybuild is a namespace package (2nd attempt) Feb 6, 2016
@hpcugentbot
Copy link
Copy Markdown

EasyBuild framework unit test suite FAILed.

See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2630/console for more details.

Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link
Copy Markdown

EasyBuild framework unit test suite FAILed.

See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2631/console for more details.

Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link
Copy Markdown

EasyBuild framework unit test suite FAILed.

See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2632/console for more details.

Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do.

@boegel boegel changed the title easybuild is a namespace package (2nd attempt) easybuild is a namespace package (2nd attempt) [WIP] Feb 7, 2016
@boegel boegel force-pushed the easybuild_namespace branch from 9cf9762 to df2fa05 Compare February 7, 2016 09:51
@hpcugentbot
Copy link
Copy Markdown

EasyBuild framework unit test suite FAILed.

See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2633/console for more details.

Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link
Copy Markdown

EasyBuild framework unit test suite FAILed.

See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2634/console for more details.

Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link
Copy Markdown

EasyBuild framework unit test suite FAILed.

See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2635/console for more details.

Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do.

@wpoely86
Copy link
Copy Markdown
Member

wpoely86 commented Feb 8, 2016

I don't understand all the dark magic involved but it looks fine? At least, when jenkins agrees.

@hpcugentbot
Copy link
Copy Markdown

EasyBuild framework unit test suite FAILed.

See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2646/console for more details.

Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link
Copy Markdown

EasyBuild framework unit test suite FAILed.

See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2650/console for more details.

Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do.

@boegel boegel changed the title easybuild is a namespace package (2nd attempt) [WIP] easybuild is a namespace package (2nd attempt) (REVIEW) Feb 9, 2016
@hpcugentbot
Copy link
Copy Markdown

EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2651/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Feb 9, 2016

@wpoely86: please re-review?

"""Test getting gcc version."""
gcc_version = get_gcc_version()
self.assertTrue(isinstance(gcc_version, basestring) or gcc_version == UNKNOWN)
self.assertTrue(isinstance(gcc_version, basestring) or gcc_version == UNKNOWN or gcc_version is None)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when is it None? Should be UNKNOWN in that case no?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no (real) GCC on OS X, then it's None (see also the tests below).

If gcc --version fails to run (exit code != 0), it's set to unknown.

@hpcugentbot
Copy link
Copy Markdown

EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2703/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link
Copy Markdown

EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2797/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

Comment thread setup.py Outdated
zip_safe=False,
install_requires=["vsc-base >= 2.2.6"],
install_requires=[
'setuptools',
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should specify a minimal version

cfr. hpcugent/vsc-install#31

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the minimal required version is quite old, basically all we need is pkg_resources.declare_namespace and pkg_resources.fixup_namespace_packages; both are available in 0.6:

-bash-4.1$ python -c "import setuptools; print setuptools.__version__; from pkg_resources import declare_namespace, fixup_namespace_packages"
0.6
-bash-4.1$ 

@hpcugentbot
Copy link
Copy Markdown

EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2834/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link
Copy Markdown

EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2852/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Mar 10, 2016

Going in, thanks for the feedback @wpoely86!

boegel added a commit that referenced this pull request Mar 10, 2016
easybuild is a namespace package (2nd attempt) (REVIEW)
@boegel boegel merged commit 5c7ac16 into easybuilders:develop Mar 10, 2016
@boegel boegel deleted the easybuild_namespace branch March 10, 2016 10:49

# extend path so Python knows this is not the only place to look for modules in this package
__path__ = extend_path(__path__, __name__)
pkg_resources.declare_namespace(__name__)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be __path__? #1677

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe not, I don't really understand what's going on here

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's a bit of black magic.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, __name__ is correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants