Compile files in /linuxcnc/lib/

More
11 months 3 weeks ago #338121 by zz912
Hello,

I use RIP installation.
If I debug files in the /linuxcnc/src folder, I just need to be in the /linuxcnc/src folder and type $ make. Then only what I edited is compiled.

If I debug files in the /linuxcnc/lib folder, I am in the /linuxcnc/src folder and type $ make, nothing happens.
I have to type $ make -B, but it takes a long time.

How should I debug the file:
/linuxcnc/lib/python/gladevcp/builtin-panels/gtk_little_probe/gtk_little_probe.py
?

Please Log in to join the conversation.

More
11 months 2 weeks ago #338197 by andypugh
You probably don't need to compile the gtk_little_probe.py file.

Python is an interpreted language, so often you just need to make the edits and run the code.

So, the reason that "make" is not doing anything is that the file in question is not mentioned in the makefile, as it is simply interpreted as and when needed.

(There is a complication that Python code is compiled to bytecode (.pyc) and sometimes that might be run instead.)

To be sure that your edited file is running, maybe put a "print("this is version 2.2.2") near the top of the file?

Please Log in to join the conversation.

More
11 months 2 weeks ago #338206 by zz912

You probably don't need to compile the gtk_little_probe.py file.
Python is an interpreted language, so often you just need to make the edits and run the code.


It is true, but not in LCNC.


If I modify this file:
/home/zdenek/linuxcnc/linuxcnc-zz912/src/emc/usr_intf/gmoccapy/gmoccapy.py

It returns:
Code:
zdenek@cnc:~/linuxcnc/linuxcnc-zz912/src$ make Reading 203/203 dependency files Done reading dependencies Reading 274/274 realtime dependency files Done reading realtime dependencies make: Vstupuje se do adresáře „/home/zdenek/linuxcnc/linuxcnc-zz912/src“ Syntax checking python script gmoccapy Copying python script gmoccapy You now need to run 'sudo make setuid' in order to run in place with access to hardware. make: Opouští se adresář „/home/zdenek/linuxcnc/linuxcnc-zz912/src“

The most important sentence is:
Copying python script gmoccapy

Id dont know why and where, but it works.   
gmoccapy.py is in /src/ folder and it works.

I placed the wrong file here, I meant:
/linuxcnc/lib/python/gladevcp/builtin-panels/gtk_verser_probe/gtk_verser_probe.py
You can try modify it, but noting happens.
MAKE doesnt see it.


 

Please Log in to join the conversation.

More
11 months 2 weeks ago #338265 by zz912
Hi Andy,

Sorry for the confusion.

Python files in /linuxcnc/lib/ may not be processed by the "make" command.

Python files in /linuxcnc/src/ may be processed by the "make" command.

I've tested it now.
You were right.

Please Log in to join the conversation.

Time to create page: 5.142 seconds
Powered by Kunena Forum