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
pull/475/head
Min RK 2018-12-11 10:43:01 +01:00
rodzic 9cb2213581
commit 48dcd88365
3 zmienionych plików z 16 dodań i 5 usunięć

Wyświetl plik

@ -1,5 +1,6 @@
# AUTO GENERATED FROM environment.py-3.5.yml, DO NOT MANUALLY MODIFY
# Frozen on 2018-11-20 06:16:12 UTC
# py3.5 conda packages are no longer being updated as of 12/2018
# this file is hand-maintained now
# and should only receive security fixes, no new features
name: r2d
channels:
- conda-forge
@ -75,6 +76,7 @@ dependencies:
- idna==2.7
- jupyterhub==0.9.4
- mako==1.0.7
- notebook==5.7.2
- nteract-on-jupyter==1.9.6
- pamela==0.3.0
- python-editor==1.0.3

Wyświetl plik

@ -1,3 +1,5 @@
# py3.5 is not being auto-generated from this file anymore
# update environment.py-3.5.frozen.yml directly
dependencies:
- python=3.5.*
- ipywidgets==7.2.1

Wyświetl plik

@ -45,9 +45,16 @@ def freeze(env_file, frozen_file):
Result will be stored in frozen_file
"""
frozen_dest = HERE / frozen_file
if frozen_dest.exists():
with frozen_dest.open('r') as f:
line = f.readline()
if 'GENERATED' not in line:
print(f"{frozen_file} not autogenerated, not refreezing")
return
print(f"Freezing {env_file} -> {frozen_file}")
with open(HERE / frozen_file, 'w') as f:
with frozen_dest.open('w') as f:
f.write(f"# AUTO GENERATED FROM {env_file}, DO NOT MANUALLY MODIFY\n")
f.write(f"# Frozen on {datetime.utcnow():%Y-%m-%d %H:%M:%S UTC}\n")
@ -78,8 +85,8 @@ def set_python(py_env_file, py):
if os.path.exists(py_env_file):
# only clobber auto-generated files
with open(py_env_file) as f:
text = f.read()
if text and 'GENERATED' not in text:
text = f.readline()
if 'GENERATED' not in text:
return
print(f"Regenerating {py_env_file} from {ENV_FILE}")