Skip to content

Commit

Permalink
Simplify versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
yetty committed Aug 23, 2013
1 parent 7abf457 commit b5264f7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
6 changes: 4 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

os.environ['DJANGO_SETTINGS_MODULE'] = 'embed_video.tests.django_settings'

import embed_video

# -- General configuration -----------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand Down Expand Up @@ -51,9 +53,9 @@
# built documents.
#
# The short X.Y version.
version = '0.4'
version = embed_video.get_version()
# The full version, including alpha/beta/rc tags.
release = '0.4'
release = embed_video.__version__

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
15 changes: 15 additions & 0 deletions embed_video/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""
Django app for easy embeding YouTube and Vimeo videos and music from
SoundCloud.
"""

VERSION = (0, 5, 'dev')

__version__ = '.'.join(str(i) for i in VERSION[:3])


def get_version():
"""
Returns only digit parts of version.
"""
return '.'.join(str(i) for i in VERSION[:2])
10 changes: 7 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import os

embed_video = __import__('embed_video')


def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
Expand All @@ -12,18 +14,20 @@ def read(fname):
setup(
name='django-embed-video',
packages=find_packages(),
version='0.4',
version=embed_video.get_version(),
author='Juda Kaleta',
author_email='juda.kaleta@gmail.com',
url='https://github.com/yetty/django-embed-video',
description='Django template tags for YouTube and Vimeo',
description=embed_video.__doc__.strip(),
long_description='\n\n'.join([README, CHANGES]),
classifiers=[
'Framework :: Django',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 2.7',
'Topic :: Internet :: WWW/HTTP',
],
keywords=['youtube', 'vimeo', 'video'],
keywords=['youtube', 'vimeo', 'video', 'soundcloud'],
install_requires=['requests >= 1.2.3', ],
)

0 comments on commit b5264f7

Please sign in to comment.