File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 (extension ".khcj")
2323- sklearn: Scikit-Learn estimator classes to learn and use Khiops models
2424"""
25- import importlib .metadata
26- import os
27- import sys
28- import warnings
29- from copy import copy
30- from importlib .metadata import PackageNotFoundError
31- from pathlib import Path
32-
3325from khiops .core .internals .version import KhiopsVersion
3426
35- try :
36- # Package is installed
37- __version__ = importlib .metadata .version (__name__ )
38- except PackageNotFoundError :
39- # Package is not installed, hence parse the pyproject.toml file
40- try :
41- # Python >= 3.11: use the standard-library tomllib module
42- import tomllib as tomli
43- except ModuleNotFoundError :
44- # Python < 3.11: use the Pip-vendored tomli module
45- from pip ._vendor import tomli
46- with open ("pyproject.toml" , "rb" ) as metadata_file :
47- metadata = tomli .load (metadata_file )
48-
49- # Strip "-" from pre-release versions to match installed package metadata
50- __version__ = metadata .get ("project" ).get ("version" ).replace ("-" , "" )
27+ __version__ = "11.0.0.0b.0"
5128
5229
5330def get_compatible_khiops_version ():
Original file line number Diff line number Diff line change 11{% set name = load_file_data('../../pyproject.toml', from_recipe_dir=True).get('project').get('name') %}
2- {% set version = load_file_data('../../pyproject.toml', from_recipe_dir=True).get('project').get('version') %}
32package :
43 name : {{ name }}
54 # The Conda version cannot contain the '-' character, so we eliminate it
6- version : {{ version | replace('-', '') }}
5+ version : " 11.0.0.0b.0 "
76
87source :
98 path : ../../
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ ignore_errors = true
145145
146146[project ]
147147name = " khiops"
148- version = " 11.0.0.0-b.0 "
148+ dynamic = [ " version " ]
149149description = " Python library for the Khiops AutoML suite"
150150readme = " README.md"
151151license = " BSD-3-Clause-Clear"
@@ -191,6 +191,9 @@ gcs = [
191191include = [" khiops" , " khiops.*" ]
192192namespaces = false
193193
194+ [tool .setuptools .dynamic ]
195+ version = {attr = " khiops.__version__" }
196+
194197[project .scripts ]
195198kh-status = " khiops.tools:kh_status_entry_point"
196199kh-samples = " khiops.tools:kh_samples_entry_point"
You can’t perform that action at this time.
0 commit comments