How to version control 3rd party Python packages that my custom Frappe app uses?

bench pip install pypi-package does not add the package to my custom app’s requirements.txt while bench pip freeze > requirements.txt actually adds a whole lot of packages but not my pypi-package.

The aim is to ensure my custom Frappe app’s dependencies are versioned in the app’s git repo. Would manually adding the package as a newline in requirements.txt work for my use case?

Thank you for your time.

Given the env is shared by all the Frappe apps + possibly additional packages added by bench, the pip freeze dump might not be very helpful.

Track Python dependencies like you would for any other Python project. Manually defining dependencies in the requirements file would be the best way forward.

1 Like