Browse Source

build: remember configuration after building

master
Lephenixnoir 4 months ago
parent
commit
0ecfed4351
Signed by: Lephenixnoir GPG Key ID: 1BBA026E13FC0495
4 changed files with 12 additions and 4 deletions
  1. +1
    -0
      .gitignore
  2. +1
    -3
      giteapc.make
  3. +2
    -1
      giteapc/repo.py
  4. +8
    -0
      giteapc/repos.py

+ 1
- 0
.gitignore View File

@ -1,2 +1,3 @@
__pycache__
giteapc-config.make
giteapc-config-*.make

+ 1
- 3
giteapc.make View File

@ -1,8 +1,6 @@
# giteapc: version=1
ifneq ($(GITEAPC_CONFIG),)
include giteapc-config-$(GITEAPC_CONFIG).make
endif
-include giteapc-config.make
configure:
@ true


+ 2
- 1
giteapc/repo.py View File

@ -286,7 +286,8 @@ def build(*args, install=False, skip_configure=False):
env = os.environ.copy()
if s.config:
env["GITEAPC_CONFIG"] = config
env["GITEAPC_CONFIG"] = s.config
r.set_config(s.config)
env["GITEAPC_PREFIX"] = PREFIX_FOLDER
if not skip_configure:


+ 8
- 0
giteapc/repos.py View File

@ -141,6 +141,14 @@ class LocalRepo:
with ChangeDirectory(self.folder):
return run(["make", "-f", "giteapc.make", target], env=env)
def set_config(self, config):
source = self.folder + f"/giteapc-config.make"
target = self.folder + f"/giteapc-config-{config}.make"
if os.path.exists(source):
os.remove(source)
os.symlink(target, source)
# Metadata
def metadata(self):


Loading…
Cancel
Save