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

Initial copy of key parts of skare/py3 #13

Merged
merged 1 commit into from
Jul 3, 2018
Merged

Conversation

taldcroft
Copy link
Member

This is not functional, but will add these bits in original form to make a basis for subsequent changes.

@taldcroft taldcroft merged commit 4b56aa2 into master Jul 3, 2018
@taldcroft taldcroft deleted the skare-classic branch July 3, 2018 00:31
@taldcroft taldcroft mentioned this pull request Jul 3, 2018
@jeanconn
Copy link
Contributor

jeanconn commented Jul 3, 2018

I assume this will need a flt_envs from somewhere, probably sot/skare#168

@jeanconn
Copy link
Contributor

jeanconn commented Jul 3, 2018

(if we keep arch and need the scripts etc)

@taldcroft
Copy link
Member Author

Yes, the Python flt_envs will be needed, but hopefully installed via conda package.

@jeanconn
Copy link
Contributor

jeanconn commented Jul 3, 2018

I thought you didn't want me to make conda packages that installed outside the conda root, and this was still going in SKA/bin not SKA_ARCH_OS/bin. Or are you just committing to #14 ?

@jeanconn
Copy link
Contributor

jeanconn commented Jul 3, 2018

It also looks like this is the sysarch version of install.py.

@taldcroft
Copy link
Member Author

Ska3 fltenvs can be simplified:

  • No sybase
  • No arch
  • No PGPLOT (maybe?!?!). A search of perl code files in the SOT org showed no real dependencies. I must be forgetting something.
  • Does conda already put $root/lib into LD_LIBRARY_PATH, so we don't need to?

@taldcroft
Copy link
Member Author

Yes, I want to go down the path of #14 unless a real showstopper turns up.

@jeanconn
Copy link
Contributor

jeanconn commented Jul 3, 2018

That's fine. If we go down #14, I didn't think we'd need flt_envs or the wrapper scripts at all.

Wrt PGPLOT, I thought it was mostly used for cron tasks like astromon that would be a bonus to support with our new environment.

@taldcroft
Copy link
Member Author

If we can drop PGPLOT from Ska3 that would be awesome, almost worthy of a celebration for all the hassle that package has caused over the years. I'm fine letting astromon churn along in Ska2 until something else (system upgrade) breaks it. Then we would be motivated to rewrite in Python.

@taldcroft
Copy link
Member Author

We probably still need a flt_envs because the process of source /proj/sot/ska/bin/ska_envs.sh is so embedded. If nothing else putting Ska3 into the path in a consistent way with legacy is worth it.

@jeanconn
Copy link
Contributor

jeanconn commented Jul 3, 2018

If we keep the wrapper script syou could just set SKA from them and be done (without needing to source flt_envs).

@taldcroft
Copy link
Member Author

I'm not getting you. How to users get (e.g.) /proj/sot/ska3/flight/bin/ipython into their PATH? (Here ipython is the real binary, not a wrapper, assuming #14).

@jeanconn
Copy link
Contributor

jeanconn commented Jul 3, 2018

I don't remember the subtleties of making sure you have a useful absolute path in bash, but I just figured that ska_envs.sh or ska_envs.csh would just set PATH and SKA and not need to call a python script.

#!/bin/sh                                                                       

SKA_bin=`dirname $0`
SKA_bin=`readlink -f SKA_bin`
export PATH=${SKA_bin}:${PATH}
SKA=`dirname ${SKA_bin}`
SKA=`readlink -f ${SKA}`
export SKA=$SKA

@jeanconn
Copy link
Contributor

jeanconn commented Jul 3, 2018

But my demo idea doesn't work, and I've forgotten my rules about dirname (does "source"ing a script work if it calls $0"?). It is certainly fine to also keep a flt_envs if all flt_envs does is something equivalent without needing to figure it out for both csh and bash (you only need one flt_envs and then it works from each shell).

I note had this in the bash flt_envs prototype

Ska_bin="$( cd "$(dirname "$0")" ; pwd -P )"
SKA=${Ska_bin%/bin}

@jeanconn
Copy link
Contributor

jeanconn commented Jul 3, 2018

I guess this works for bash

SKA_bin="$( cd "$(dirname "$BASH_SOURCE")" ; pwd -P )"
export PATH=${SKA_bin}:${PATH}
SKA=${SKA_bin%/bin}
export SKA=$SKA

@taldcroft
Copy link
Member Author

Your original comment confused me because you said only to keep the "wrapper scripts", and I don't count ska_envs.* as wrapper scripts. But in any case for production we still do need all the other stuff in flt_envs. It will certainly get thinner for Ska3, but not so much that it's worth writing/maintaining separate csh and sh versions.

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.

2 participants