-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
93 lines (81 loc) · 3.03 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
"""Installation
pip3 install odet/
"""
# Authors: [email protected]
#
# License: xxx
import os
import shutil
from setuptools import find_packages
from setuptools import setup
build_dir = './build'
if os.path.exists(build_dir):
shutil.rmtree(build_dir)
APP_NAME = 'odet'
examples_dir = os.path.join(APP_NAME, 'examples')
tests_dir = os.path.join(APP_NAME, 'tests')
install_examples = True
if install_examples:
if not os.path.exists(examples_dir): shutil.copytree('examples', examples_dir)
if not os.path.exists(tests_dir): shutil.copytree('tests', tests_dir)
def read(readme_file):
"""Utility function to read the README file. Used for the long_description.
Parameters
----------
readme_file: str
Returns
-------
"""
value = open(os.path.join(os.path.dirname(__file__), readme_file), 'r', encoding='utf-8').read()
return str(value)
setup(name=APP_NAME,
version='0.0.5',
description='Novelty Detection',
long_description=read('readme.md'),
# long_description='Data representation for IoT traffic',
long_description_content_type="text/markdown",
author='Kun',
author_email='[email protected]',
url='https://github.com/kun-88/odet',
download_url='https://github.com/kun-88/odet',
license='xxx',
python_requires='>=3.7.3',
# install_requires=['numpy>=1.18.3',
# 'scipy>=1.4.1',
# 'pandas>=0.25.1',
# 'scapy>=2.4.3',
# 'scikit-learn>=0.21.3'
# ],
# extras_require={
# 'visualize': ['matplotlib>=3.2.1'],
# 'tests': ['pytest>=5.3.1',
# 'requests>=2.22.0',
# ],
# },
# scripts=[
# 'scripts/docs.sh',
# ],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Python Software Foundation License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules'
],
# automatically find the packages with __init__.py file and start from the setup.py's directory
packages=find_packages(where='.', exclude=('tests*', 'examples*')), # include all packages under .
# packages =find_packages('.odet'),
# package_dir={'': '.'}, # tell distutils packages are under src
# package_data={"odet": ['*.pcap', '*.csv']},
# include_package_data=True,
# setup_requires=['flake8'],
)
# clean data
if os.path.exists(examples_dir): shutil.rmtree(examples_dir)
if os.path.exists(tests_dir): shutil.rmtree(tests_dir)
if os.path.exists(build_dir): shutil.rmtree(build_dir)
if os.path.exists(f'{APP_NAME}.egg-info'): shutil.rmtree(f'{APP_NAME}.egg-info')