This repository has been archived by the owner on Jul 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
executable file
·148 lines (121 loc) · 4.08 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#!/usr/bin/python -tt
# -*- coding: utf-8 -*-
# =============================================================================
# File : setup.py -- Setup script for pathpy
# Author : Jürgen Hackl <[email protected]>
# Time-stamp: <Fri 2022-02-04 20:18 juergen>
#
# Copyright (c) 2016-2022 Pathpy Developers
# =============================================================================
"""
Setup script for pathpy.
"""
import glob
import os
from pathlib import Path
import sys
from pybind11.setup_helpers import Pybind11Extension, build_ext
from setuptools import find_packages, setup
import versioneer
project_dir = Path(__file__).parent
version = versioneer.get_version()
# Minimum required python version
min_version = (3, 8)
# Check the python version. Pathpy requires Python 3.7+.
if sys.version_info[:2] < min_version:
error = """
Pathpy {} requires Python {} or later ({} detected).
""".format(
version,
".".join(map(str, min_version)),
".".join(map(str, sys.version_info[:2])),
)
sys.exit(error)
# Initialize setup parameters
DISTNAME = "pathpy4"
VERSION = versioneer.get_version()
CMDCLASS = versioneer.get_cmdclass()
PYTHON_REQUIRES = ">={}".format(".".join(map(str, min_version)))
DESCRIPTION = "pathpy: path data analysis"
LONG_DESCRIPTION = """\
An OpenSource python package for the analysis of time series data on networks
using higher-order and multi-order graphical models.
"""
MAINTAINER = "Ingo Scholtes, Jürgen Hackl"
MAINTAINER_EMAIL = "[email protected]"
URL = "https://www.pathpy.net"
LICENSE = "AGPL-3.0+"
DOWNLOAD_URL = "https://github.com/pathpy/pathpy"
PROJECT_URLS = {
"Issue Tracker": "https://github.com/pathpy/pathpy/issues",
"Documentation": "https://pathpy.github.io/",
"Source Code": "https://github.com/pathpy/pathpy",
}
INSTALL_REQUIRES = (
project_dir.joinpath("requirements/requirements.txt")
.read_text()
.split("\n")
)
PACKAGES = find_packages("src")
PACKAGE_DIR = {"": "src"}
PACKAGE_DATA = {"pathpy": ["py.typed"]}
PLATFORMS = ["Linux", "Mac OSX", "Windows", "Unix"]
CLASSIFIERS = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"License :: OSI Approved :: "
"GNU Affero General Public License v3 or later (AGPLv3+)",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Scientific/Engineering :: Physics",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
EXTENTIONS = [
Pybind11Extension(
"pathpy._pathpy",
glob.glob(os.path.join("src", "_pathpy", "*.cpp")),
# Example: passing in the version to the compiled code
define_macros=[("VERSION_INFO", VERSION)],
),
]
CMDCLASS["build_ext"] = build_ext
setup(
name=DISTNAME,
author=MAINTAINER,
author_email=MAINTAINER_EMAIL,
maintainer=MAINTAINER,
maintainer_email=MAINTAINER_EMAIL,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
license=LICENSE,
url=URL,
project_urls=PROJECT_URLS,
version=VERSION,
download_url=DOWNLOAD_URL,
install_requires=INSTALL_REQUIRES,
packages=PACKAGES,
package_dir=PACKAGE_DIR,
package_data=PACKAGE_DATA,
classifiers=CLASSIFIERS,
platforms=PLATFORMS,
zip_safe=False,
include_package_data=True,
python_requires=PYTHON_REQUIRES,
setup_requires=["pytest-runner", "flake8"],
tests_require=["pytest"],
ext_modules=EXTENTIONS,
cmdclass=CMDCLASS,
cmake_install_dir="src/pathpy",
)