Skip to content

keep env file in dist dir #1902

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
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
10 changes: 5 additions & 5 deletions pythonforandroid/bootstraps/common/build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import json
from os.path import (
dirname, join, isfile, realpath,
abspath, dirname, join, isfile, realpath,
relpath, split, exists, basename
)
from os import listdir, makedirs, remove
Expand Down Expand Up @@ -297,7 +297,10 @@ def make_package(args):
make_python_zip()

# Add extra environment variable file into tar-able directory:
env_vars_tarpath = tempfile.mkdtemp(prefix="p4a-extra-env-")
env_vars_tarpath = abspath('./p4a-env')
if exists(env_vars_tarpath):
shutil.rmtree(env_vars_tarpath)
os.makedirs(env_vars_tarpath)
with open(os.path.join(env_vars_tarpath, "p4a_env_vars.txt"), "w") as f:
if hasattr(args, "window"):
f.write("P4A_IS_WINDOWED=" + str(args.window) + "\n")
Expand Down Expand Up @@ -347,9 +350,6 @@ def make_package(args):
for directory in _temp_dirs_to_clean:
shutil.rmtree(directory)

# Remove extra env vars tar-able directory:
shutil.rmtree(env_vars_tarpath)

# Prepare some variables for templating process
res_dir = "src/main/res"
default_icon = 'templates/kivy-icon.png'
Expand Down