ai-content-maker/.venv/Lib/site-packages/sklearn/_build_utils/version.py

15 lines
369 B
Python
Raw Normal View History

2024-05-03 04:18:51 +03:00
#!/usr/bin/env python
""" Extract version number from __init__.py
"""
import os
sklearn_init = os.path.join(os.path.dirname(__file__), "../__init__.py")
data = open(sklearn_init).readlines()
version_line = next(line for line in data if line.startswith("__version__"))
version = version_line.strip().split(" = ")[1].replace('"', "").replace("'", "")
print(version)