diff --git a/osxphotos/_version.py b/osxphotos/_version.py new file mode 100644 index 00000000..a57f56a3 --- /dev/null +++ b/osxphotos/_version.py @@ -0,0 +1,4 @@ +""" version info """ + +__version__ = "0.14.13" + diff --git a/setup.py b/setup.py index 049a0aa1..2a3f27c4 100755 --- a/setup.py +++ b/setup.py @@ -26,19 +26,22 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -# from distutils.core import setup -from setuptools import setup, find_packages +import os +from setuptools import find_packages, setup -# read the contents of README file -from os import path - -this_directory = path.abspath(path.dirname(__file__)) -with open(path.join(this_directory, "README.md"), encoding="utf-8") as f: +this_directory = os.path.abspath(os.path.dirname(__file__)) +with open(os.path.join(this_directory, "README.md"), encoding="utf-8") as f: long_description = f.read() +about = {} +with open( + os.path.join(this_directory, "osxphotos", "_version.py"), mode="r", encoding="utf-8" +) as f: + exec(f.read(), about) + setup( name="osxphotos", - version="0.14.12", + version=about["__version__"], description="Manipulate (read-only) Apple's Photos app library on Mac OS X", long_description=long_description, long_description_content_type="text/markdown",