File tree 6 files changed +15
-10
lines changed
6 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 1
1
include *.md
2
- include VERSION
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ Client Library Development
146
146
### Releasing
147
147
148
148
1 . Add new features to [ CHANGELOG.md] ( CHANGELOG.md )
149
- 1 . Bump the version in ` VERSION `
149
+ 1 . Bump the version in ` easypost/version.py ` and ` setup.py `
150
150
1 . Create a git tag
151
151
1 . Push to PyPI with ` python setup.py sdist upload `
152
152
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
import pkg_resources
2
2
3
3
4
- VERSION = pkg_resources . resource_stream ( 'easypost' , '../VERSION' ). read (). decode ( 'utf-8' ). strip ()
4
+ VERSION = '4.0.1'
5
5
6
6
if '-' in VERSION :
7
7
VERSION_INFO = tuple ([int (v ) for v in VERSION .split ('-' )[0 ].split ('.' )] + VERSION .split ('-' )[1 :])
Original file line number Diff line number Diff line change 11
11
]
12
12
13
13
14
- with open ('VERSION' , 'r' ) as f :
15
- version = f .read ().strip ()
16
-
17
-
18
14
if sys .version_info < (3 , 0 ):
19
15
long_description_open = io .open
20
16
else :
26
22
27
23
setup (
28
24
name = 'easypost' ,
29
- version = version ,
25
+ version = '4.0.1' ,
30
26
description = 'EasyPost Shipping API Client Library for Python' ,
31
27
author = 'EasyPost' ,
32
28
33
29
url = 'https://easypost.com/' ,
34
30
packages = ['easypost' ],
35
- package_data = {'easypost' : ['../VERSION' ]},
36
31
install_requires = install_requires ,
37
32
test_suite = 'test' ,
38
33
long_description = long_description ,
Original file line number Diff line number Diff line change
1
+ import easypost
2
+ import re
3
+
4
+
5
+ def test_version_makes_sense ():
6
+ assert re .match (r'^([0-9]+\.)*[0-9]$' , easypost .__version__ )
7
+ assert isinstance (easypost .version_info , tuple )
8
+ assert all (isinstance (part , int ) for part in easypost .version_info )
9
+
10
+
11
+ def test_author_makes_sense ():
12
+ assert re .match (r'.* \<\w+@easypost\.com\>$' , easypost .__author__ )
You can’t perform that action at this time.
0 commit comments