-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #212 from jim-easterbrook/devel
Devel
- Loading branch information
Showing
3 changed files
with
24 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
## Photini - a simple photo metadata editor. | ||
## http://github.com/jim-easterbrook/Photini | ||
## Copyright (C) 2019 Jim Easterbrook [email protected] | ||
## Copyright (C) 2019-23 Jim Easterbrook [email protected] | ||
## | ||
## This program is free software: you can redistribute it and/or | ||
## modify it under the terms of the GNU General Public License as | ||
|
@@ -22,8 +22,24 @@ | |
""" | ||
|
||
import os | ||
import sys | ||
|
||
src_dir = os.path.dirname(__file__) | ||
version_file = os.path.join(src_dir, 'photini', '_version.py') | ||
if not os.path.exists(version_file): | ||
try: | ||
from setuptools_scm import _get_version | ||
from setuptools_scm.config import Configuration | ||
_get_version(Configuration.from_file( | ||
os.path.join(os.path.dirname(src_dir), 'pyproject.toml'))) | ||
except ImportError: | ||
with open(version_file, 'w') as f: | ||
f.write('''# file generated by run_photini.py | ||
# don't track in version control | ||
version = '0.0.0+unknown' | ||
''') | ||
|
||
from photini.editor import main | ||
|
||
if __name__ == "__main__": | ||
|