File tree 8 files changed +21
-21
lines changed
8 files changed +21
-21
lines changed Original file line number Diff line number Diff line change 23
23
run : python3 setup.py install --user
24
24
- name : verify we can import
25
25
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.
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
6
6
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
7
7
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
+
8
16
## [ 3.0.2] - 2024-09-11
9
17
### added
10
18
- 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
2
1
include README.md
3
2
include CHANGELOG.md
4
3
include 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
21
21
mypy == 1.7.1
22
22
mypy-extensions == 1.0.0
23
23
nh3 == 0.2.18
24
- packaging == 16.8
24
+ packaging == 24.1
25
25
pkginfo == 1.10.0
26
26
Pygments == 2.15.0
27
27
pyparsing == 2.2.0
@@ -32,6 +32,7 @@ requests==2.32.2
32
32
requests-toolbelt == 0.9.1
33
33
rfc3986 == 2.0.0
34
34
rich == 13.8.0
35
+ setuptools == 74.1.2
35
36
six == 1.16.0
36
37
tqdm == 4.66.3
37
38
traceback2 == 1.4.0
Original file line number Diff line number Diff line change 8
8
from setuptools import setup , find_packages
9
9
# To use a consistent encoding
10
10
from codecs import open
11
+ import os
11
12
from os import path
13
+ from typing import Dict
12
14
13
15
here = path .abspath (path .dirname (__file__ ))
14
16
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__' ]
18
21
19
- with open (path .join (here , 'VERSION.txt' ), encoding = 'utf-8' ) as fv :
20
- version = fv .read ()
21
22
22
23
setup (
23
24
name = 'python-datemath' ,
24
25
25
26
# Versions should comply with PEP440. For a discussion on single-sourcing
26
27
# the version across setup.py and the project code, see
27
28
# 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 ),
30
31
31
32
# The project's main homepage.
32
33
url = 'https://github.com/nickmaccarthy/python-datemath' ,
Original file line number Diff line number Diff line change 3
3
4
4
5
5
print (f'datemath version is { __version__ } ' )
6
- with open ('VERSION.txt' , 'r' ) as f :
7
- version = f .read ().strip ()
8
-
9
- assert __version__ == version
10
6
11
7
12
8
print (f'Now is: { datemath ("now" )} ' )
You can’t perform that action at this time.
0 commit comments