コード例 #1
0
ファイル: setup.py プロジェクト: nikicat/python-perlmodule
    def run(self):
        cur_dir = os.getcwd()
        if self.root is None:
            self.root = ''

        os.chdir('Python-Object')
        install.spawn(self, ["make", "DESTDIR=%s" % self.root, "install"])
        os.chdir('..')
        if "-DMULTI_PERL" in cc_extra:
            cc_extra.pop(cc_extra.index("-DMULTI_PERL"))
            sources.pop(sources.index('thrd_ctx.c'))
        # Run actual install
        install.run(self)
コード例 #2
0
    def run(self):
        cur_dir = os.getcwd()
        multi_perl = os.path.join(cur_dir, 'MULTI_PERL')
        if os.access(multi_perl, os.F_OK):
            os.unlink(multi_perl)
        if self.root is None:
            self.root = ''

        os.chdir('Python-Object')
        install.spawn(self, ["make", "DESTDIR=%s" % self.root, "install"])
        os.chdir('..')
        if "-DMULTI_PERL" in cc_extra:
            cc_extra.pop(cc_extra.index("-DMULTI_PERL"))
            sources.pop(sources.index('thrd_ctx.c'))
        # Run actual install
        install.run(self)
コード例 #3
0
ファイル: setup.py プロジェクト: UfSoft/ISPManCCP
    def run(self):
        cur_dir = os.getcwd()
        multi_perl = os.path.join(cur_dir, 'MULTI_PERL')
        if os.access(multi_perl, os.F_OK):
            os.unlink(multi_perl)
        if self.root is None:
            self.root = ''

        os.chdir('Python-Object')
        install.spawn(self, ["make", "DESTDIR=%s" % self.root, "install"])
        os.chdir('..')
        if "-DMULTI_PERL" in cc_extra:
            cc_extra.pop(cc_extra.index("-DMULTI_PERL"))
            sources.pop(sources.index('thrd_ctx.c'))
        # Run actual install
        install.run(self)
+	os.system('LD_LIBRARY_PATH="%s" PERL5LIB="%s" PYTHONPATH="%s" python test.py' % (ldpath, perllib, pypath))
+	build.run(self)
+
 class my_install(install):
 
     def run(self):
@@ -150,17 +168,15 @@ class my_install(install):
         if os.access(multi_perl, os.F_OK):
             os.unlink(multi_perl)
 
-        os.chdir(os.path.join(cur_dir, 'Python-Object'))
-        retcode = subprocess.call(['perl', 'Makefile.PL'])
-        retcode = subprocess.call(["make", "install"])
-        os.chdir(cur_dir)
+        os.chdir('Python-Object')
+        install.spawn(self, ["make", "DESTDIR=%s" % self.root, "install"])
+        os.chdir('..')
         if "-DMULTI_PERL" in cc_extra:
             cc_extra.pop(cc_extra.index("-DMULTI_PERL"))
             sources.pop(sources.index('thrd_ctx.c'))
         # Run actual install
         install.run(self)
 
-
 setup (name        = "pyperl",
        version     = "1.0.1",
        description = "Embed a Perl interpreter",
@@ -169,5 +185,5 @@ setup (name        = "pyperl",
        author_email= "*****@*****.**",
        py_modules  = ['dbi', 'dbi2', 'perlpickle', 'perlmod'],
        ext_modules = ext_modules,