From 7633ae0936a4ea15f6a0edb8657060fc7f2574c3 Mon Sep 17 00:00:00 2001 From: Hamza Faran Date: Tue, 18 Aug 2015 11:27:04 -0700 Subject: [PATCH 1/3] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7df4e6f..087ed52 100644 --- a/README.md +++ b/README.md @@ -55,14 +55,14 @@ You've seen this before and you'll see it again. ```bash # The easy way -sudo pip install piazza-api +pip install piazza-api ``` ```bash # The developer way git clone https://github.com/hfaran/piazza-api cd piazza-api -sudo python setup.py install +python setup.py develop ``` ## Contribute From 70be93343a985b4aa81944649c42c4138fece388 Mon Sep 17 00:00:00 2001 From: hfaran Date: Sat, 22 Aug 2015 11:41:31 -0700 Subject: [PATCH 2/3] Use regex for finding version in __init__.py --- setup.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 81e3bd2..3437c6b 100644 --- a/setup.py +++ b/setup.py @@ -2,9 +2,8 @@ import codecs import os -from setuptools import setup, find_packages - -import piazza_api +import re +from setuptools import setup def read(filename): @@ -13,13 +12,17 @@ def read(filename): return codecs.open(os.path.join(here, filename), 'r').read() +# https://github.com/kennethreitz/requests/blob/master/setup.py#L32 +with open('piazza_api/__init__.py', 'r') as fd: + version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) install_requires = read("requirements.txt").split() long_description = read('README.md') setup( name='piazza-api', - version=piazza_api.__version__, + version=version, url='http://github.com/hfaran/piazza-api/', license='MIT License', author='Hamza Faran', From 552a4513931aa7687934a3ad4676928a948c02a6 Mon Sep 17 00:00:00 2001 From: hfaran Date: Sat, 22 Aug 2015 11:43:23 -0700 Subject: [PATCH 3/3] Bump version 0.5.1 --- piazza_api/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piazza_api/__init__.py b/piazza_api/__init__.py index af98262..147ab5c 100644 --- a/piazza_api/__init__.py +++ b/piazza_api/__init__.py @@ -1,3 +1,3 @@ from piazza_api.piazza import Piazza -__version__ = "0.5.0" +__version__ = "0.5.1"