mirror of
https://github.com/wassname/cookiecutter-data-science.git
synced 2026-08-04 12:45:01 +08:00
Official support for Python 2 ended on Jan 1, 2020 (see https://www.python.org/doc/sunset-python-2/ for more info). This change does not prevent anybody from using Python 2, but we should not be encouraging new projects to use it.
19 lines
447 B
Python
19 lines
447 B
Python
import sys
|
|
|
|
REQUIRED_PYTHON_MAJOR_VERSION = 3
|
|
|
|
def main():
|
|
system_major = sys.version_info.major
|
|
if system_major != REQUIRED_PYTHON_MAJOR_VERSION:
|
|
raise TypeError(
|
|
"This project requires Python 3. Found: Python {}".format(
|
|
REQUIRED_PYTHON_MAJOR_VERSION, sys.version
|
|
)
|
|
)
|
|
else:
|
|
print(">>> Development environment passes all tests!")
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|