Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features/importable #723

Closed
wants to merge 2 commits into from
Closed

Conversation

brettviren
Copy link
Member

This lets spack.* modules be importable into a bare Python. The lib/spack/spack/tests/importing.sh will run through all modules to test they can be imported without error. For in-source testing, PYTHONPATH must add lib/spack.

This also moves the backport and override modules to be under spack.util.

Note, this does not address the location variables in spack/__init__.py.


cd $topdir

for mod in $(ls lib/spack/spack/*/__init__.py|awk -F/ '{print $4}')
Copy link
Contributor

Choose a reason for hiding this comment

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

Ick. Parsing ls. How about:

for mod in lib/spack/spack/*/; do
    [ -r "$mod/__init__.py" ] && \
        python -c "import spack.$mod"
done

Copy link
Contributor

Choose a reason for hiding this comment

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

Oops. Should use basename.

@brettviren brettviren mentioned this pull request May 9, 2016
@adamjstewart
Copy link
Member

Is this PR still active?

@brettviren
Copy link
Member Author

Not on my end.

@adamjstewart
Copy link
Member

Like do you still want this to be merged? If so it needs to be rebased. What is the use case for being able to import each of these files?

@brettviren
Copy link
Member Author

Like do you still want this to be merged?

4 months ago I did. Right now, I don't intend to pursue it.

What is the use case for being able to import each of these files?

Maybe you want to subscribe to the mailing list. This topic has come up several times and most recently about a week ago.

@adamjstewart
Copy link
Member

The Google Group has a lot of topics. If there are some in particular that this issue addresses, you may want to link to them in your PR.

If you want this PR to be merged, it needs to be rebased. If you don't want it to be merged anymore, it should probably be closed. Just trying to clean up and merge old PRs that have been left behind 😃

@brettviren brettviren closed this Aug 12, 2016
matz-e pushed a commit to matz-e/spack that referenced this pull request Apr 27, 2020
* Bumped py-bluepy==0.14.6  and py-bluepy-configfile==0.1.11
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.

3 participants