Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Test for w3af's setup.py
#!/usr/bin/env python
from setuptools import setup, find_packages
from os.path import join
LONG_DESCRIPTION = '''\
Introduction
============
This setup.py file is only useful if you're trying to create some type of
wrapper around w3af and use it as a module. The file is not included into the
main w3af distribution because regular users don't need it.
Usage
=====
To use this file just download it, copy to the w3af root directory and run
`python setup.py install` , after some seconds you should be able to move
to any directory and from a python interpreter run `import w3af`.
Dependencies
============
It is important to note that this script does NOT install any pip or operating
system packages required by w3af. You still need to go through the regular
installation process to get a working w3af install.
'''
def get_version():
'''
:return: A string with the version, for example, '1.5'.
'''
version_file = join('w3af', 'core', 'data', 'constants', 'version.txt')
version = file(version_file).read().strip()
return version
setup(
name='w3af',
version=get_version(),
license = 'GNU General Public License v2 (GPLv2)',
platforms='Linux',
description=('w3af is an open source web application security scanner.'),
long_description=LONG_DESCRIPTION,
author='Andres Riancho',
author_email='andres.riancho@gmail.com',
url='https://github.com/andresriancho/w3af/',
packages=find_packages(),
include_package_data=True,
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Topic :: Security'
],
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment