File tree Expand file tree Collapse file tree 4 files changed +34
-3
lines changed
Expand file tree Collapse file tree 4 files changed +34
-3
lines changed Original file line number Diff line number Diff line change 1+ **4.1.3 - 02/05/25 **
2+
3+ - Add python versions file
4+
15**4.1.2 - 12/3/24 **
26
37 - Fix infinite recursion bug
Original file line number Diff line number Diff line change 11@Library (" vivarium_build_utils" ) _
2- reusable_pipeline(scheduled_branches : [" main" ],
3- python_versions : [" 3.10" , " 3.11" ]
4- )
2+ reusable_pipeline(scheduled_branches : [" main" ])
Original file line number Diff line number Diff line change 1+ [" 3.10" , " 3.11" ]
Original file line number Diff line number Diff line change 11#!/usr/bin/env python
2+ import json
23import os
4+ import sys
35
6+ from packaging .version import parse
47from setuptools import find_packages , setup
58
9+ with open ("python_versions.json" , "r" ) as f :
10+ supported_python_versions = json .load (f )
11+
12+ python_versions = [parse (v ) for v in supported_python_versions ]
13+ min_version = min (python_versions )
14+ max_version = max (python_versions )
15+ if not (
16+ min_version <= parse ("." .join ([str (v ) for v in sys .version_info [:2 ]])) <= max_version
17+ ):
18+ py_version = "." .join ([str (v ) for v in sys .version_info [:3 ]])
19+ # NOTE: Python 3.5 does not support f-strings
20+ error = (
21+ "\n --------------------------------------------\n "
22+ "Error: gbd_mapping runs under python {min_version}-{max_version}.\n "
23+ "You are running python {py_version}.\n " .format (
24+ min_version = min_version .base_version ,
25+ max_version = max_version .base_version ,
26+ py_version = py_version ,
27+ )
28+ + "--------------------------------------------\n "
29+ )
30+ print (error , file = sys .stderr )
31+ sys .exit (1 )
32+
33+
634if __name__ == "__main__" :
735 base_dir = os .path .dirname (__file__ )
836 src_dir = os .path .join (base_dir , "src" )
You can’t perform that action at this time.
0 commit comments