Skip to content

App Engine Flex Python Cloud: Privately packaged dependencies alternative #244

Open
@samuhepp

Description

@samuhepp

Hello,

I want to make use of privately packaged projects for the Python 3 Flex environment. The recommended approach:

To use private dependencies:

  1. Run pip install -t lib my_module to copy dependencies into a local folder named lib.
  2. Add an empty __init__.py file to the lib directory to make it a module.
  3. Import the module in your app. For example:
import lib.my_module

I'm not particularly a massive fan of this approach and I would have thought this would have short comings with inter-package relationships?

I would prefer to have a packaged dependency (in the form of a *.tar.gz or *.whl) copied to a dist directory perhaps, and then referenced within requirements.txt like so:

numpy
pandas
dist/local_package-0.0.1.tar.gz

Unfortunately this approach doesn't seem possible as the requirements.txt is installed before the rest of the contents is uploaded so this local package doesn't exist at the time of installation. Is there any particular reason why the entire app cannot be uploaded before the installation?

My personal opinion is that this would be cleaner than the recommended approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions