-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathpatch-remove-scripts-entry.diff
More file actions
28 lines (27 loc) · 1.21 KB
/
patch-remove-scripts-entry.diff
File metadata and controls
28 lines (27 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# 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='[email protected]',
url="https://github.com/kjellmf/dot2tex",
py_modules=['dot2tex.dot2tex', 'dot2tex.dotparsing'],
- scripts=['dot2tex/dot2tex'],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',