Exemplo n.º 1
0
    def finalize_options(self):
        # cmd_obj = self.distribution.get_command_obj('bdist', False)
        # if cmd_obj:
            #this will be proceeded only if install command will be
            #invoked from bdist command
            # self.idldir = cmd_obj.idldir
        super(Install, self).finalize_options()
        if not self.omniidl:
            self.omniidl = "omniidl"
        global g_install_unittests
        g_install_unittests = self.install_unittests

        if not self.idldir:
            # set idl directory to datarootdir/idl/fred/
            self.idldir=os.path.join(self.datarootdir, "idl", "fred")

        if self.install_unittests:
            self.distribution.data_files.append(
                    ('LIBDIR/%s/unittests' % self.distribution.get_name(), 
                        file_util.all_files_in_2('unittests', ['.*'])))
Exemplo n.º 2
0
Arquivo: setup.py Projeto: saimir/FRED
    def finalize_options(self):
        # cmd_obj = self.distribution.get_command_obj('bdist', False)
        # if cmd_obj:
        #this will be proceeded only if install command will be
        #invoked from bdist command
        # self.idldir = cmd_obj.idldir
        super(Install, self).finalize_options()
        if not self.omniidl:
            self.omniidl = "omniidl"
        global g_install_unittests
        g_install_unittests = self.install_unittests

        if not self.idldir:
            # set idl directory to datarootdir/idl/fred/
            self.idldir = os.path.join(self.datarootdir, "idl", "fred")

        if self.install_unittests:
            self.distribution.data_files.append(
                ('LIBDIR/%s/unittests' % self.distribution.get_name(),
                 file_util.all_files_in_2('unittests', ['.*'])))
Exemplo n.º 3
0
def main(directory):
    try:
        setup(
            # Distribution meta-data
            name=PROJECT_NAME,
            description='Fred Whois',
            author='David Pospisilik, Zdenek Bohm, CZ.NIC',
            author_email='*****@*****.**',
            url='http://www.nic.cz/',
            license='GNU GPL',
            platforms=['posix'],
            long_description='The part of the CZ.NIC CMS web framework.',
            scripts=[os.path.join('statistics', 'simple_stats.py')],
            packages=[
                PACKAGE_NAME, PACKAGE_NAME + '.captcha', PACKAGE_CAPTCHA,
                PACKAGE_CAPTCHA + '.Visual', PACKAGE_NAME + '.statistics'
            ],
            package_dir={PACKAGE_NAME: '.'},
            package_data={
                PACKAGE_NAME: ['captcha/pil_missing.jpg'],
                PACKAGE_CAPTCHA: ['data/fonts/vera/*.*']
            },
            # Value of the option --config will be join into data_files inside
            # class FredWhoisData
            data_files=[
                ('DOCDIR',
                 ['README.txt',
                  os.path.join('build', 'apache.conf')]),
                ('SYSCONFDIR/fred', [os.path.join('build', 'whois.conf')]),
                (os.path.join('DATAROOTDIR', SHARE_TEMPLATES),
                 all_files_in_2(os.path.join(directory, 'templates'))),
                (os.path.join('DATAROOTDIR', SHARE_LOCALE), [
                    'locale/messages.pot', 'locale/cs_CZ.po',
                    'locale/localegen.sh', 'locale/C.po'
                ]),
                (os.path.join('DATAROOTDIR', SHARE_LOCALE, 'C', 'LC_MESSAGES'),
                 ['locale/C/LC_MESSAGES/whois.mo']),
                (os.path.join('DATAROOTDIR', SHARE_LOCALE, 'en_US',
                              'LC_MESSAGES'),
                 ['locale/en_US/LC_MESSAGES/whois.mo']),
                (os.path.join('DATAROOTDIR', SHARE_LOCALE, 'cs_CZ',
                              'LC_MESSAGES'),
                 ['locale/cs_CZ/LC_MESSAGES/whois.mo']),
                (os.path.join('DATAROOTDIR', SHARE_WWW_CLIP),
                 all_files_in_2(os.path.join(directory, '_clip'))),
                (os.path.join('DATAROOTDIR', SHARE_WWW_IMG),
                 all_files_in_2(os.path.join(directory, '_img'))),
                (os.path.join('DATAROOTDIR', SHARE_WWW_CSS),
                 all_files_in_2(os.path.join(directory, '_css'))),
                (os.path.join('DATAROOTDIR', SHARE_WWW_JS),
                 all_files_in_2(os.path.join(directory, '_js'))),
                (os.path.join('DATAROOTDIR', SHARE_WWW_JS, 'MochiKit'),
                 all_files_in_2(os.path.join(directory, '_js/MochiKit')))
            ],
            cmdclass={
                'install': FredWhoisInstall,
                'install_scripts': FredWhoisScripts,
                'install_lib': FredWhoisLib,
            },
        )
        return True
    except Exception, e:
        log.error("Error: %s" % e)
        return False
