forked from srndic/mimicus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
74 lines (64 loc) · 2.29 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
#!/usr/bin/env python
'''
Copyright 2014 Nedim Srndic, University of Tuebingen
This file is part of Mimicus.
Mimicus is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Mimicus is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Mimicus. If not, see <http://www.gnu.org/licenses/>.
##############################################################################
setup.py
Created on March 11, 2014.
'''
import multiprocessing # To fix a bug when running tests
from setuptools import setup, find_packages
from setuptools.command.develop import develop
from setuptools.command.install import install
def readme():
with open('README.rst') as f:
return f.read()
class MyInstall(install):
'''
A class for running custom post-install code.
'''
def run(self):
'''
Runs after installation.
'''
install.run(self)
from mimicus import config
class MyDevelop(develop):
'''
A class for running custom post-install code in develop-mode.
'''
def run(self):
'''
Runs after develop-mode installation.
'''
develop.run(self)
from mimicus import config
setup(name='mimicus',
version='1.0',
description='A library for adversarial classifier evasion',
url='https://github.com/srndic/mimicus',
download_url='https://github.com/srndic/mimicus/tarball/master',
author='Nedim Srndic, Pavel Laskov',
author_email='[email protected]',
license='GPLv3',
packages=find_packages(),
install_requires=['matplotlib >= 1.1.1rc',
'numpy >= 1.6.1',
'scikit_learn >= 0.13.1',
'scipy >= 0.9.0'],
zip_safe=False,
test_suite='nose.collector',
tests_require=['nose'],
include_package_data=True,
cmdclass={'install': MyInstall,
'develop': MyDevelop})