Skip to content

Commit 48dcd88

Browse files
committed
opt-out of auto-freezing Python 3.5
now that it's not being updated anymore only security fixes from now on for Python 3.5
1 parent 9cb2213 commit 48dcd88

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

repo2docker/buildpacks/conda/environment.py-3.5.frozen.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# AUTO GENERATED FROM environment.py-3.5.yml, DO NOT MANUALLY MODIFY
2-
# Frozen on 2018-11-20 06:16:12 UTC
1+
# py3.5 conda packages are no longer being updated as of 12/2018
2+
# this file is hand-maintained now
3+
# and should only receive security fixes, no new features
34
name: r2d
45
channels:
56
- conda-forge
@@ -75,6 +76,7 @@ dependencies:
7576
- idna==2.7
7677
- jupyterhub==0.9.4
7778
- mako==1.0.7
79+
- notebook==5.7.2
7880
- nteract-on-jupyter==1.9.6
7981
- pamela==0.3.0
8082
- python-editor==1.0.3

repo2docker/buildpacks/conda/environment.py-3.5.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# py3.5 is not being auto-generated from this file anymore
2+
# update environment.py-3.5.frozen.yml directly
13
dependencies:
24
- python=3.5.*
35
- ipywidgets==7.2.1

repo2docker/buildpacks/conda/freeze.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,16 @@ def freeze(env_file, frozen_file):
4545
4646
Result will be stored in frozen_file
4747
"""
48+
frozen_dest = HERE / frozen_file
49+
if frozen_dest.exists():
50+
with frozen_dest.open('r') as f:
51+
line = f.readline()
52+
if 'GENERATED' not in line:
53+
print(f"{frozen_file} not autogenerated, not refreezing")
54+
return
4855
print(f"Freezing {env_file} -> {frozen_file}")
4956

50-
with open(HERE / frozen_file, 'w') as f:
57+
with frozen_dest.open('w') as f:
5158
f.write(f"# AUTO GENERATED FROM {env_file}, DO NOT MANUALLY MODIFY\n")
5259
f.write(f"# Frozen on {datetime.utcnow():%Y-%m-%d %H:%M:%S UTC}\n")
5360

@@ -78,8 +85,8 @@ def set_python(py_env_file, py):
7885
if os.path.exists(py_env_file):
7986
# only clobber auto-generated files
8087
with open(py_env_file) as f:
81-
text = f.read()
82-
if text and 'GENERATED' not in text:
88+
text = f.readline()
89+
if 'GENERATED' not in text:
8390
return
8491

8592
print(f"Regenerating {py_env_file} from {ENV_FILE}")

0 commit comments

Comments
 (0)