Exemplo n.º 4
0
def main(directory):
    try:
        setup(
            # Distribution meta-data
            name=PROJECT_NAME,
            description='Fred Whois',
            author='David Pospisilik, Zdenek Bohm, CZ.NIC',
            author_email='*****@*****.**',
            url='http://www.nic.cz/',
            license='GNU GPL',
            platforms=['posix'],
            long_description='The part of the CZ.NIC CMS web framework.',

            scripts=[os.path.join('statistics', 'simple_stats.py')],
            packages=[PACKAGE_NAME,
                PACKAGE_NAME + '.captcha',
                PACKAGE_CAPTCHA,
                PACKAGE_CAPTCHA + '.Visual',
                PACKAGE_NAME + '.statistics'],
            package_dir={PACKAGE_NAME: '.'},
            package_data={PACKAGE_NAME: ['captcha/pil_missing.jpg'],
                PACKAGE_CAPTCHA: ['data/fonts/vera/*.*']},
            # Value of the option --config will be join into data_files inside
            # class FredWhoisData
            data_files=[
                ('DOCDIR',
                    ['README.txt', os.path.join('build', 'apache.conf')]),
                ('SYSCONFDIR/fred',
                    [os.path.join('build', 'whois.conf')]),
                (os.path.join('DATAROOTDIR', SHARE_TEMPLATES),
                    all_files_in_2(os.path.join(directory, 'templates'))),
                (os.path.join('DATAROOTDIR', SHARE_LOCALE),
                    ['locale/messages.pot', 'locale/cs_CZ.po',
                        'locale/localegen.sh', 'locale/C.po']),
                (os.path.join('DATAROOTDIR', SHARE_LOCALE, 'C', 'LC_MESSAGES'),
                    ['locale/C/LC_MESSAGES/whois.mo']),
                (os.path.join('DATAROOTDIR', SHARE_LOCALE, 'en_US',
                    'LC_MESSAGES'), ['locale/en_US/LC_MESSAGES/whois.mo']),
                (os.path.join('DATAROOTDIR', SHARE_LOCALE, 'cs_CZ',
                    'LC_MESSAGES'), ['locale/cs_CZ/LC_MESSAGES/whois.mo']),
                (os.path.join('DATAROOTDIR', SHARE_WWW_CLIP),
                    all_files_in_2(os.path.join(directory, '_clip'))),
                (os.path.join('DATAROOTDIR', SHARE_WWW_IMG),
                    all_files_in_2(os.path.join(directory, '_img'))),
                (os.path.join('DATAROOTDIR', SHARE_WWW_CSS),
                    all_files_in_2(os.path.join(directory, '_css'))),
                (os.path.join('DATAROOTDIR', SHARE_WWW_JS),
                    all_files_in_2(os.path.join(directory, '_js'))),
                (os.path.join('DATAROOTDIR', SHARE_WWW_JS, 'MochiKit'),
                    all_files_in_2(os.path.join(directory, '_js/MochiKit')))
                ],
            cmdclass={
                'install': FredWhoisInstall,
                'install_scripts': FredWhoisScripts,
                'install_lib': FredWhoisLib,
                },
            )
        return True
    except Exception, e:
        log.error("Error: %s" % e)
        return False