CauldronDevelopmentLLC / CAMotics

Open-Source Simulation & Computer Aided Machining - A 3-axis CNC GCode simulator
Other
602 stars 138 forks source link

SConstruct question #377

Closed sergey-239 closed 1 year ago

sergey-239 commented 1 year ago

Dear Joseph, there is the following code in SConstruct at lines 317 through 331:

    # Examples
    examples = []
    cmd = 'git ls-files examples/'
    p = subprocess.Popen(cmd, shell = True, stdout = subprocess.PIPE)
    examples = p.communicate()[0]
    if isinstance(examples, bytes): examples = examples.decode()
    examples = list(map(lambda x: [x, x], examples.split()))

    # Machines
    machines = []
    cmd = 'git ls-files machines/'
    p = subprocess.Popen(cmd, shell = True, stdout = subprocess.PIPE)
    machines = p.communicate()[0]
    if isinstance(machines, bytes): machines = machines.decode()
    machines = list(map(lambda x: [x, x], machines.split()))

I am not an expert in Python, so could you, please, clarify, what was the intent? Could this build dependency on git to be removed? Thanks in advance

sergey-239 commented 1 year ago

Sorry, Joseph, the annoying warnings about missing git where not from this source.

jcoffland commented 1 year ago

To clarify those lines are getting the list of example and machine files which are checked in to git. This avoids accidentally packaging any temporary files or works in progress.