Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit fa403eb

Browse files
authored
Merge pull request #555 from frennkie/packaging
update setup.py and add Manifest
2 parents dce22a7 + 74b264d commit fa403eb

File tree

3 files changed

+61
-6
lines changed

3 files changed

+61
-6
lines changed

MANIFEST.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include LICENSE
2+
include README.rst
3+
include CHANGELOG
4+
include requirements.txt
5+
include requirements-*.txt
6+
recursive-include data *.*

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ dist:
1818
python setup.py sdist
1919

2020
clean:
21-
find . -name '*.pyc' -delete
21+
find . -type f -iname '*.pyc' -delete
22+
find . -type d -iname "__pycache__" -delete
2223
rm -rf dist build viper.egg-info

setup.py

Lines changed: 53 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,68 @@
33
# This file is part of Viper - https://github.com/viper-framework/viper
44
# See the file 'LICENSE' for copying permission.
55

6-
from setuptools import setup, find_packages
76
from viper.common.version import __version__
87

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+
931
setup(
1032
name='viper',
1133
version=__version__,
1234
author='Claudio Guarnieri',
1335
author_email='nex@nex.sx',
14-
description="Binary Analysis & Management Framework",
36+
description=description,
37+
long_description=description,
1538
url='http://viper.li',
16-
license='BSD 3-Clause',
1739

40+
platforms='any',
1841
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+
2146
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',
2270
)

0 commit comments

Comments
 (0)