Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#15 Setup script for wapiti

v1.0 (example)
closed-fixed
nobody
None
5
2013-10-20
2010-02-18
No

setup.py : python distutils setup script

wapiti-2.2.1-std_lib_paths.patch:
Split wapiti sources between site-packages/wapiti/* and /usr/bin/wapiti,
move working dirs (generated_report, scans) from site-packages/wapiti/ to ~/.wapiti/,
move config dir site-packages/wapiti/config/attacks to /etc/wapiti/attacks

Discussion

  • setup.py

     
    Attachments
  • devloop
    devloop
    2010-02-28

    • status: open --> pending
     
  • devloop
    devloop
    2010-02-28

    I made some change in the latest svn revision to include the modifications.
    I'm still working on it.

     
    • status: pending --> open
     
  • Move gettext MO files from site-packages/wapiti/config/language to /usr/share/locale:

    diff -up wapiti-2.2.1/src/language/language.py.orig wapiti-2.2.1/src/language/language.py
    --- wapiti-2.2.1/src/language/language.py.orig 2009-12-29 20:02:45.000000000 +0200
    +++ wapiti-2.2.1/src/language/language.py 2010-03-11 10:58:23.057823911 +0200
    @@ -36,11 +36,10 @@ class Language:
    should be invoked.
    """

    - LANG_DIR = 'config/language/'
    AVAILABLE_LANGS = ["es", "en", "fr"];

    BASE_DIR = os.path.normpath(os.path.join(os.path.abspath(__file__), '../..'))
    - LANG_PATH = BASE_DIR + "/" + LANG_DIR
    + LANG_PATH = "/usr/share/locale"

    def configure(self, lang=None):
    """

    --- wapiti-setup.py.orig 2010-02-14 23:55:36.000000000 +0200
    +++ wapiti-setup.py 2010-03-11 11:31:05.090822470 +0200
    @@ -5,6 +5,7 @@
    import os

    VERSION = "2.2.1"
    +LANGUAGES = ["en", "es", "fr"]

    class wapiti_install_lib(install_lib):
    def run(self):
    @@ -31,13 +32,19 @@
    results.append(path_file)

    list_package_data = []
    -build_file_list(list_package_data, "src", "config/language")
    build_file_list(list_package_data, "src", "config/vulnerabilities")
    build_file_list(list_package_data, "src", "report_template")

    list_etc_wapiti_attacks = []
    build_file_list(list_etc_wapiti_attacks, "", "src/config/attacks")

    +list_share_locale = []
    +for lang in LANGUAGES:
    + list_share_locale.append((
    + "share/locale/" + lang + "/LC_MESSAGES",
    + ["src/config/language/" + lang + "/LC_MESSAGES/wapiti.mo"]
    + ))
    +

    # Main
    setup(
    @@ -70,7 +77,7 @@
    ("/etc/wapiti/attacks", list_etc_wapiti_attacks),
    ("share/man/man1", ["doc/wapiti.1"]),
    ("share/doc/wapiti-" + VERSION, ["AUTHORS", "ChangeLog_Wapiti", "ChangeLog_lswww", "README", "TODO", "example.txt"])
    - ],
    + ] + list_share_locale,
    scripts = ["src/wapiti.py"],
    cmdclass = {
    "install_lib" : wapiti_install_lib,

     
  • devloop
    devloop
    2013-10-20

    Setup.py have been rewritten for the 2.3.0 version.

     
  • devloop
    devloop
    2013-10-20

    • status: open --> closed-fixed
    • Group: --> v1.0 (example)