Fix package_data for gvpr and empty BOM crash
Some checks are pending
Create Examples / build (ubuntu-latest, 3.9) (push) Waiting to run
Create Examples / build (ubuntu-22.04, 3.7) (push) Waiting to run
Create Examples / build (ubuntu-22.04, 3.8) (push) Waiting to run
Create Examples / build (ubuntu-latest, 3.10) (push) Waiting to run
Create Examples / build (ubuntu-latest, 3.11) (push) Waiting to run
Create Examples / build (ubuntu-latest, 3.12) (push) Waiting to run
Some checks are pending
Create Examples / build (ubuntu-latest, 3.9) (push) Waiting to run
Create Examples / build (ubuntu-22.04, 3.7) (push) Waiting to run
Create Examples / build (ubuntu-22.04, 3.8) (push) Waiting to run
Create Examples / build (ubuntu-latest, 3.10) (push) Waiting to run
Create Examples / build (ubuntu-latest, 3.11) (push) Waiting to run
Create Examples / build (ubuntu-latest, 3.12) (push) Waiting to run
- Include *.gvpr files in package_data so wv_gvpr.gvpr ships in the wheel distribution (reported by web-ui integration agent) - Guard generate_html_output() against empty BOM list to prevent IndexError when YAML has no connectors/cables
This commit is contained in:
parent
31db67921a
commit
5e2634e7b8
2
setup.py
2
setup.py
@ -29,7 +29,7 @@ setup(
|
|||||||
keywords="cable connector hardware harness wiring wiring-diagram wiring-harness",
|
keywords="cable connector hardware harness wiring wiring-diagram wiring-harness",
|
||||||
url=APP_URL,
|
url=APP_URL,
|
||||||
package_dir={"": "src"},
|
package_dir={"": "src"},
|
||||||
package_data={CMD_NAME: ["templates/*.html"]},
|
package_data={CMD_NAME: ["templates/*.html", "*.gvpr"]},
|
||||||
packages=find_packages("src"),
|
packages=find_packages("src"),
|
||||||
entry_points={
|
entry_points={
|
||||||
"console_scripts": [
|
"console_scripts": [
|
||||||
|
|||||||
@ -107,6 +107,7 @@ def generate_html_output(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# generate BOM table
|
# generate BOM table
|
||||||
|
if bom:
|
||||||
# generate BOM header (may be at the top or bottom of the table)
|
# generate BOM header (may be at the top or bottom of the table)
|
||||||
bom_header_html = " <tr>\n"
|
bom_header_html = " <tr>\n"
|
||||||
for item in bom[0]:
|
for item in bom[0]:
|
||||||
@ -133,6 +134,9 @@ def generate_html_output(
|
|||||||
+ bom_header_html
|
+ bom_header_html
|
||||||
+ "</table>\n"
|
+ "</table>\n"
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
bom_html = ""
|
||||||
|
bom_html_reversed = ""
|
||||||
|
|
||||||
# prepare simple replacements
|
# prepare simple replacements
|
||||||
replacements = {
|
replacements = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user