<commit_before># Copyright (c) <NAME>, TU Delft.
# All rights reserved.
# See COPYRIGHT for details.

import ConfigParser
from ConfigParser import NoOptionError
import config
import getopt
import os
import sys
import utils

def usage():
    message = """
Welcome to johannes, the ugliest
downloading/unpacking/configuring/building and installation system of
them all.  It could save you a lot of time though.  This instance of
johannes will get, build and install the following: python, numpy,
wxpython, matplotlib, cmake, dcmtk, vtk, vtktudoss, vtkdevide, itk,
itktudoss, itkvtkglue, devide

Please read the included README.txt file NOW.

Build method A (the default) is as follows: Before starting
johannes.py, first run bootstrap_stage1.sh and bootstrap_stage2.sh to
download and install python.  After that, run johannes as follows:

/you/new/python johannes.py -w working_directory

Options are as follows:
-w, --working-dir      : specify working directory [REQUIRED]
-h, --help             : show this help
-m, --mode             : working mode, 'everything' (default),
                         'clean_build', 'get_only' or 'configure_only'
-p, --install-packages : specify comma-separated list of packages to work on,
                         default all.  Example: -p "CMake,CableSwig"
                         Correct capitalisation IS important!
-d, --auto-deps        : Automatically build per install package dependencies.
                         The default is not to do this, i.e. you have to
                         specify all required packages on the command-line
                         or in the johannes.cfg project file.
--no-win-prereq        : do NOT do Windows prerequisites check.
-v, --versions         : display installed versions of all packages.

You can also specify project-specific options (for example specifying
install packages) in a johannes.cfg file placed at the top-level
of your working directory.  See example-johannes.cfg for more info.

All of this ugliness is copyright 2006-2011 <NAME> http://cpbotha.net/
and is hereby put under a BSD license.
"""

    print message

def posix_prereq_check(working_dir):
    """Perform posix system check for prerequisite software.

    Largest part of this checking is done in the second bootstrap
    shell script (executed before this file).  Here we check for basic
    stuff like cvs, svn and patch.
    """

    v = utils.find_command_with_ver(
            'CVS', '%s -v' % (config.CVS,),
            '\(CVS\)\s+(.*)\s+')

    v = v and utils.find_command_with_ver(
            'Subversion (SVN)', '%s --version' % (config.SVN,),
            'version\s+(.*)$')

    v = v and utils.find_command_with_ver(
            'patch', '%s -v' % (config.PATCH,),<commit_msg>fixe documentation re no-prereq-check switch<commit_after># Copyright (c) <NAME>, TU Delft.
# All rights reserved.
# See COPYRIGHT for details.

import ConfigParser
from ConfigParser import NoOptionError
import config
import getopt
import os
import sys
import utils

def usage():
    message = """
Welcome to johannes, the ugliest
downloading/unpacking/configuring/building and installation system of
them all.  It could save you a lot of time though.  This instance of
johannes will get, build and install the following: python, numpy,
wxpython, matplotlib, cmake, dcmtk, vtk, vtktudoss, vtkdevide, itk,
itktudoss, itkvtkglue, devide

Please read the included README.txt file NOW.

Build method A (the default) is as follows: Before starting
johannes.py, first run bootstrap_stage1.sh and bootstrap_stage2.sh to
download and install python.  After that, run johannes as follows:

/you/new/python johannes.py -w working_directory

Options are as follows:
-w, --working-dir      : specify working directory [REQUIRED]
-h, --help             : show this help
-m, --mode             : working mode, 'everything' (default),
                         'clean_build', 'get_only' or 'configure_only'
-p, --install-packages : specify comma-separated list of packages to work on,
                         default all.  Example: -p "CMake,CableSwig"
                         Correct capitalisation IS important!
-d, --auto-deps        : Automatically build per install package dependencies.
                         The default is not to do this, i.e. you have to
                         specify all required packages on the command-line
                         or in the johannes.cfg project file.
--no-prereq-check      : do NOT do prerequisites check.
-v, --versions         : display installed versions of all packages.

You can also specify project-specific options (for example specifying
install packages) in a johannes.cfg file placed at the top-level
of your working directory.  See example-johannes.cfg for more info.

All of this ugliness is copyright 2006-2011 <NAME> http://cpbotha.net/
and is hereby put under a BSD license.
"""

    print message

def posix_prereq_check(working_dir):
    """Perform posix system check for prerequisite software.

    Largest part of this checking is done in the second bootstrap
    shell script (executed before this file).  Here we check for basic
    stuff like cvs, svn and patch.
    """

    v = utils.find_command_with_ver(
            'CVS', '%s -v' % (config.CVS,),
            '\(CVS\)\s+(.*)\s+')

    v = v and utils.find_command_with_ver(
            'Subversion (SVN)', '%s --version' % (config.SVN,),
            'version\s+(.*)$')

    v = v and utils.find_command_with_ver(
            'patch', '%s -v' % (config.PATCH,),
{'fraction_non_alphanumeric': 0.08786837823178449, 'fraction_numerical': 0.0036159826432833123, 'mean_word_length': 2.717741935483871, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2297064', 'n_tokens_mistral': 1653, 'n_tokens_neox': 1581, 'n_words': 632}