Skip to content

Commit

Permalink
Update version resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamWhittingham committed Oct 25, 2023
1 parent 5b6c66e commit 441aa39
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
CURRENT_VERSION:=$(shell grep "^Version: " PKG-INFO | cut -d" " -f2)
INIT_VERSION:=$(shell grep "version" ./pyproject.toml | cut -d"=" -f2 | tr -d '"[:blank:]' )

INIT_VERSION:=$(shell grep "__version__" pycronofy/__init__.py | cut -d"'" -f2)

.PHONY: all
all: test
Expand Down
4 changes: 1 addition & 3 deletions pycronofy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from pycronofy.client import Client # noqa: F401
from pycronofy import settings
import importlib

__version__ = '2.0.0'
__name__ = 'PyCronofy'
__version__ = importlib.metadata.version(__package__ or __name__)

"""
SDK for Cronofy - the Scheduling Platform for Business
Expand Down
Empty file removed pycronofy/tests/__init__.py
Empty file.
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "PyCronofy"
version = "2.0.0"
dynamic = ["version"]
requires-python = ">=3.7"
dependencies = [
"requests>=2.20.0",
Expand All @@ -12,6 +12,9 @@ authors = [
{name = "Cronofy", email = "[email protected]"},
]

[tool.setuptools.dynamic]
version = {attr = "package.__version__"}

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ requests>=2.21.0
pytz>=2018.9

pytest>=6.2.4
pytest-cov>=2.12.1
pytest-cov>=4.1
responses>=0.5.0
twine>=4.0.2
flake8

0 comments on commit 441aa39

Please sign in to comment.