File tree Expand file tree Collapse file tree 8 files changed +21
-21
lines changed
Expand file tree Collapse file tree 8 files changed +21
-21
lines changed Original file line number Diff line number Diff line change 2323 run : python3 setup.py install --user
2424 - name : verify we can import
2525 run : python3 -c "from datemath import datemath; print(datemath('now-1d'))"
26+ - name : verify our version
27+ run : python3 -c "import datemath; print(datemath.__version__)"
Original file line number Diff line number Diff line change @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ 3.0.3] - 2024-09-12
9+ Please use 3.0.3 going forward! 3.0.2 has a breaking bug.
10+
11+ ### fixed
12+ - Fix: issue where version wasnt getting populated
13+ - Fix: move version out of ` VERSION.txt ` and into ` datemath/_version.py ` directly
14+ - Fix: typos in CHANGELOG. Thank you @s00hyun !
15+
816## [ 3.0.2] - 2024-09-11
917### added
1018- Feat: Complete typing with strict type-checking [ #43 ] ( https://github.com/nickmaccarthy/python-datemath/pull/43 ) Thank you @Avasam !
Original file line number Diff line number Diff line change 1- include VERSION.txt
21include README.md
32include CHANGELOG.md
43include LICENSE
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- import os
2-
3- current_dir = os .path .dirname (os .path .abspath (__file__ ))
4- version_file = os .path .join (current_dir , '../VERSION.txt' )
5-
6- with open (version_file , 'r' ) as f :
7- __version__ = f .read ().strip ()
1+ __version__ = "3.0.3"
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ more-itertools==10.4.0
2121mypy == 1.7.1
2222mypy-extensions == 1.0.0
2323nh3 == 0.2.18
24- packaging == 16.8
24+ packaging == 24.1
2525pkginfo == 1.10.0
2626Pygments == 2.15.0
2727pyparsing == 2.2.0
@@ -32,6 +32,7 @@ requests==2.32.2
3232requests-toolbelt == 0.9.1
3333rfc3986 == 2.0.0
3434rich == 13.8.0
35+ setuptools == 74.1.2
3536six == 1.16.0
3637tqdm == 4.66.3
3738traceback2 == 1.4.0
Original file line number Diff line number Diff line change 88from setuptools import setup , find_packages
99# To use a consistent encoding
1010from codecs import open
11+ import os
1112from os import path
13+ from typing import Dict
1214
1315here = path .abspath (path .dirname (__file__ ))
1416
15- # Get the long description from the README file
16- with open (path .join (here , 'README.md' ), encoding = 'utf-8' ) as f :
17- long_description_from_readme = f .read ()
17+ version : Dict [str , str ] = {}
18+ with open (os .path .join (here , 'datemath' , '_version.py' )) as f :
19+ exec (f .read (), version )
20+ VERSION = version ['__version__' ]
1821
19- with open (path .join (here , 'VERSION.txt' ), encoding = 'utf-8' ) as fv :
20- version = fv .read ()
2122
2223setup (
2324 name = 'python-datemath' ,
2425
2526 # Versions should comply with PEP440. For a discussion on single-sourcing
2627 # the version across setup.py and the project code, see
2728 # https://packaging.python.org/en/latest/single_source_version.html
28- version = version ,
29- download_url = 'https://github.com/nickmaccarthy/python-datemath/tarball/{0}' .format (version ),
29+ version = VERSION ,
30+ download_url = 'https://github.com/nickmaccarthy/python-datemath/tarball/{0}' .format (VERSION ),
3031
3132 # The project's main homepage.
3233 url = 'https://github.com/nickmaccarthy/python-datemath' ,
Original file line number Diff line number Diff line change 33
44
55print (f'datemath version is { __version__ } ' )
6- with open ('VERSION.txt' , 'r' ) as f :
7- version = f .read ().strip ()
8-
9- assert __version__ == version
106
117
128print (f'Now is: { datemath ("now" )} ' )
You can’t perform that action at this time.
0 commit comments