# setup.py installs the dot2tex binary via two mechanisms:
#
#   1. scripts=['dot2tex/dot2tex'] — copies the raw script file directly to
#      bin/. That file uses a relative import (from .dot2tex import main)
#      which fails with "attempted relative import with no known parent
#      package" when the script is executed outside of its package context.
#
#   2. entry_points console_scripts — pip generates a proper wrapper that
#      uses an absolute import (from dot2tex.dot2tex import main), which
#      works correctly.
#
# With both present, pip (pep517) installs both to the same path, causing a
# duplicate-file error in MacPorts destroot (trac#65871). The previous
# workaround was python.pep517 no, but that lets the broken raw script win.
#
# The correct fix is to remove the redundant scripts entry and keep pep517
# enabled so that only the proper entry_points wrapper is installed.

--- setup.py
+++ setup.py
@@ -25,7 +25,6 @@
       author_email='kjellmf@gmail.com',
       url="https://github.com/kjellmf/dot2tex",
       py_modules=['dot2tex.dot2tex', 'dot2tex.dotparsing'],
-      scripts=['dot2tex/dot2tex'],
       classifiers=[
           'Development Status :: 4 - Beta',
           'Environment :: Console',
