-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
61 lines (49 loc) · 1.54 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
# -*- coding: UTF-8 -*-
"""
Setup
"""
import sys
import os
from setuptools import setup
NAME = "razortrace"
def get_version(*args):
version_file = "razortrace/__version__.py"
with open(version_file) as f:
exec(compile(f.read(), version_file, "exec"))
return locals()["__version__"]
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.md')) as f:
README = f.read()
URL = "https://github.com/manbehindthemadness/razortrace"
DESCRIPTION = "Straight forward memory leak detection"
LONG_DESCRIPTION = \
"""
Razortrace is a memory diagnostic tool based on the ``tracemalloc`` library. It's aim is to provide rapid identification
of memory leaks and produce straightforward, human-readable reports.
"""
def get_packages(package):
"""
Return root package and all sub-packages.
"""
return [
dirpath
for dirpath, dirnames, filenames in os.walk(package)
if os.path.exists(os.path.join(dirpath, "__init__.py"))
]
if sys.version_info < (3, 5):
sys.exit('Sorry, Python < 3.5 is not supported')
setup(
name="razortrace",
version=get_version("razortrace"),
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
long_description_content_type='text/markdown',
keywords="malloc, memory, leak, trace",
author="manbehindthemadness",
author_email="[email protected]",
url=URL,
license="MIT",
packages=get_packages('razortrace'),
include_package_data=True,
package_data={'razortrace': []}
)