コード例 #1
0
ファイル: setup.py プロジェクト: x24git/wixpy
IS_MSW = os.name == 'nt'
IS_WIN32 = IS_MSW and platform.architecture()[0] == '32bit'
WIN_ARCH = 'win32' if IS_WIN32 else 'win64'

scripts = ['scripts/py2/wix.py'] if IS_PY2 else ['scripts/py3/wix.py']
scripts = ['scripts/%s/wix.py.exe' % WIN_ARCH] if IS_MSW and IS_PY2 else scripts

setup(
    name=wixpy.PROJECT,
    version=wixpy.VERSION,
    description=wixpy.DESCRIPTION,
    author=wixpy.AUTHOR,
    author_email=wixpy.AUTHOR_EMAIL,
    maintainer=wixpy.MAINTAINER,
    maintainer_email=wixpy.MAINTAINER_EMAIL,
    license=wixpy.LICENSE,
    install_requires=['distro'],
    url=wixpy.URL,
    download_url=wixpy.DOWNLOAD_URL,
    long_description=wixpy.LONG_DESCRIPTION,
    classifiers=wixpy.CLASSIFIERS,
    packages=['wixpy'],
    package_dir={'wixpy': 'src/wixpy'},
    scripts=scripts,
)

import dependencies

if 'install' in sys.argv and not IS_MSW:
    dependencies.install()
コード例 #2
0
if __name__ == "__main__":
    import dependencies

    dependencies.install()  # attempt to install any missing dependencies

import asyncio
import datetime
import logging
import os
import random
import re
import requests
import sys
import traceback

import discord
from discord.ext import commands

import secret
import self_updater
import util
from commands import (
    CommandColor,
    CommandGradYear,
    MiscFun,
    StraightforwardHelp,
    UpdateChecker,
)

# set up logger
log_filename = "discord.log"
コード例 #3
0
ファイル: init_client.py プロジェクト: mlfv-ufsm/mlfv-3.0
        )
        print(
            "    eg.: python " + sys.argv[0] +
            " localhost 15089 \"numpy,pandas,sklearn\" \"os,sys,timeit,numpy,pandas,sklearn.ensemble,sklearn.preprocessing,sklearn.metrics\" 256000000 2 100"
        )
        # we opted for allowing these parameters manually for allowing the user to define how much processing capacity will be offered (and also to ease testing)
        exit()

    dependencies = sys.argv[3]
    libs = sys.argv[4]
    cpu = sys.argv[5]
    mem = sys.argv[6]
    net = sys.argv[7]
    gpu = sys.argv[8] if len(sys.argv) > 8 else 0

    install(dependencies)

    signal.signal(signal.SIGINT, signal_handler)
    client_port = 18811

    while not verify_client_port(client_port):
        client_port += 1

    rpyc.core.protocol.DEFAULT_CONFIG['allow_pickle'] = True
    try:
        con = rpyc.connect(sys.argv[1],
                           sys.argv[2],
                           config=rpyc.core.protocol.DEFAULT_CONFIG)
    except:
        print("ERROR: Could not connect to server " + sys.argv[1] +
              " on port " + str(sys.argv[2]))