4
4
# Github: https://github.com/thieu1995 %
5
5
# --------------------------------------------------%
6
6
7
- from setuptools import setup , find_packages
7
+ import setuptools
8
+ import os
9
+ import re
10
+
11
+
12
+ with open ("requirements.txt" ) as f :
13
+ REQUIREMENTS = f .read ().splitlines ()
14
+
15
+
16
+ def get_version ():
17
+ init_path = os .path .join (os .path .dirname (__file__ ), 'metasklearn' , '__init__.py' )
18
+ with open (init_path , 'r' , encoding = 'utf-8' ) as f :
19
+ init_content = f .read ()
20
+ version_match = re .search (r"^__version__ = ['\"]([^'\"]+)['\"]" , init_content , re .M )
21
+ if version_match :
22
+ return version_match .group (1 )
23
+ raise RuntimeError ("Unable to find version string." )
8
24
9
25
10
26
def readme ():
11
27
with open ('README.md' , encoding = 'utf-8' ) as f :
12
- README = f .read ()
13
- return README
28
+ res = f .read ()
29
+ return res
14
30
15
31
16
- setup (
32
+ setuptools . setup (
17
33
name = "metasklearn" ,
18
- version = "0.2.0" ,
34
+ version = get_version () ,
19
35
author = "Thieu" ,
20
36
author_email = "nguyenthieu2102@gmail.com" ,
21
37
description = "MetaSklearn: A Metaheuristic-Powered Hyperparameter Optimization Framework for Scikit-Learn Models" ,
@@ -41,7 +57,7 @@ def readme():
41
57
'Change Log' : 'https://github.com/thieu1995/MetaSklearn/blob/main/ChangeLog.md' ,
42
58
'Forum' : 'https://t.me/+fRVCJGuGJg1mNDg1' ,
43
59
},
44
- packages = find_packages (exclude = ['tests*' , 'examples*' ]),
60
+ packages = setuptools . find_packages (exclude = ['tests*' , 'examples*' ]),
45
61
include_package_data = True ,
46
62
license = "GPLv3" ,
47
63
classifiers = [
@@ -57,6 +73,7 @@ def readme():
57
73
"Programming Language :: Python :: 3.10" ,
58
74
"Programming Language :: Python :: 3.11" ,
59
75
"Programming Language :: Python :: 3.12" ,
76
+ "Programming Language :: Python :: 3.13" ,
60
77
"Topic :: System :: Benchmark" ,
61
78
"Topic :: Scientific/Engineering" ,
62
79
"Topic :: Scientific/Engineering :: Mathematics" ,
@@ -69,10 +86,9 @@ def readme():
69
86
"Topic :: Software Development :: Libraries :: Python Modules" ,
70
87
"Topic :: Utilities" ,
71
88
],
72
- install_requires = ["numpy>=1.17.1" , "scipy>=1.7.1" , "scikit-learn>=1.0.2" ,
73
- "pandas>=1.3.5" , "mealpy>=3.0.2" , "permetrics>=2.0.0" ],
89
+ install_requires = REQUIREMENTS ,
74
90
extras_require = {
75
- "dev" : ["pytest>=7.0 " , "pytest-cov==4.0.0" , "flake8>=4.0.1" ],
91
+ "dev" : ["pytest==7.1.2 " , "pytest-cov==4.0.0" , "flake8>=4.0.1" ],
76
92
},
77
93
python_requires = '>=3.8' ,
78
94
)
0 commit comments