Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Version bump and fix version number handling for setup.py and sphinx.

  • Loading branch information...
commit 78d8d23b19e9fa93c011eb0b1dbff06dff217dd8 1 parent 0456b8e
@bboe bboe authored
View
14 deploy.sh
@@ -6,15 +6,15 @@ if [[ "$status" != "# On branch master" ]]; then
exit 1
fi
-version1=$(python -c "import reddit; print reddit.VERSION")
-version2=$(egrep -o "'[0-9.]+'" setup.py)
-
-if [[ "'$version1'" != $version2 ]]; then
- echo "'$version1' does not match $version2. Goodbye"
+lines=$(git status | wc -l)
+if [ $lines -ne 2 ]; then
+ echo "There are pending changes. Goodbye"
exit 1
fi
-read -p "Do you want to deploy $version1? [y/n] " input
+version=$(python -c "import reddit.version; print reddit.version.VERSION")
+
+read -p "Do you want to deploy $version? [y/n] " input
case $input in
[Yy]* ) ;;
* ) echo "Goodbye"; exit 1;;
@@ -26,7 +26,7 @@ if [ $? -ne 0 ]; then
exit 1
fi
-git tag -s $version1 -m "Version $version1"
+git tag -s $version -m "Version $version"
if [ $? -ne 0 ]; then
echo "Tagging version failed. Aborting."
exit 1
View
6 docs/conf.py
@@ -12,7 +12,7 @@
# serve to show the default.
import sys, os
-import reddit
+from reddit.version import VERSION
# 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 +51,9 @@
# built documents.
#
# The short X.Y version.
-version = '.'.join(reddit.VERSION.split('.', 2)[:2])
+version = '.'.join(VERSION.split('.', 2)[:2])
# The full version, including alpha/beta/rc tags.
-release = reddit.VERSION
+release = VERSION
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
View
9 docs/reddit.rst
@@ -56,12 +56,3 @@ reddit Package
:members:
:undoc-members:
:show-inheritance:
-
-:mod:`util` Module
-------------------
-
-.. automodule:: reddit.util
- :members:
- :undoc-members:
- :show-inheritance:
-
View
2  reddit/__init__.py
@@ -29,9 +29,9 @@
import reddit.helpers
import reddit.objects
from reddit.settings import CONFIG
+from reddit.version import VERSION
-VERSION = '1.3.4'
UA_STRING = '%%s PRAW/%s Python/%s %s' % (VERSION,
sys.version.split()[0],
platform.platform(True))
View
16 reddit/version.py
@@ -0,0 +1,16 @@
+# 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.5'
View
5 setup.py
@@ -1,3 +1,4 @@
+from reddit.version import VERSION
try:
from setuptools import setup
except ImportError:
@@ -5,11 +6,11 @@
setup(
name='reddit',
- version='1.3.4',
+ version=VERSION,
author='Timothy Mellor',
author_email='timothy.mellor+pip@gmail.com',
maintainer='Bryce Boe',
- maintainer_email='bbzbryce+pip@gmail.com',
+ maintainer_email='bbzbryce@gmail.com',
url='https://github.com/mellort/reddit_api',
description='A wrapper for the Reddit API',
long_description=('Please see the `documentation on github '
Please sign in to comment.
Something went wrong with that request. Please try again.