fix: pyinstaller binaries - #4486
Merged
Merged
Conversation
- With the inclusion of `cfn-lint` as a dependency. There are data files, python files that need to be included for `cfn-lint`. - One of the dependencies brought in by `cfn-lint` is `pbr`, this in turn has a dependency on `jschema-to-python`. The way around is to explictly set `PBR_VERSION` as per https://docs.openstack.org/pbr/latest/user/packagers.html. However this solution is brittle and will leak dependency code into AWS SAM CLI codebase, the cleaner solution is to package it only for `pyinstaller`.
mndeveci
approved these changes
Dec 15, 2022
qingchm
approved these changes
Dec 15, 2022
Contributor
|
Is there a PR to add jschema_to_python into the hidden_imports list? Or do we only need the data files from jschema_to_python but not the library itself? |
Contributor
|
Also the same question goes for cfn-lint, do we only need cfn-lint.rules in https://github.com/aws/aws-sam-cli/blob/develop/installer/pyinstaller/hidden_imports.py or should we have the entire cfn-lint as a hidden import? |
Contributor
Author
|
Yeah we only need the metadata files for Good question on the second one, we do need the python files as well. Haven't tried playing around, I can do that tomorrow. |
- `cfnlint` fully importable package and removed from `hidden_imports`. - `jschema-to-python` only import data files and package metadata.
sriram-mv
force-pushed
the
fix_pyinstaller_cfn_lint
branch
from
December 15, 2022 18:01
cabf4b8 to
25113b5
Compare
mndeveci
added a commit
to mndeveci/aws-sam-cli
that referenced
this pull request
Dec 16, 2022
This reverts commit b8a939d.
mndeveci
added a commit
that referenced
this pull request
Dec 17, 2022
* Revert "fix: `hooks` data imports for pyinstaller (#4491)" This reverts commit bea3bc0. * Revert "fix: Update expected message read validate lint integration test (#4488)" This reverts commit abd7c03. * Revert "Update lint helpand output message (#4489)" This reverts commit 3304955. * Revert "fix: `pyinstaller` binaries (#4486)" This reverts commit b8a939d. * Revert "fix: Fix validate command integration tests console output missmatch and update pyyaml version requirement (#4479)" This reverts commit ce7143c. * Revert "Adding cfn-lint as optional parameter for SAM validate command (#4444)" This reverts commit 2fd533f.
mndeveci
pushed a commit
to mndeveci/aws-sam-cli
that referenced
this pull request
Dec 19, 2022
* fix: `pyinstaller` binaries - With the inclusion of `cfn-lint` as a dependency. There are data files, python files that need to be included for `cfn-lint`. - One of the dependencies brought in by `cfn-lint` is `pbr`, this in turn has a dependency on `jschema-to-python`. The way around is to explictly set `PBR_VERSION` as per https://docs.openstack.org/pbr/latest/user/packagers.html. However this solution is brittle and will leak dependency code into AWS SAM CLI codebase, the cleaner solution is to package it only for `pyinstaller`. * deps: cfnlint to be fully importable. - `cfnlint` fully importable package and removed from `hidden_imports`. - `jschema-to-python` only import data files and package metadata.
mndeveci
added a commit
to mndeveci/aws-sam-cli
that referenced
this pull request
Dec 19, 2022
* Revert "fix: `hooks` data imports for pyinstaller (aws#4491)" This reverts commit bea3bc0. * Revert "fix: Update expected message read validate lint integration test (aws#4488)" This reverts commit abd7c03. * Revert "Update lint helpand output message (aws#4489)" This reverts commit 3304955. * Revert "fix: `pyinstaller` binaries (aws#4486)" This reverts commit b8a939d. * Revert "fix: Fix validate command integration tests console output missmatch and update pyyaml version requirement (aws#4479)" This reverts commit ce7143c. * Revert "Adding cfn-lint as optional parameter for SAM validate command (aws#4444)" This reverts commit 2fd533f.
mndeveci
pushed a commit
to mndeveci/aws-sam-cli
that referenced
this pull request
Dec 19, 2022
* fix: `pyinstaller` binaries - With the inclusion of `cfn-lint` as a dependency. There are data files, python files that need to be included for `cfn-lint`. - One of the dependencies brought in by `cfn-lint` is `pbr`, this in turn has a dependency on `jschema-to-python`. The way around is to explictly set `PBR_VERSION` as per https://docs.openstack.org/pbr/latest/user/packagers.html. However this solution is brittle and will leak dependency code into AWS SAM CLI codebase, the cleaner solution is to package it only for `pyinstaller`. * deps: cfnlint to be fully importable. - `cfnlint` fully importable package and removed from `hidden_imports`. - `jschema-to-python` only import data files and package metadata.
mndeveci
added a commit
to mndeveci/aws-sam-cli
that referenced
this pull request
Dec 19, 2022
* Revert "fix: `hooks` data imports for pyinstaller (aws#4491)" This reverts commit bea3bc0. * Revert "fix: Update expected message read validate lint integration test (aws#4488)" This reverts commit abd7c03. * Revert "Update lint helpand output message (aws#4489)" This reverts commit 3304955. * Revert "fix: `pyinstaller` binaries (aws#4486)" This reverts commit b8a939d. * Revert "fix: Fix validate command integration tests console output missmatch and update pyyaml version requirement (aws#4479)" This reverts commit ce7143c. * Revert "Adding cfn-lint as optional parameter for SAM validate command (aws#4444)" This reverts commit 2fd533f.
mndeveci
pushed a commit
to mndeveci/aws-sam-cli
that referenced
this pull request
Dec 19, 2022
* fix: `pyinstaller` binaries - With the inclusion of `cfn-lint` as a dependency. There are data files, python files that need to be included for `cfn-lint`. - One of the dependencies brought in by `cfn-lint` is `pbr`, this in turn has a dependency on `jschema-to-python`. The way around is to explictly set `PBR_VERSION` as per https://docs.openstack.org/pbr/latest/user/packagers.html. However this solution is brittle and will leak dependency code into AWS SAM CLI codebase, the cleaner solution is to package it only for `pyinstaller`. * deps: cfnlint to be fully importable. - `cfnlint` fully importable package and removed from `hidden_imports`. - `jschema-to-python` only import data files and package metadata.
mndeveci
added a commit
to mndeveci/aws-sam-cli
that referenced
this pull request
Dec 19, 2022
* Revert "fix: `hooks` data imports for pyinstaller (aws#4491)" This reverts commit bea3bc0. * Revert "fix: Update expected message read validate lint integration test (aws#4488)" This reverts commit abd7c03. * Revert "Update lint helpand output message (aws#4489)" This reverts commit 3304955. * Revert "fix: `pyinstaller` binaries (aws#4486)" This reverts commit b8a939d. * Revert "fix: Fix validate command integration tests console output missmatch and update pyyaml version requirement (aws#4479)" This reverts commit ce7143c. * Revert "Adding cfn-lint as optional parameter for SAM validate command (aws#4444)" This reverts commit 2fd533f.
mndeveci
pushed a commit
to mndeveci/aws-sam-cli
that referenced
this pull request
Dec 19, 2022
* fix: `pyinstaller` binaries - With the inclusion of `cfn-lint` as a dependency. There are data files, python files that need to be included for `cfn-lint`. - One of the dependencies brought in by `cfn-lint` is `pbr`, this in turn has a dependency on `jschema-to-python`. The way around is to explictly set `PBR_VERSION` as per https://docs.openstack.org/pbr/latest/user/packagers.html. However this solution is brittle and will leak dependency code into AWS SAM CLI codebase, the cleaner solution is to package it only for `pyinstaller`. * deps: cfnlint to be fully importable. - `cfnlint` fully importable package and removed from `hidden_imports`. - `jschema-to-python` only import data files and package metadata.
mndeveci
added a commit
to mndeveci/aws-sam-cli
that referenced
this pull request
Dec 19, 2022
* Revert "fix: `hooks` data imports for pyinstaller (aws#4491)" This reverts commit bea3bc0. * Revert "fix: Update expected message read validate lint integration test (aws#4488)" This reverts commit abd7c03. * Revert "Update lint helpand output message (aws#4489)" This reverts commit 3304955. * Revert "fix: `pyinstaller` binaries (aws#4486)" This reverts commit b8a939d. * Revert "fix: Fix validate command integration tests console output missmatch and update pyyaml version requirement (aws#4479)" This reverts commit ce7143c. * Revert "Adding cfn-lint as optional parameter for SAM validate command (aws#4444)" This reverts commit 2fd533f.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the inclusion of
cfn-lintas a dependency. There are data files, python files that need to be included forcfn-lint.One of the dependencies brought in by
cfn-lintispbr, this in turn has a dependency onjschema-to-python. The way around it is to explictly setPBR_VERSIONas per https://docs.openstack.org/pbr/latest/user/packagers.html. However this solution is brittle and will leak dependency code into AWS SAM CLI codebase, the cleaner solution is to packagejschema-to-pythonmetadata only for pyinstaller instead.Which issue(s) does this change fix?
N/A
Why is this change necessary?
How does it address the issue?
What side effects does this change have?
Mandatory Checklist
PRs will only be reviewed after checklist is complete
make prpassesmake update-reproducible-reqsif dependencies were changedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.