Skip to content

feat(//py): Add the git revision to non release builds #678

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2021

Conversation

narendasan
Copy link
Collaborator

Adds the revision to dev builds for python

Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
@narendasan narendasan merged commit b683b6e into master Oct 20, 2021
@narendasan narendasan deleted the python_packaging_feats branch October 20, 2021 16:40
@github-actions github-actions bot added the component: api [Python] Issues re: Python API label Oct 20, 2021
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some changes that do not conform to Python style guidelines:

--- /workspace/py/setup.py	(original)
+++ /workspace/py/setup.py	(reformatted)
@@ -24,14 +24,15 @@

__version__ = '0.5.0a0'

+
def get_git_revision_short_hash() -> str:
    return subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).decode('ascii').strip()
+

if "--release" not in sys.argv:
    __version__ = __version__ + "+" + get_git_revision_short_hash()
else:
    sys.argv.remove("--release")
-

if "--use-cxx11-abi" in sys.argv:
    sys.argv.remove("--use-cxx11-abi")
Reformatting /workspace/py/setup.py
Reformatting /workspace/py/trtorch/logging.py
Reformatting /workspace/py/trtorch/_compile_spec.py
Reformatting /workspace/py/trtorch/__init__.py
Reformatting /workspace/py/trtorch/ptq.py
Reformatting /workspace/py/trtorch/Input.py
Reformatting /workspace/py/trtorch/_types.py
Reformatting /workspace/py/trtorch/_compiler.py
Reformatting /workspace/py/trtorch/Device.py
ERROR: Some files do not conform to style guidelines

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code conforms to C++ style guidelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: api [Python] Issues re: Python API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant