-
Notifications
You must be signed in to change notification settings - Fork 4
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
WIP Shiny packages updates (CentOS6 conda 4.7 so far) #230
Conversation
@@ -1 +1 @@ | |||
pip install --no-deps --verbose --no-binary :all: --no-index --egg . | |||
python setup.py install --old-and-unmanageable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume we could also just set a standard build in a environment variable.
I had imagined following the lead of #227 with simply: |
Sure, it was just easier to batch update the build.sh files for a first go, and as far as I could tell there were a few different common 'python setup.py install' idioms to speed it up for conda use. |
pkg_defs/Ska.arc5gl/meta.yaml
Outdated
@@ -18,7 +18,6 @@ requirements: | |||
# Packages required to build the package. python and numpy must be | |||
# listed explicitly if they are required. | |||
build: | |||
- pip <10.0 | |||
- python | |||
- setuptools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you are at it I propose to move all the explicit setuptools
dependencies. Yes, they are a dependence, but this is always provided by python
so this is superfluous. There are a number of other packages also provided by conda python
without which everything will break, but we don't explicitly specify those.
@@ -41,7 +40,7 @@ requirements: | |||
- ska.engarchive | |||
- mica | |||
- testr | |||
- llvmlite ==0.18.0 | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra blank line.
@@ -30,7 +30,7 @@ requirements: | |||
- configobj | |||
- requests | |||
- tables3_api | |||
- django <2.0 | |||
- django |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Letting django
float (to 2.2) requires sot/kadi#143 and a re-build of events.db3
. I think we can and should go in that direction, but commenting that I believe this won't work out of the box.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the modern django was actually a requirement for modern dependencies to work, so I was building kadi out of that branch to start.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if any of the rest of our OTS stack depends on django, but who knows. In any case I'm not arguing against the latest django, just giving a heads-up that it will break kadi hard without a database migration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it's worse than just the database, IIRC there are changes that won't allow kadi to import.
pkg_defs/annie/build.sh
Outdated
@@ -1,2 +1,2 @@ | |||
export SKA=/dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we instead just ensure that the SKA
is set in ska_builder.py
i.e. if currently undefined then set to /proj/sot/ska
. Currently cheta
is strict and won't import without finding an archive, while mica
will import as long as SKA
is defined to something. This is somewhat a philosophical discussion about whether a package should import if it does not have the data to actually function, and perhaps situations like this show the way (contrary to my past thoughts).
The right answer from the packaging perspective is moving to single-source version so setup.py
can run without importing the package, but in the meantime I think we can clean up these recipes assuming integration with ska_builder.py
(which is already the case with the SKA_TOP_SRC_DIR
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was a little concerned, since our default build will likely be on a Linux machine that will see the real /proj/sot/ska and run as the aca user, that giving any more recipes access to /proj/sot/ska increased risk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough to not change the ska_builder.py script right now, instead just use script env SKA=whatever python setup.py install
.
Nope, that won't work on Windows. So back to setting SKA
to something in ska_builder.py. Honestly I'm not that concerned about python setup.py install
ever writing to something in SKA if it exists. What happens there is importing various packages (primarily to get the version), and I always consider it safe to import any Ska package as aca
. If the act of importing a package can corrupt our flight database then we have bigger problems.
Did you have some specific failure path in mind that I'm missing?
Nevertheless we can be super careful just the same in ska_builder.py by making a temp dir, point SKA at that, and then make a dir SKA/eng_archive/data. That will satisfy cheta and mica to get them to import.
Indeed changing to use Is this |
@@ -23,7 +23,6 @@ requirements: | |||
- chandra_aca | |||
- mica | |||
- testr | |||
- llvmlite ==0.18.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
@@ -17,10 +15,12 @@ requirements: | |||
# Packages required to build the package. python and numpy must be | |||
# listed explicitly if they are required. | |||
build: | |||
- {{ compiler("cxx") }} # [ unix ] | |||
host: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though now that I've fiddled with this some more, it will need Windows testing.
What I am looking for is a link or comment (documented in the recipe), which communicates why you think these are the right and necessary options. That will help me today and possibly your future self in 5 years. |
Gotcha. Sounds good. Still fiddling with the new compile directive. |
pkg_defs/ska3-template/build.sh
Outdated
@@ -1,5 +1,6 @@ | |||
#!/bin/bash | |||
|
|||
mkdir ${PREFIX}/bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be mkdir -p
on unix. Do we need ska3-template or a skare launcher on windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not to my knowledge. If we find a need then we'll address it.
With regards to the -p
, hasn't this been working? Don't we assume from the build process that ${PREFIX}
must exist already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "mkdir" fix is here because this recipe wasn't working for me on conda 4.7 . ${PREFIX} appeared to exist, but 'bin' did not in that case I think. I was just thinking "-p" might be more future-proof but probably don't have to worry about that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am just worried that mkdir -p
can make any arbitrarily path and do unexpected things. If $PREFIX
exists then mkdir $PREFIX/bin
should never fail, no?
I'll pull out the change to ska_builder.py into a new PR . |
Recipe changes to start to build modern packages with conda 4.7.
This was just building and testing on CentOS6 .