Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix the version number stuff again. Hopefully this settles it all.

  • Loading branch information...
commit 58b1dffbc5c4d463b18cf9316b963dae7c803195 1 parent 10dd9dd
@bboe bboe authored
View
13 docs/conf.py
@@ -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
@@ -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.
View
5 reddit/__init__.py
@@ -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))
View
16 reddit/version.py
@@ -1,16 +0,0 @@
-# This file is part of reddit_api.
-#
-# reddit_api is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# reddit_api is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with reddit_api. If not, see <http://www.gnu.org/licenses/>.
-
-VERSION = '1.3.6'
View
9 setup.py
@@ -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',
Please sign in to comment.
Something went wrong with that request. Please try again.