-
Notifications
You must be signed in to change notification settings - Fork 9
/
setup.py
69 lines (56 loc) · 2.11 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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from pathlib import Path
from typing import List
import setuptools
# The directory containing this file
HERE = Path(__file__).parent.resolve()
# The text of the README file
NAME = 'TEDEouS'
version_info = {}
with open('./tedeous/version.py') as fp:
exec(fp.read(), version_info)
VERSION = version_info['__version__']
AUTHOR = 'AH and NSS Lab'
SHORT_DESCRIPTION = 'TEDEouS - Torch Exhaustive Differential Equations Solver. Differential equation solver, based on pytorch library'
README = Path(HERE, 'README.rst').read_text(encoding='utf-8')
URL = 'https://github.com/ITMO-NSS-team/torch_DE_solver'
REQUIRES_PYTHON = '>=3.8'
LICENSE = 'MIT License'
def _readlines(*names: str, **kwargs) -> List[str]:
encoding = kwargs.get('encoding', 'utf-8')
lines = Path(__file__).parent.joinpath(*names).read_text(encoding=encoding).splitlines()
return list(map(str.strip, lines))
def _extract_requirements(file_name: str):
return [line for line in _readlines(file_name) if line and not line.startswith('#')]
def _get_requirements(req_name: str):
requirements = _extract_requirements(req_name)
return requirements
setuptools.setup(
name=NAME,
version=VERSION,
author=AUTHOR,
author_email='[email protected]',
description=SHORT_DESCRIPTION,
long_description=README,
long_description_content_type='text/x-rst',
url=URL,
python_requires=REQUIRES_PYTHON,
license=LICENSE,
packages=setuptools.find_packages(exclude=['test*']),
include_package_data=True,
install_requires=_get_requirements('requirements.txt'),
#extras_require={
# key: _get_requirements(Path('other_requirements', f'{key}.txt'))
# for key in ('docs', 'examples', 'extra', 'profilers')
#},
classifiers=[
'Development Status :: 3 - Alpha',
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
],
)