-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
52 lines (43 loc) · 1.77 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
import io
import os
import re
import setuptools
def get_long_description():
base_dir = os.path.abspath(os.path.dirname(__file__))
with io.open(os.path.join(base_dir, "README.md"), encoding="utf-8") as f:
return f.read()
def get_requirements():
base_dir = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(base_dir, "requirements.txt"), encoding="utf8") as f:
return f.read().splitlines()
def get_version():
current_dir = os.path.abspath(os.path.dirname(__file__))
version_file = os.path.join(current_dir, "execution_timer", "__init__.py")
with io.open(version_file, encoding="utf-8") as f:
return re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', f.read(), re.M).group(1)
setuptools.setup(
name="timer-decorator",
version=get_version(),
author="vgilabert94",
license="MIT",
description="Provides a decorator to easily measure and optionally save the execution times.",
long_description=get_long_description(),
long_description_content_type="text/markdown",
url="https://github.com/vgilabert94/execution-timer",
packages=setuptools.find_packages(),
python_requires=">=3.9",
install_requires=get_requirements(),
classifiers=[
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
],
)