bobbai00 commented on code in PR #5417:
URL: https://github.com/apache/texera/pull/5417#discussion_r3369701808


##########
bin/licensing/generate_notice_binary.py:
##########
@@ -0,0 +1,215 @@
+#!/usr/bin/env python3
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+"""Generate a NOTICE-binary for a service from its bundled jars' 
META-INF/NOTICE
+files.
+
+The output starts with the project's own NOTICE (Texera ASF header), then
+emits one block per unique META-INF/NOTICE content (deduped by SHA-1 hash
+across the jars in the given lib dirs). Each block is headed by a synthesized
+project name derived from the longest common prefix of its members' Maven
+coordinates, plus the list of contributing jars.
+
+Blocks are sorted by jar count (largest cluster first), with hash as a stable
+tiebreaker.
+
+Optional `--extras <file>` appends a verbatim text file at the end. Use this
+for non-jar attributions (Apache-2.0 Python wheels like aiohttp, Matplotlib)
+that don't ship a NOTICE inside any jar.
+
+Usage:
+  generate_notice_binary.py <output> <lib-dir-1> [<lib-dir-2> ...] [--extras 
<file>] [--project-notice <NOTICE>]
+"""
+from __future__ import annotations

Review Comment:
   added



-- 
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