forked from sktime/sktime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
71 lines (59 loc) · 2.1 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
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""Install script for sktime."""
__author__ = ["mloning", "lmmentel"]
import codecs
import toml
from setuptools import find_packages, setup
pyproject = toml.load("pyproject.toml")
def long_description():
"""Read and return README as long description."""
with codecs.open("README.md", encoding="utf-8-sig") as f:
return f.read()
# ground truth package metadata is loaded from pyproject.toml
# for context see:
# - [PEP 621 -- Storing project metadata in pyproject.toml]
# (https://www.python.org/dev/peps/pep-0621)
pyproject = toml.load("pyproject.toml")
def setup_package():
"""Set up package."""
projectname = pyproject["project"]["name"]
setup(
author_email="[email protected]",
author=f"{projectname} developers",
classifiers=pyproject["project"]["classifiers"],
description=pyproject["project"]["description"],
download_url=pyproject["project"]["urls"]["download"],
extras_require=pyproject["project"]["optional-dependencies"],
include_package_data=True,
install_requires=pyproject["project"]["dependencies"],
keywords=pyproject["project"]["keywords"],
license=pyproject["project"]["license"],
long_description=long_description(),
maintainer_email="[email protected]",
maintainer=f"{projectname} developers",
name=projectname,
package_data={
"sktime": [
"*.csv",
"*.csv.gz",
"*.arff",
"*.arff.gz",
"*.txt",
"*.ts",
"*.tsv",
]
},
packages=find_packages(
where=".",
exclude=["tests", "tests.*"],
),
project_urls=pyproject["project"]["urls"],
python_requires=pyproject["project"]["requires-python"],
setup_requires=pyproject["build-system"]["requires"],
url=pyproject["project"]["urls"]["repository"],
version=pyproject["project"]["version"],
zip_safe=False,
)
if __name__ == "__main__":
setup_package()