Mac build fix and header bug

71 views
Skip to first unread message

Samuel Luckenbill

unread,
Apr 12, 2018, 10:46:06 AM4/12/18
to dxf2gcode-dev
Hello developers,

I am planning to try dxf2gcode for some sculpture plasma cutting this week. 

I have a git branch with changes to fix the mac OS build, document the mac install in the README, and to make it respect the postprocessor comment format in the header (my machine uses square brackets instead of parens). 

I may make other plasma-specific improvements if the tool works well in our process.

Would you like the patch? I am unsure of how to share it back.

Thanks,
Sam

Sebastian Kuzminsky

unread,
Apr 12, 2018, 11:28:01 AM4/12/18
to dxf2gc...@googlegroups.com, Samuel Luckenbill
Hi Sam, thanks for the offer to help make dxf2gcode better on Mac!

The easiest way to share code is probably by publishing a link to your
branch, assuming it's on a publicly accessible git server somewhere
(like github).

If there's no public git server, the second best option is to use "git
format-patch" to export your branch to a series of patch files, and
attach those to an email to the dxf2gcode-dev mailing list.


--
Sebastian Kuzminsky

Samuel Luckenbill

unread,
Apr 12, 2018, 12:05:15 PM4/12/18
to Sebastian Kuzminsky, dxf2gc...@googlegroups.com
I cloned dxf2gcode from sourceforge. Is it on github too? 

Does sourceforge have a way to submit a pull request?

Christian Kohlöffel

unread,
Apr 12, 2018, 1:23:01 PM4/12/18
to 'Timo Birnschein' via dxf2gcode-dev
Hi Sam, 

For sure, we want that patch. There are several ways how to participate. If you plan to make several commits it would be the best to grant you developer rights to the project.

If you agree, please send me your SourceForge account.
 
Regards Christian

--
--
You received this message because you subscribed to the Google
Groups-group "dxf2gcode-dev".
To post a message, send mail to dxf2gc...@googlegroups.com
To unsubscribe, send mail to dxf2gcode-de...@googlegroups.com
See http://groups.google.de/group/dxf2gcode-dev?hl=en for more options
and the dxf2gcode project page at http://code.google.com/p/dxf2gcode/
---
You received this message because you are subscribed to the Google Groups "dxf2gcode-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dxf2gcode-de...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sebastian Kuzminsky

unread,
Apr 12, 2018, 1:49:26 PM4/12/18
to dxf2gc...@googlegroups.com
On 04/12/2018 10:05 AM, Samuel Luckenbill wrote:
> I cloned dxf2gcode from sourceforge. Is it on github too?

No, dxf2gcode is developed on Source Forge. There may be forks on
github, but SF has the official repo.


> Does sourceforge have a way to submit a pull request?

Yes, i believe so, though I've never used it personally and I don't know
how well it works. I would guess it's something like this:

* Log in to SourceForge with your SF account.

* Go to the dxf2gcode project, click "Fork".

* Add your SF repo as a remote in your local clone.

* Push your branch to your SF repo.

* Make a merge request from your branch to the main "develop" branch.


Warning: Untested! I'm more of a github guy...


--
Sebastian Kuzminsky

ma...@tillheilmann.info

unread,
Jun 27, 2018, 2:43:48 PM6/27/18
to dxf2gcode-dev
So I tried building dxf2gcode on my Mac (OS X 10.11.6). I have made some progress, but still no cigar.

The first hurdle is that make_tr.py and make_py_uic.py don’t know about Mac OS/Darwin as a platform, so I had to tell them in lines 11 and 27, respectively, like this:

    if "linux" in sys.platform.lower() or "unix" in sys.platform.lower() or "darwin" in sys.platform.lower():

Also, Mac OS doesn’t like \\ in path names, so in setup.py I had to change line 51 like this:

    icon="images/DXF2GCODE-001.ico",

Another thing is that the paths to the dependencies (installed on my machine through Homebrew and Homebrew’s python3 in /usr/local/Cellar/python/ and /usr/local/opt/python and Qt5 in /usr/local/Cellar/qt/ and /usr/local/opt/qt/) are not found. I guess this is a problem of my environment, not of dxf2gcode.

In make_tr.py I added the path to the lrelease binary in line 16 like this:

    names = ["/usr/bin/lrelease-qt5", "/usr/bin/lrelease5", "/usr/bin/lrelease", "/usr/local/opt/qt/bin/lrelease"]

In setup.py I had to change the path to PyOpenGL in line 21 like this:

    path_base = "/usr/local/lib/python3.6/site-packages/OpenGL"

The remaining problem is that setup.py does not find QtCore (and some modules are reported as missing as well, see terminal output at the end of this message). It looks for the file here:

    /usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/QtCore.framework/Versions/5/QtCore

