shotgunsoftware / tk-framework-adobe

Foundation Tech for all Adobe Integrations
https://developer.shotgridsoftware.com/tk-framework-adobe/
Other
10 stars 9 forks source link

VFX Platform Python Build Status Code style: black Linting

tk-framework-adobe

A framework for Adobe engines

Development

How to set up your development environment

This is what the env file should look like:

TARGET_VERSION=1.1.3 # Make sure this matches the tk-framework-adobe version you will be releasing

TKCORE_VERSION=0.19.19  # This core version is expected to exist in your bundle cache

ZXP_SIGN_TOOL=/path/to/bin/ZXPSignCmd

CERTIFICATE_FILE=/path/to/file/location/cert.p12

CERTIFICATE_PASS=<Make up your own secure password>
CERT_COUNTRY=<Two Character Country Code>
CERT_STATE=<Two Character State or Province Code>
CERT_ORG=Autodesk
CERT_CN=SGTK

Follow this link to find out where your bundle cache is located.

To install the CEP extension for testing without signing:

cd path/to/tk-adobe-framework
cd dev
make test

To sign the CEP extension

cd path/to/tk-adobe-framework
cd dev
make sign

To create a certificate for use when signing the CEP extension

cd path/to/tk-adobe-framework
cd dev
make create_certificate

Note: In the case where the configured CERTIFICATE_FILE does not exist, the create_certificate command will be automatically run as part of the sign target.

To remove the latest signed zxp file

cd path/to/tk-adobe-framework
cd dev
make clean

Notes on editing the env files (env.mk and env.cmd)

Changes to the env files (env.mk and env.cmd) will typically not be tracked in git. The information contained in these files is specific to a particular development environment, so tracking changes to that data in git is undesirable.

If you need to make changes to these files, you can use the following commands:

git update-index --no-skip-worktree dev/env.mk dev/env.cmd
git add dev\env.*
git commit -m "your message"
git update-index --skip-worktree dev/env.mk dev/env.cmd

Please be aware that these files contain potentially-sensitive information, such as a certificate password. When making changes to these files and pushing them to a git repository, be sure that you've removed any data that might be considered confidential.

Packaging

This component requires a pkgs.zip file that bundles Python third-party dependencies. This file is built by running:

python update_python_packages.py

And it will write a file in requirements/<environment Python version>/pkgs.zip based on its corresponding requirements.txt file. It will also update frozen_requirements.txt.

You should run this script with all supported Python versions. Example:

pyenv shell 3.7
python update_python_packages.py

pyenv shell 3.9
python update_python_packages.py

# and so on...