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

DM-11727: Update miniconda baseline to python3.6 #68

Merged
merged 2 commits into from
Sep 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions scripts/newinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ EUPS_USE_EUPSPKG=${EUPS_USE_EUPSPKG:-true}

# Default to -3 (Python 3)
LSST_PYTHON_VERSION=${LSST_PYTHON_VERSION:-3}
MINICONDA_VERSION=${MINICONDA_VERSION:-4.2.12}
MINICONDA_VERSION=${MINICONDA_VERSION:-4.3.21}
# this git ref controls which set of conda packages are used to initialize the
# the default conda env.
LSSTSW_REF=${LSSTSW_REF:-7c8e67}
LSSTSW_REF=${LSSTSW_REF:-10a4fa6}
MINICONDA_BASE_URL=${MINICONDA_BASE_URL:-https://repo.continuum.io/miniconda}
CONDA_CHANNELS=${CONDA_CHANNELS:-}

Expand Down Expand Up @@ -573,7 +573,7 @@ else:

#
# Test/warn about Python versions, offer to get miniconda if not supported.
# LSST currently mandates Python 3.5 and, optionally, 2.7. We assume that the
# LSST currently mandates specific versions of Python. We assume that the
# python in PATH is the python that will be used to build the stack if
# miniconda(2/3) is not installed.
#
Expand All @@ -582,7 +582,7 @@ n8l::python_check() {
# EUPS package) XXX this will break if python is not in $PATH
local py_interp=python
local minver2=7
local minver3=5
local minver3=6

local has_python=false
local pyverok=false
Expand Down Expand Up @@ -639,8 +639,8 @@ n8l::python_check() {
if [[ $pyverok != true ]]; then
cat <<-EOF

Thanks. After you install Python 2.7 or 3.5 and the required modules,
Copy link
Member

Choose a reason for hiding this comment

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

Could you use variable interpolation similar to the above 2 (>=2.${minver2}) or 3 (>=3.${minver3})? That would eliminate a set of hard coded version strings.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed reference to versions completely. This message comes just after we've already reported the version required.

Copy link
Member

Choose a reason for hiding this comment

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

👍

rerun this script to continue the installation.
Thanks. After you install the required version of Python and the
required modules, rerun this script to continue the installation.

EOF
n8l::fail
Expand Down
10 changes: 5 additions & 5 deletions spec/unit/n8l/python_check_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# XXX can't figure out how to mock `read` and have it set env vars
expect(status.exitstatus).to_not be 0
expect(out).to match(/Unable to locate python./m)
expect(out).to match(/Python 2 \(>=2.7\) or 3 \(>=3.5\)/m)
expect(out).to match(/Python 2 \(>=2.7\) or 3 \(>=3.6\)/m)
expect(err).to eq('')

expect(has_cmd).to be_called_with_arguments('python').times(1)
Expand All @@ -35,14 +35,14 @@
)

expect(status.exitstatus).to_not be 0
expect(out).to match(/Python 2 \(>=2.7\) or 3 \(>=3.5\)/m)
expect(out).to match(/Python 2 \(>=2.7\) or 3 \(>=3.6\)/m)
expect(err).to eq('')

expect(out).to_not match(/Unable to locate python./m)
expect(out).to_not match(/LSST stack requires Python./m)

expect(has_cmd).to be_called_with_arguments('python').times(1)
expect(pyverok).to be_called_with_arguments('python', '7', '5').times(1)
expect(pyverok).to be_called_with_arguments('python', '7', '6').times(1)
end

it 'version BAD' do
Expand All @@ -55,14 +55,14 @@
)

expect(status.exitstatus).to_not be 0
expect(out).to match(/Python 2 \(>=2.7\) or 3 \(>=3.5\)/m)
expect(out).to match(/Python 2 \(>=2.7\) or 3 \(>=3.6\)/m)
expect(out).to match(/LSST stack requires Python./m)
expect(err).to eq('')

expect(out).to_not match(/Unable to locate python./m)

expect(has_cmd).to be_called_with_arguments('python').times(1)
expect(pyverok).to be_called_with_arguments('python', '7', '5').times(1)
expect(pyverok).to be_called_with_arguments('python', '7', '6').times(1)
end
end
end
Expand Down