Skip to content

Commit

Permalink
Added versiontools support!
Browse files Browse the repository at this point in the history
  • Loading branch information
toastdriven committed Mar 18, 2013
1 parent 2dff249 commit 383a6c8
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 6 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ recursive-include tastypie/templates/tastypie *.html
include AUTHORS
include LICENSE
include README.rst
include VERSION
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.9.13-beta
11 changes: 8 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,21 @@

# General information about the project.
project = u'Tastypie'
copyright = u'2010-2012, Daniel Lindsley, Cody Soyland, Matt Croydon, Josh Bohde & Issac Kelly'
copyright = u'2010-2013, Daniel Lindsley, Cody Soyland, Matt Croydon, Josh Bohde & Issac Kelly'

# TASTYPIE SPECIFIC
import versiontools as vt
RELEASE_VERSION = vt.load_version('../VERSION')
SHORT_VERSION = RELEASE_VERSION.split('-')[0]

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.9.13'
version = SHORT_VERSION
# The full version, including alpha/beta/rc tags.
release = '0.9.13-beta'
release = RELEASE_VERSION

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Django>=1.0.0
versiontools
Django>=1.3.0
mimeparse>=0.1.3
python-dateutil>=2.1
lxml
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
use_setuptools()
from setuptools import setup

import versiontools as vt

setup(
name='django-tastypie',
version='0.9.13-beta',
version=vt.load_version('VERSION'),
description='A flexible & capable API layer for Django.',
author='Daniel Lindsley',
author_email='[email protected]',
Expand Down
9 changes: 8 additions & 1 deletion tastypie/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
import os
import versiontools as vt


VERSION_FILE = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'VERSION')


__author__ = 'Daniel Lindsley, Cody Soyland, Matt Croydon, Josh Bohde & Issac Kelly'
__version__ = (0, 9, 13, 'beta')
__version__ = vt.build_version('your_package_name_here', vt.load_version(VERSION_FILE))

0 comments on commit 383a6c8

Please sign in to comment.