File tree Expand file tree Collapse file tree 4 files changed +19
-5
lines changed Expand file tree Collapse file tree 4 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ test: ## run test suite
3636# RELEASE
3737# ###############################################################################
3838
39+ .PHONY : bump-version
40+ bump-version : # # bump the package version (uses VERSION)
41+ sed -i ' ' " s/__version__ = \" .*\" /__version__ = \" $( VERSION) \" /" $(SRC ) /dependency_injection/_version.py
42+
3943.PHONY : build
4044build : # # build the python package
4145 pipenv run python setup.py sdist bdist_wheel
Original file line number Diff line number Diff line change 1515
1616sys .path .insert (0 , os .path .abspath ("../src/" ))
1717
18+ from dependency_injection ._version import __version__ # noqa: E402
19+
1820
1921# -- Auto doc generation -----
2022
3133copyright = "2025, David Runemalm"
3234author = "David Runemalm"
3335
34- # The version
35- version = "1.0"
36+ # Short X.Y version
37+ version = __version__ . split ( "-" )[ 0 ]
3638
37- # The full version, including alpha/beta/rc tags
38- release = "1.0.0-beta.3"
39+ # Full version string
40+ release = __version__
3941
4042
4143# -- General configuration ---------------------------------------------------
Original file line number Diff line number Diff line change 1+ import os
2+
13from setuptools import find_packages
24from setuptools import setup
35
6+
7+ version = {}
8+ with open (os .path .join ("src" , "dependency_injection" , "_version.py" )) as f :
9+ exec (f .read (), version )
10+
411with open ("README.md" , "r" , encoding = "utf-8" ) as fh :
512 long_description = fh .read ()
613
714setup (
815 name = "py-dependency-injection" ,
9- version = "1.0.0-beta.3" ,
16+ version = version [ "__version__" ] ,
1017 author = "David Runemalm, 2025" ,
1118 author_email = "david.runemalm@gmail.com" ,
1219 description = "A dependency injection library for Python." ,
Original file line number Diff line number Diff line change 1+ __version__ = "1.0.0-beta.3"
You can’t perform that action at this time.
0 commit comments