Skip to content

Commit

Permalink
Fix the version number stuff again. Hopefully this settles it all.
Browse files Browse the repository at this point in the history
  • Loading branch information
bboe committed Apr 23, 2012
1 parent 10dd9dd commit 58b1dff
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 25 deletions.
13 changes: 9 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys, os
from reddit.version import VERSION
import os
import re
import sys

version = re.search("__version__ = '([^']+)'",
open('../reddit/__init__.py').read()).group(1)


# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down Expand Up @@ -51,9 +56,9 @@
# built documents.
#
# The short X.Y version.
version = '.'.join(VERSION.split('.', 2)[:2])
version = '.'.join(version.split('.', 2)[:2])
# The full version, including alpha/beta/rc tags.
release = VERSION
release = version

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
5 changes: 2 additions & 3 deletions reddit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@
import reddit.helpers
import reddit.objects
from reddit.settings import CONFIG
from reddit.version import VERSION


UA_STRING = '%%s PRAW/%s Python/%s %s' % (VERSION,
__version__ = '1.3.6'
UA_STRING = '%%s PRAW/%s Python/%s %s' % (__version__,
sys.version.split()[0],
platform.platform(True))

Expand Down
16 changes: 0 additions & 16 deletions reddit/version.py

This file was deleted.

9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
from reddit.version import VERSION
import re
try:
from setuptools import setup
except ImportError:
from distutils.core import setup


version = re.search("__version__ = '([^']+)'",
open('reddit/__init__.py').read()).group(1)


setup(
name='reddit',
version=VERSION,
version=version,
author='Timothy Mellor',
author_email='timothy.mellor+pip@gmail.com',
maintainer='Bryce Boe',
Expand Down

0 comments on commit 58b1dff

Please sign in to comment.