Skip to content

Commit

Permalink
Make version available from package.
Browse files Browse the repository at this point in the history
  • Loading branch information
Warren Smith committed Nov 29, 2016
1 parent c22a3c9 commit dfbb716
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ constantmodel release notes
0.1.6
=====
* Fix bug in django field. Make .get_FIELD_display() work properly.

0.1.7
=====
* Make version available from package.
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@

from setuptools import setup, find_packages

__version__ = "0.1.6"


def file_read(filename):
filepath = os.path.join(os.path.dirname(__file__), filename)
with open(filepath) as flo:
return flo.read()


__version__ = file_read('staticmodel/VERSION.txt').strip()


setup(
name="staticmodel",
version=__version__,
packages=find_packages(exclude=['tests', 'docs']),
include_package_data=True,
install_requires=['six'],
author="Warren A. Smith",
author_email="warren@wandrsmith.net",
Expand Down
1 change: 1 addition & 0 deletions staticmodel/VERSION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.7
4 changes: 4 additions & 0 deletions staticmodel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,3 +407,7 @@
>>>
"""
from .core import StaticModel

import os
with open(os.path.join(os.path.dirname(__file__), 'VERSION.txt')) as f:
__version__ = f.read().strip()

0 comments on commit dfbb716

Please sign in to comment.