forked from unitaryfund/mitiq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change the way version info is handled in packaging (unitaryfund#247)
* Add .python-version to .gitignore for pyenv * Add VERSION.txt to MANIFEST.in so it can be used in packaging * Add version.py file that gets overwritten when packaging * Overwrite and restore version.py in setup.py * Import from version.py in __init__.py rather than parsing VERSION.txt
- Loading branch information
Showing
5 changed files
with
26 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
.DS_Store | ||
.vscode | ||
.python-version | ||
.idea/ | ||
.coverage* | ||
*.dat | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
""" | ||
NOTE: This file will be overwritten by the packaging process. | ||
""" | ||
import os | ||
|
||
directory_of_this_file = os.path.dirname(os.path.abspath(__file__)) | ||
|
||
with open(f"{directory_of_this_file}/../VERSION.txt", "r") as f: | ||
__version__ = f.read().strip() |
This file contains 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