I guess this is because it derives this path from the path of the python installation used to execute setup.py (/usr/local/Cellar/python/). But on my machine, QtCore is actually here:

    Tills-MacBook-Air:dxf2gcode-20170925 admin$ find /usr -iname QtCore
    /usr/local/Cellar/qt/5.11.1/include/QtCore
    /usr/local/Cellar/qt/5.11.1/lib/QtCore.framework/QtCore
    /usr/local/Cellar/qt/5.11.1/lib/QtCore.framework/Versions/5/Headers/5.11.1/QtCore
    /usr/local/Cellar/qt/5.11.1/lib/QtCore.framework/Versions/5/Headers/QtCore
    /usr/local/Cellar/qt/5.11.1/lib/QtCore.framework/Versions/5/QtCore
    /usr/local/lib/python3.6/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore

I do not know how to tell setup.py the correct path to QtCore. Any ideas?

Thanks!
Till

Tills-MacBook-Air:dxf2gcode-20170925 admin$ python3 ./setup.py bdist_dmg
running bdist_dmg
running bdist_mac
running build
running build_exe
Missing modules:
? OpenGL.platform.PLATFORM imported from OpenGL.GLU.glunurbs, OpenGL.GLU.quadrics, OpenGL.GLU.tess, OpenGL.raw.GL._errors, OpenGL.raw.GL._types
? OpenGL.platform.createBaseFunction imported from OpenGL.GLU.quadrics, OpenGL.GLU.tess
? OpenGL_accelerate imported from OpenGL.acceleratesupport
? OpenGL_accelerate.arraydatatype imported from OpenGL.arrays.arraydatatype, OpenGL.arrays.arrayhelpers, OpenGL.converters
? OpenGL_accelerate.errorchecker imported from OpenGL.error
? OpenGL_accelerate.latebind imported from OpenGL.latebind, OpenGL.wrapper
? OpenGL_accelerate.vbo imported from OpenGL.arrays.vbo
? OpenGL_accelerate.wrapper imported from OpenGL.arrays.arrayhelpers, OpenGL.converters, OpenGL.wrapper
? PyQt4 imported from core.arcgeo, core.project, core.shape, dxf2gcode__main__, dxfimport.geoent_arc, dxfimport.geoent_circle, dxfimport.geoent_line, dxfimport.importer, globals.config, globals.constants, gui.aboutdialog, gui.arrow, gui.canvas, gui.canvas2d, gui.configwindow, gui.messagebox, gui.popupdialog, gui.routetext, gui.treehandling, gui.treeview, gui.wpzero, postpro.postprocessor, postpro.postprocessorconfig, postpro.tspoptimisation
? PyQt4.QtCore imported from gui.configwindow, postpro.breaks
? PyQt4.QtGui imported from dxf2gcode__main__, dxfimport.importer, gui.aboutdialog, gui.arrow, gui.canvas, gui.canvas2d, gui.configwindow, gui.messagebox, gui.popupdialog, gui.routetext, gui.treehandling, gui.treeview, gui.wpzero, postpro.postprocessor
? StringIO imported from globals.six
? __main__ imported from bdb, pdb
? _abcoll imported from globals.ordereddict
? _dummy_threading imported from dummy_threading
? _frozen_importlib imported from importlib, importlib.abc
? _frozen_importlib_external imported from importlib, importlib._bootstrap, importlib.abc
? _winapi imported from subprocess
? _winreg imported from platform
? compiler imported from globals.configobj.configobj
? dummy_thread imported from globals.ordereddict
? dxf2gcode_ui4 imported from dxf2gcode__main__
? java.lang imported from platform
? msvcrt imported from subprocess
? nt imported from ntpath, os, shutil
? numpy imported from OpenGL.arrays.vbo
? org.python.core imported from copy, pickle
? os.path imported from os, pkgutil, py_compile, tracemalloc, unittest, unittest.util
? thread imported from globals.ordereddict
? vms_lib imported from platform
? winreg imported from mimetypes, platform
This is not necessarily a problem - the modules may not be needed on this platform.

Copying data from package OpenGL...
Copying data from package PyQt5...
error: [Errno 2] No such file or directory: '/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/QtCore.framework/Versions/5/QtCore'

ma...@tillheilmann.info

unread,
Jun 29, 2018, 4:43:15 AM6/29/18
to dxf2gcode-dev
PS: Setting PYTHONPATH to /usr/local/lib/python3.6/ or /usr/local/lib/python3.6/site-packages did not help.

Samuel Luckenbill

unread,
Jun 29, 2018, 8:31:59 PM6/29/18
to dxf2gc...@googlegroups.com
I have some git branches that fix some bugs and make it build on mac. I decided not to use dxf2gcode, so stopped working on it, but I have attached the patches if someone wants to deal with committing them.


--
--
You received this message because you subscribed to the Google
Groups-group "dxf2gcode-dev".
To post a message, send mail to dxf2gc...@googlegroups.com
To unsubscribe, send mail to dxf2gcode-dev+unsubscribe@googlegroups.com

See http://groups.google.de/group/dxf2gcode-dev?hl=en for more options
and the dxf2gcode project page at http://code.google.com/p/dxf2gcode/
---
You received this message because you are subscribed to the Google Groups "dxf2gcode-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dxf2gcode-dev+unsubscribe@googlegroups.com.
macos_build.patch
header_flag_fix.patch
carriage_return.patch
Reply all
Reply to author
Forward
0 new messages