Skip to main content

python 打包编译工具

Project description

CPCLI

苍之幻灵-脚手架

目录

快速开始

如果你的Maya有pip那么

cd "C:\Program Files\Autodesk\Maya2018\bin"

mayapy -m pip install CP_CLI

如果没有

  1. 打开C:\Users\PC\Documents\maya文件夹

  2. 进入scripts文件夹,如果没有就创建它

  3. 下载完整的CPCLI代码

  4. 解压并进入解压完成的文件夹

  5. 将src目录中的CPCLI文件夹复制到scripts

  6. 打开maya2018,如果已经打开了就重启它

创建test.py并添加以下代码

#!/usr/bin/python

# -*-coding:utf-8 -*-

from __future__ import unicode_literals, print_function



# 因为是将库放在C:\Users\PC\Documents\maya\scripts下的所以需要初始化maya

try:

    import maya.standalone



    maya.standalone.initialize()

except:

    pass



import CPCLI.core as cli_core

from CPCLI.overall_processing_function import group

from CPCLI.file_filtering_functions import noTypes

from CPCLI.processing_function import deleteBlankLines, deleteUselessStrings





class Config(object):

    # 文件过滤函数

    file_filtering_functions = [

        noTypes(['pyc'])

    ]

    # 整体处理函数

    overall_processing_function = [

        group(

            name=u"TOOL_NAME",

            exec_script=u'''\

# 以下是启动脚本

import main

from main import main

main()'''

        )

    ]

    # 处理函数

    processing_function = [

        # 清除空行

        deleteBlankLines,

        # 清除无用字符串

        deleteUselessStrings

    ]

    # 可真可假影响不大

    debug = True



    class Path(object):

        root = r"项目根目录"

        src = root + r"\src"

        scripts = root + r"\scripts"

        build = root + r"\build"





cli_core.build(Config)

版权说明

该项目签署了Apache-2.0 授权许可,详情请参阅 LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

CP_CLI-1.0.3.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

CP_CLI-1.0.3-py2.py3-none-any.whl (16.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file CP_CLI-1.0.3.tar.gz.

File metadata

  • Download URL: CP_CLI-1.0.3.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.7

File hashes

Hashes for CP_CLI-1.0.3.tar.gz
Algorithm Hash digest
SHA256 7701305c2e359c2adce0990b85d9370a5e4ad645ce7cacba77c51eaf6f3f3dfb
MD5 6e9efea09273f9653772c83acc85b27d
BLAKE2b-256 d15edba54310ad818c7b7f3b52a94a817604d89657037ed6659195449e60dbb8

See more details on using hashes here.

File details

Details for the file CP_CLI-1.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: CP_CLI-1.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.7

File hashes

Hashes for CP_CLI-1.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 87b71ccde53e525d82a01725b18e26d1f5e7d7d6795ad474f3659abd39819e3b
MD5 9bc48752570eb815fd1069cb0c87faba
BLAKE2b-256 4fab353ba548ec87cb3eb37577aeed208c13b1e2e93555e338cbcad87f71fc3d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page