Skip to content

Commit

Permalink
Provide migration instructions from egg.mk to wheel.mk
Browse files Browse the repository at this point in the history
Thanks to adam@ for preparing the instructions, I added a few more
details.
  • Loading branch information
rillig committed Dec 17, 2023
1 parent 61d79ef commit 21fdd46
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion v23/mklinechecker.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,36 @@ func (ck MkLineChecker) checkIncludePythonWheel() {
mkline.Warnf("Python egg.mk is deprecated, use wheel.mk instead.")
mkline.Explain(
"https://packaging.python.org/en/latest/discussions/wheel-vs-egg/",
"describes the difference between the formats.")
"describes the difference between the formats.",
"",
"To migrate a package from egg.mk to wheel.mk,",
"here's a rough guide:",
"",
"1. If the distfile contains pyproject.toml,",
"look for build requirements and add them as TOOL_DEPENDS",
"",
"2. If there is no pyproject.toml,",
"and there is only setup.py, add:",
"",
"\tTOOL_DEPENDS+=\t${PYPKGPREFIX}"+
"-setuptools-[0-9]*:../../devel/py-setuptools",
"\tTOOL_DEPENDS+=\t${PYPKGPREFIX}"+
"-wheel-[0-9]*:../../devel/py-wheel",
"",
"Generally, if setuptools is required to build,",
"wheel is also needed.",
"",
"wheel.mk also provides py-test as TEST_DEPENDS",
"and a test target (do-test),",
"so remove these if they have become redundant.",
"",
sprintf("Run %q,", bmake("package")),
"which will complain about mismatches in the PLIST.",
sprintf("Run %q", bmake("print-plist > PLIST")),
"to regenerate the PLIST from the actually installed files.",
"The typical differences are that the files in EGG_INFODIR",
"are replaced with files in WHEEL_INFODIR.",
"Also, there may be new files py.typed appearing.")
}
}
}
Expand Down

0 comments on commit 21fdd46

Please sign in to comment.