Skip to main content

Pip handling for tiamat projects

Project description

Tiamat Pip

Pip handling for tiamat projects

Setup

In order to be able to pip install packages which can be used with your tiamat packaged application you need to add tiamat-pip as a dependency and your run.py should look similar to:

#!/usr/bin/env python3

import sys
import multiprocessing

import tiamatpip.cli
import tiamatpip.configure

import mainapp

# Configure the path where to install the new packages
tiamatpip.configure.set_user_site_packages_path("THIS SHOULD BE A HARDCODED PATH")


def main(argv):
    # Let's see if we should be handling pip related stuff
    if tiamatpip.cli.should_redirect_argv(argv):
        tiamatpip.cli.process_pip_argv(argv)

    # If we reached this far, it means we're not handling pip stuff
    # Your application logic can resume

    mainapp.main(argv)
    sys.exit(0)


if __name__ == "__main__":
    if sys.platform.startswith("win"):
        multiprocessing.freeze_support()
    main(sys.argv)

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

tiamat-pip-1.1.1.tar.gz (11.1 kB view hashes)

Uploaded Source

Built Distribution

tiamat_pip-1.1.1-py3-none-any.whl (16.5 kB view hashes)

Uploaded Python 3

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