Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuration of pip options #95

Merged
merged 4 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions {{ cookiecutter.format }}/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,15 @@ android {

python {
version "{{ cookiecutter.python_version|py_tag }}"


mhsmith marked this conversation as resolved.
Show resolved Hide resolved
pip {
install "-r", "requirements.txt"

def f = new File(project.projectDir, "pip-options.txt")
def pipOptions = f.isFile() ? f.getText("utf-8").split("\n") : []
mhsmith marked this conversation as resolved.
Show resolved Hide resolved
freakboy3742 marked this conversation as resolved.
Show resolved Hide resolved
pipOptions = pipOptions.findAll { !it.startsWith("#") && !it.isBlank() }
mhsmith marked this conversation as resolved.
Show resolved Hide resolved
options(*pipOptions)
}
{%- if cookiecutter.extract_packages %}
extractPackages {{ cookiecutter.extract_packages }}
Expand Down
3 changes: 3 additions & 0 deletions {{ cookiecutter.format }}/app/pip-options.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Briefcase may overwrite the contents of this file to configure Chaquopy
# pip options as required by the app configuration.
# Empty lines and lines starting with # will be ignored