tis-pyscripter 3.1.0-2

  • package : tis-pyscripter
  • version : 3.1.0-2
  • description : Environement de developpement python
  • maintainer : TIS <technique@tranquil-it-systems.fr>
  • date : 2018-01-02 10:26:23
  • signer : TRANQUIL IT SYSTEMS
  • signature_date : 20180102-102637
  • min_os_version :
  • min_wapt_version :

setup.py

#!/usr/bin/python
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------
#    This file is part of WAPT
#    Copyright (C) 2013  Tranquil IT Systems http://www.tranquil.it
#    WAPT aims to help Windows systems administrators to deploy
#    setup and update applications on users PC.
#
#    WAPT is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    WAPT is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with WAPT.  If not, see <http://www.gnu.org/licenses/>.
#
# -----------------------------------------------------------------------
from setuphelpers import *
import codecs

uninstallkey=[]

def install():
    install_exe_if_needed('PyScripter-v3.1.0-Setup.exe','/VERYSILENT',key='PyScripter_is1',min_version='3.1.0',killbefore=['PyScripter'])

    import common
    if not common.is_system_user():
        session_setup()

def session_setup():
    try:
        python_init_fn = makepath(application_data(),'PyScripter','python_init.py')
        ensure_dir(python_init_fn)
        if isfile(python_init_fn):
            content = codecs.open(python_init_fn,'r',encoding='utf8').read()
        else:
            content = ''
        wapt_base_dir = makepath(programfiles32,'wapt')
        if not isdir(wapt_base_dir):
            wapt_base_dir = r'c:\wapt'
        site_packages = makepath(wapt_base_dir,'lib','site-packages')

        if not "site.addsitedir(r'%s')" % site_packages in content.splitlines():
            with codecs.open(python_init_fn,'a',encoding='utf8') as f:
                print('Add wapt sitedir to %s'%python_init_fn)
                f.write("\nimport sys\n")
                f.write("sys.path.insert(0,r'%s')\n" % wapt_base_dir)
                f.write("sys.path.insert(0,r'%s')\n" % site_packages)
                f.write("\nimport site\n")
                f.write("site.addsitedir(r'%s')\n" % site_packages )
    except Exception as e:
        print(u'Error in session-setup : %s' % ensure_unicode(e))
        raise


    

manifest

[["WAPT/icon.png", "41a4529177a7b54c723a159658e69070d74207fd"], ["WAPT/certificate.crt", "71e974e585d0a29bdfa7de8e471201abcc040ee6"], ["WAPT/wapt.psproj", "475fa557eb6e29a432c172abeab67063e94306f3"], ["setup.py", "0d61a415627ae6207b6408f4d07cc025195ce955"], ["PyScripter-v3.1.0-Setup.exe", "ddb663b0213dbe6105d7e937f0e8b761ed485b69"], ["WAPT/control", "d7a7e51bd518ac8d9f1cf62cf85278d44f355763"], ["WAPT/changelog.txt", "8cc86b743e574d02869addadffa5f502baa1b8af"]]
    

Forum feed

WAPT Packages / Paquets WAPT • Re: Installation paquet
Est ce que vous avez lancé le session-setup après l'installation de pyscripter?
normalement session-setup se lance automatiquement à l'ouverture de session, mais si c'est un serveur c'est possible que la session soit simplement déconnecté et pas vraiment fermé.
Pour forcer l'exécution de session setup, vous pouvez lancer la commande ci-dessous dans un cmd.exe:
wapt-get session-setup ALL

Denis

Statistiques: Posté par dcardon — 12 janvier 2018, 17:41


WAPT Packages / Paquets WAPT • Re: Installation paquet
Est-ce que Python est installé dans C:\Python27 ?

Il se pourrait que cela soit un problème de Path et que PyScripter aille chercher les mauvaises librairies Python

Vérifiez les chemins définis dans PyScripter

Alexandre

Statistiques: Posté par agauvrit — 12 janvier 2018, 11:10