JingsongLi commented on code in PR #97:
URL: https://github.com/apache/paimon-mosaic/pull/97#discussion_r4070110980


##########
python/setup.py:
##########
@@ -53,6 +61,31 @@ def _find_native_lib():
     return None
 
 
+def _stage_legal_files(destination_dir):
+    here = os.path.dirname(os.path.abspath(__file__))
+    staged = []
+
+    for name in LEGAL_FILES:
+        source = os.path.join(here, LEGAL_SOURCE_FILES[name])
+        destination = os.path.join(destination_dir, name)
+        if not os.path.isfile(source):
+            raise RuntimeError(f"required binary legal file is missing: 
{source}")

Review Comment:
   [P2] Allow legal-file staging from the generated sdist
   
   The generated sdist contains `LICENSE`, `NOTICE`, and `LICENSE-binary` 
alongside `setup.py`, but this code always requires the parent repository 
copies before checking those bundled files. Consequently, `python -m pip wheel 
--no-build-isolation --no-deps <generated-sdist.tar.gz>` now fails during 
metadata generation with `RuntimeError: required binary legal file is missing: 
.../../LICENSE`; the same packaging round trip succeeds on the base commit. 
This also breaks the default `python -m build` flow, which builds the wheel 
from an extracted sdist. Please use the canonical repository sources when 
available and fall back to the legal files bundled in the sdist when rebuilding 
it, including when staging into `mosaic/`, and cover the sdist-to-wheel round 
trip in a regression test.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to