Skip to content

Commit 8b14f67

Browse files
committed
stop doing tricks to populate version
1 parent 0b08f43 commit 8b14f67

File tree

6 files changed

+15
-10
lines changed

6 files changed

+15
-10
lines changed

MANIFEST.in

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
include *.md
2-
include VERSION

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Client Library Development
146146
### Releasing
147147

148148
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`
150150
1. Create a git tag
151151
1. Push to PyPI with `python setup.py sdist upload`
152152

VERSION

-1
This file was deleted.

easypost/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pkg_resources
22

33

4-
VERSION = pkg_resources.resource_stream('easypost', '../VERSION').read().decode('utf-8').strip()
4+
VERSION = '4.0.1'
55

66
if '-' in VERSION:
77
VERSION_INFO = tuple([int(v) for v in VERSION.split('-')[0].split('.')] + VERSION.split('-')[1:])

setup.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
]
1212

1313

14-
with open('VERSION', 'r') as f:
15-
version = f.read().strip()
16-
17-
1814
if sys.version_info < (3, 0):
1915
long_description_open = io.open
2016
else:
@@ -26,13 +22,12 @@
2622

2723
setup(
2824
name='easypost',
29-
version=version,
25+
version='4.0.1',
3026
description='EasyPost Shipping API Client Library for Python',
3127
author='EasyPost',
3228
author_email='[email protected]',
3329
url='https://easypost.com/',
3430
packages=['easypost'],
35-
package_data={'easypost': ['../VERSION']},
3631
install_requires=install_requires,
3732
test_suite='test',
3833
long_description=long_description,

tests/test_modules.py

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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__)

0 commit comments

Comments
 (0)