File tree Expand file tree Collapse file tree 5 files changed +9
-20
lines changed Expand file tree Collapse file tree 5 files changed +9
-20
lines changed 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 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
12
13
13
14
here = path .abspath (path .dirname (__file__ ))
14
15
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 ()
18
16
19
- with open (path .join (here , 'VERSION.txt' ), encoding = 'utf-8' ) as fv :
20
- version = fv .read ()
17
+ version = {}
18
+ with open (os .path .join (here , 'datemath' , '_version.py' )) as f :
19
+ exec (f .read (), version )
20
+ VERSION = version ['__version__' ]
21
+
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