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

install py or src not both; no silent installdir fallback #163

Merged
merged 6 commits into from
Feb 12, 2021

Conversation

sbailey
Copy link
Contributor

@sbailey sbailey commented Feb 11, 2021

Our two hybrid python/C++ packages (fiberassign and specex) have now converted to using python setup.py install for installations, including compiling the C++ code. This was creating a fake-failure problem for desiInstall which was noticing the src/ directory and trying to run a non-existent Makefile. This PR updates the installation code to use build type "py" OR "make" OR "src" but not "py" AND "src". I left the "make" and "src" logic in place even though we don't have any packages using them now, but if the setup.py file is found it uses that and then moves on.

This also fixes a bug where if the desiInstall --root ...directory didn't exist at NERSC, the code was silently falling back to the default NERSC install location instead of warning the user that their requested installation location doesn't exist and stop.

With current master:

[cori12 temp] desiInstall -r $SCRATCH/desi/temp fiberassign 2.1.1
CRITICAL:install.py:866:install:2021-02-11T15:15:02: Error during compile: make: *** src: No such file or directory.  Stop.

That produces a useable installation, albeit without the permissions fully corrected.

With this branch there are no errors, fully successful install.

@sbailey sbailey added this to In progress in Cascades / 21.2 via automation Feb 11, 2021
@coveralls
Copy link

coveralls commented Feb 11, 2021

Coverage Status

Coverage remained the same at 67.893% when pulling a8c2d69 on install_no_src into 80714f7 on master.

@weaverba137
Copy link
Member

I think this is fine at first glance, but there is also the desiInstall.rst documentation that will need to be changed. Could you do that?

@weaverba137
Copy link
Member

Even though these are vestigial, is the remaining logic "make" XOR "src"? That is, all possible build types are mutually exclusive?

@sbailey
Copy link
Contributor Author

sbailey commented Feb 11, 2021

My intension was to make all build types exclusive (make and src already were, but previously they could be combined with py). I'll update docs.

@weaverba137
Copy link
Member

Good, thank you. I'll do a formal review soon, but it might have to wait until tomorrow morning.

weaverba137
weaverba137 previously approved these changes Feb 12, 2021
Copy link
Member

@weaverba137 weaverba137 left a comment

Choose a reason for hiding this comment

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

I found a few minor issues to discuss.

doc/desiInstall.rst Outdated Show resolved Hide resolved
doc/desiInstall.rst Outdated Show resolved Hide resolved
py/desiutil/install.py Outdated Show resolved Hide resolved
py/desiutil/install.py Outdated Show resolved Hide resolved
py/desiutil/test/test_install.py Show resolved Hide resolved
@weaverba137 weaverba137 dismissed their stale review February 12, 2021 01:19

I accidentally hit the "approve" button. I should have hit "Request changes"

Copy link
Member

@weaverba137 weaverba137 left a comment

Choose a reason for hiding this comment

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

Please see my other review. This is just to ensure that a "Request changes" result is returned.

@sbailey
Copy link
Contributor Author

sbailey commented Feb 12, 2021

@weaverba137 thanks for the comments / suggestions. I think I have addressed all of them. Please re-review.

@weaverba137
Copy link
Member

OK to merge now. I need to do an overhaul of the desiutil testing infrastructure anyway but I will punt that to a separate issue. I can create a tag after merge if you're ready for that.

@sbailey
Copy link
Contributor Author

sbailey commented Feb 12, 2021

Thanks, merging now. I may have another PR or two for desiutil today prior to a tag for 21.2 / Cascades, so no tag yet.

@sbailey sbailey merged commit 9581e6e into master Feb 12, 2021
Cascades / 21.2 automation moved this from In progress to Done Feb 12, 2021
@sbailey sbailey deleted the install_no_src branch February 12, 2021 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants