def setup(**attrs): debug("default attrs: %s" % attrs) # todo: entry_points if "packages" not in attrs: kwargs = moduledict(packages) attrs.update(kwargs) if "py_modules" not in attrs: kwargs = moduledict(py_modules) attrs.update(kwargs) if "scripts" not in attrs: kwargs = moduledict(scripts) attrs.update(kwargs) return distutils_setup(**attrs)
'Products/ZopeTutorial/*.stx']], ['Products/ZopeTutorial/dtml', ['Products/ZopeTutorial/dtml/*']]], cmdclass={'install_data': install_data} ) # Call distutils setup with all lib/python packages and modules, and # flush setup_info. Wondering why we run py_modules separately? So am I. # Distutils won't let us specify packages and py_modules in the same call. distutils_setup( name='Zope', author=AUTHOR, packages=setup_info.get('packages', []), data_files=setup_info.get('data_files', []), headers=setup_info.get('headers', []), ext_modules=setup_info.get('ext_modules', []), cmdclass={'install': install, 'install_data': install_data} ) distutils_setup( name='Zope', author=AUTHOR, py_modules=setup_info.get('py_modules', []), cmdclass={'install': install, 'install_data': install_data} ) setup_info = {} # The rest of these modules live in the root of the source tree
def setup(): try: temp_dir = getcwd() if not isfile('{}/waspc.lock'.format(temp_dir)): # need to install custom library (SSLyze) for wg_ssl audit plugin support pip_main(['install', 'https://github.com/ZenSecurity/sslyze/archive/master.tar.gz#egg=SSLyze', '--verbose']) file('{}/waspc.lock'.format(temp_dir), 'w').close() profiles_dir = 'w3af-repo/profiles' distutils_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=file('README.rst').read(), author='em', author_email='*****@*****.**', url='https://github.com/ZenSecurity/w3af-module', packages=find_packages(exclude=('tests.*', 'tests', 'mot_utils*',)), # include everything in source control which lives inside one of the packages identified by find_packages include_package_data=True, # include the data files, which don't live inside the directory data_files=[('profiles', [normpath(join(profiles_dir, profile_file)) for profile_file in listdir(profiles_dir)])], # This allows w3af plugins to read the data files which we deploy with data_files. zip_safe=False, # Run the module tests using nose test_suite='nose.collector', # Require at least the easiest PIP requirements from w3af install_requires=get_pip_requirements(), dependency_links=get_pip_git_requirements(), # Install these scripts scripts=['w3af-repo/w3af_console', 'w3af-repo/w3af_gui', 'w3af-repo/w3af_api'], # 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' ], ) except Exception as exception: print('{} - {}'.format(exception.__class__.__name__, exception))