This repository has been archived by the owner on Apr 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
59 lines (54 loc) · 1.57 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
import os
from setuptools import setup, find_packages
import versioneer
import sys
# https://www.pydanny.com/python-dot-py-tricks.html
if sys.argv[-1] == 'test':
test_requirements = [
'pytest',
'coverage',
'pytest_cov',
]
try:
modules = map(__import__, test_requirements)
except ImportError as e:
err_msg = e.message.replace("No module named ", "")
msg = "%s is not installed. Install your test requirments." % err_msg
raise ImportError(msg)
r = os.system('py.test test -v --cov=csirtg_urlsml_tf --cov-fail-under=50')
if r == 0:
sys.exit()
else:
raise RuntimeError('tests failed')
data_files = [
'data/model.h5',
'data/word-dict.json',
'data/weights.h5'
]
setup(
name="csirtg_urlsml_tf",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description="CSIRTG URLs ML Framework - TensorFlow",
long_description="",
url="https://github.com/csirtgadgets/csirtg-urlsml-tf-py",
data_files=[(os.path.join('csirtg_urlsml_tf', 'data'), data_files)],
keywords=['network', 'security'],
author="Wes Young",
author_email="[email protected]",
packages=find_packages(),
install_requires=[
'tensorflow',
'pandas',
'keras'
],
entry_points={
'console_scripts': [
'csirtg-urlsml-tf-train=csirtg_urlsml_tf.train:main',
'csirtg-urlsml-tf=csirtg_urlsml_tf:main'
]
},
classifiers=[
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
],
)