-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
72 lines (60 loc) · 2.58 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import os
import re
from setuptools import setup
def find_packages(package, basepath):
packages = [package]
for name in os.listdir(basepath):
path = os.path.join(basepath, name)
if not os.path.isdir(path):
continue
packages.extend(find_packages('%s.%s'%(package, name), path))
return packages
here = os.path.abspath(os.path.dirname(__file__))
desc = 'Method PROTES (PRobabilistic Optimizer with TEnsor Sampling) for derivative-free optimization of the multidimensional arrays and discretized multivariate functions based on the tensor train (TT) format'
with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
desc_long = f.read()
with open(os.path.join(here, 'protes/__init__.py'), encoding='utf-8') as f:
text = f.read()
version = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", text, re.M)
version = version.group(1)
with open(os.path.join(here, 'requirements.txt'), encoding='utf-8') as f:
requirements = f.read().split('\n')
requirements = [r for r in requirements if len(r) >= 3]
setup_args = dict(
name='protes',
version=version,
description=desc,
long_description=desc_long,
long_description_content_type='text/markdown',
author='Andrei Chertkov',
author_email='[email protected]',
url='https://github.com/anabatsh/PROTES',
classifiers=[
'Development Status :: 4 - Beta', # 3 - Alpha, 5 - Production/Stable
'License :: OSI Approved :: MIT License',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Intended Audience :: Science/Research',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
],
keywords='Derivative-free optimization gradient-free method multidimensional optimization low-rank representation tensor train format',
packages=find_packages('protes', './protes/'),
python_requires='>=3.8',
project_urls={
'Source': 'https://github.com/anabatsh/PROTES',
},
)
if __name__ == '__main__':
setup(
**setup_args,
install_requires=requirements,
include_package_data=True)