From d85c796dcc2a798fc701cf3e935d4461127eea20 Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Fri, 3 Jan 2025 13:47:28 +0100 Subject: [PATCH] v0.6.3-a2, added __version__, version in pypi is now dynamic. --- CHANGELOG.md | 5 ++++- pyproject.toml | 11 ++++++++++- src/optima35/__init__.py | 1 + src/optima35/core.py | 5 +++-- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c24243b..b0dca39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,10 @@ # Changelog ## 0.6.x -### 0.6.3a1 +### 0.6.3-a2 +- Adding __version__ to `__init__.py` so version is automaticly updated in program as well as pypi. + +### 0.6.3-a1 - Adding postfix a to indicate alpha version, making it clear that it is in an early state ### 0.6.2 diff --git a/pyproject.toml b/pyproject.toml index 9f07ed0..b6e50a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "optima35" -version = "0.6.3-a1" +dynamic = ["version"] authors = [{ name = "Mr. Finchum" }] description = "OPTIMA35 is a package to modify images with pillow and piexif." readme = "README.md" @@ -18,3 +18,12 @@ classifiers = [ [project.urls] Homepage = "https://gitlab.com/CodeByMrFinchum/optima35" + +[project.scripts] +optima35 = "optima35.__main__:main" + +[tool.hatch.build.targets.wheel] +packages = ["src/optima35"] + +[tool.hatch.version] +path = "src/optima35/__init__.py" diff --git a/src/optima35/__init__.py b/src/optima35/__init__.py index e69de29..ccaf771 100644 --- a/src/optima35/__init__.py +++ b/src/optima35/__init__.py @@ -0,0 +1 @@ +__version__ = "0.6.3-a2" diff --git a/src/optima35/core.py b/src/optima35/core.py index 5db74e2..e7e122e 100644 --- a/src/optima35/core.py +++ b/src/optima35/core.py @@ -2,11 +2,12 @@ import re import os from datetime import datetime from optima35.image_handler import ImageProcessor, ExifHandler +from optima35 import __version__ class OptimaManager: def __init__(self): - self.name = "OPTIMA-35" - self.version = "0.6.3-a1" + self.name = "OPTIMA35" + self.version = __version__ self.image_processor = ImageProcessor() self.exif_handler = ExifHandler()