Commits

Andy Mikhailenko committed ac751cb

BUGFIX: Sphinx would break on build because it could not import package version since prev.commit.

Comments (0)

Files changed (4)

 A simple example::
 
     from django.db.models import CharField, Model
-    from autoslug.fields import AutoSlugField
+    from autoslug import AutoSlugField
 
     class Article(Model):
         title = CharField(max_length=200)
 
     from django.db.models import CharField, DateField, ForeignKey, Model
     from django.contrib.auth.models import User
-    from autoslug.fields import AutoSlugField
+    from autoslug import AutoSlugField
 
     class Article(Model):
         title = CharField(max_length=200)
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.
 sys.path.insert(0, os.path.abspath('..'))
+from version import version
+
 from django.conf import settings
 settings.configure()
-import autoslug
-
 
 # -- General configuration -----------------------------------------------------
 
 # built documents.
 #
 # The short X.Y version.
-version = '.'.join(autoslug.__version__.split('.')[:2])
+version = '.'.join(version.split('.')[:2])
 # The full version, including alpha/beta/rc tags.
-release = autoslug.__version__
+release = version
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
 
 import os
 from setuptools import setup
+from version import version
 
 
+readme = open(os.path.join(os.path.dirname(__file__), 'README')).read()
+
 setup(
     name     = 'django-autoslug',
-    version  = '1.3.3',
+    version  = version,
     packages = ['autoslug'],
 
     requires = ['python (>= 2.4)', 'django (>= 1.0)'],
     extras_require = {'cyrillic': 'pytils >= 0.2'},
 
     description  = 'An automated slug field for Django.',
-    long_description = open('README').read(),
+    long_description = readme,
     author       = 'Andy Mikhailenko',
     author_email = 'andy@neithere.net',
     url          = 'http://bitbucket.org/neithere/django-autoslug/',
+# -*- coding: utf-8 -*-
+
+version = '1.3.3'