sshussain270
sshussain270

Reputation: 1865

Overriding package libraries in Google App Engine project

I am writing a Google App Engine Django REST Framework project that uses external libraries through requirements.txt. In one of the of files in a module installed in requirements.txt, I am manually editing some code there. How do I get GAP to use this modified version instead of original one.

The way I am doing this is installing the packages in a folder called lib, modifying the package inside it and then creating a file called appengine_config.py which contains this:

from google.appengine.ext import vendor

vendor.add('lib')

But when I deploy it, it still uses the original package in requirements.txt. Any idea how to make this work?

Upvotes: 0

Views: 35

Answers (1)

minou
minou

Reputation: 16563

GAE will use requirements.txt and install those libraries in the lib folder when you deploy. That is just how it works.

Nothing prevents you from deploying code outside the lib folder. You can structure your project like this:

GAE_folder:
-- app.yaml
-- requirements.txt
-- lib
-- my_app
-- my_custom_lib

Upvotes: 1

Related Questions