Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1import os 

2import subprocess 

3from django.core.management.base import CommandParser 

4from jutil.command import SafeCommand 

5import jbank 

6 

7 

8class Command(SafeCommand): 

9 help = "Compiles xmlsec1-examples" 

10 

11 def add_arguments(self, parser: CommandParser): 

12 parser.add_argument("--clean", action="store_true") 

13 parser.add_argument("--clean-only", action="store_true") 

14 

15 def do(self, *args, **options): 

16 package_path = os.path.dirname(jbank.__file__) 

17 xmlsec1_examples_path = os.path.join(package_path, "xmlsec1-examples") 

18 print("xmlsec1-examples @ {}".format(xmlsec1_examples_path)) 

19 os.chdir(xmlsec1_examples_path) 

20 if options["clean"] or options["clean_only"]: 

21 subprocess.run(["make", "clean"], check=True) 

22 if not options["clean_only"]: 

23 subprocess.run(["make"], check=True)