-
Notifications
You must be signed in to change notification settings - Fork 18
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
Cs/sc 3351 compile det exe linux #236
Changes from 1 commit
1d63cf7
eb641e4
da90bef
860b048
95d3e92
65b2bcb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import os | ||
|
||
# This env variable is used to alter bundled behaviour | ||
os.environ['DET_EXECUTABLE'] = '1' |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,9 @@ def stored_version(): | |
|
||
|
||
def git_version(): | ||
if os.environ.get('DET_EXECUTABLE'): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was added so that running the binary will not output an error saying "git was not found". It's expected that folks using the binary might not have git installed so deducing the version from git as is done in this function is redundant for the bundled environment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This shouldn't be an issue for built versions of the tools since we write the version to a file and use that in preference to the git version. |
||
return None | ||
|
||
described_version_bytes = subprocess.Popen( | ||
['git', 'describe'], | ||
stdout=subprocess.PIPE | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was an issue where the version is not set, so doing
don't work; maybe something to look into in the future. Not sure how important it is right now since we're able to simply run
pip install commcare-export
(of course, runningpip install commcare-export
assumes the newest version is already pushed to pypi, which at this stage during the release process should be true).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need
-e
. And depending on the version of Python, you might need setuptools too:Disclaimer: I have not tested this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion. I tried it, but alas...it didn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried various other ways which was also a dead end or just unfeasible in the long run...I don't think this issue is really blocking, just annoying (let me know if you disagree), so I'll create a ticket to address it.