|
3 | 3 | # This file is part of Viper - https://github.com/viper-framework/viper |
4 | 4 | # See the file 'LICENSE' for copying permission. |
5 | 5 |
|
6 | | -from setuptools import setup, find_packages |
7 | 6 | from viper.common.version import __version__ |
8 | 7 |
|
| 8 | +# Always prefer setuptools over distutils |
| 9 | +from setuptools import setup, find_packages |
| 10 | +import pip |
| 11 | + |
| 12 | +links = [] |
| 13 | +requires = [] |
| 14 | + |
| 15 | +requirement_files = ['requirements-base.txt'] |
| 16 | + |
| 17 | +for req_file in requirement_files: |
| 18 | + requirements = pip.req.parse_requirements(req_file, session=pip.download.PipSession()) |
| 19 | + |
| 20 | + for item in requirements: |
| 21 | + # we want to handle package names and also repo urls |
| 22 | + if getattr(item, 'url', None): # older pip has url |
| 23 | + links.append(str(item.url)) |
| 24 | + if getattr(item, 'link', None): # newer pip has link |
| 25 | + links.append(str(item.link)) |
| 26 | + if item.req: |
| 27 | + requires.append(str(item.req)) |
| 28 | + |
| 29 | +description = "Binary Analysis & Management Framework" |
| 30 | + |
9 | 31 | setup( |
10 | 32 | name='viper', |
11 | 33 | version=__version__, |
12 | 34 | author='Claudio Guarnieri', |
13 | 35 | author_email='nex@nex.sx', |
14 | | - description="Binary Analysis & Management Framework", |
| 36 | + description=description, |
| 37 | + long_description=description, |
15 | 38 | url='http://viper.li', |
16 | | - license='BSD 3-Clause', |
17 | 39 |
|
| 40 | + platforms='any', |
18 | 41 | scripts=['viper-cli', 'viper-api', 'viper-web', 'viper-update'], |
19 | | - packages=find_packages(), |
20 | | - setup_requires=['pytest-runner'], |
| 42 | + packages=find_packages(exclude=['tests', 'tests.*']), |
| 43 | + install_requires=requires, |
| 44 | + dependency_links=links, |
| 45 | + |
21 | 46 | tests_require=['pytest'], |
| 47 | + |
| 48 | + # BSD 3-Clause License: |
| 49 | + # - http://choosealicense.com/licenses/bsd-3-clause |
| 50 | + # - http://opensource.org/licenses/BSD-3-Clause |
| 51 | + license='BSD 3-Clause', |
| 52 | + |
| 53 | + # See https://pypi.python.org/pypi?%3Aaction=list_classifiers |
| 54 | + classifiers=[ |
| 55 | + 'Topic :: Security', |
| 56 | + |
| 57 | + 'License :: OSI Approved :: BSD License', |
| 58 | + |
| 59 | + 'Programming Language :: Python :: 2', |
| 60 | + 'Programming Language :: Python :: 2.7', |
| 61 | + 'Programming Language :: Python :: 3', |
| 62 | + 'Programming Language :: Python :: 3.4', |
| 63 | + 'Programming Language :: Python :: 3.5', |
| 64 | + 'Programming Language :: Python :: 3.6', |
| 65 | + |
| 66 | + 'Operating System :: POSIX :: Linux', |
| 67 | + ], |
| 68 | + |
| 69 | + keywords='binary analysis management malware research', |
22 | 70 | ) |
0 commit comments