Skip to content

Commit f6e213e

Browse files
committed
Bump version numbers for new release, update setup.py
1 parent bdcfebd commit f6e213e

File tree

3 files changed

+27
-5
lines changed

3 files changed

+27
-5
lines changed

CHANGES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Changes in version 0.8.7 (beta release)
33

44
* Fix Django 1.5 support in the templates
55
* Fix Django 1.6 support, use new ``django.conf.urls`` import path.
6+
Note you need to use django-polymorphic_ >= 0.5.1 as well with Django 1.6.
67

78

89
Changes in version 0.8.6 (beta release)

polymorphic_tree/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
VERSION = (0,8,4)
1+
# following PEP 386
2+
__version__ = "0.8.7"
23

34
# Do some sane version checking
45
import django

setup.py

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
#!/usr/bin/env python
22
from setuptools import setup, find_packages
3-
from os.path import dirname, join
4-
import sys, os
3+
from os import path
4+
import codecs
5+
import os
6+
import re
7+
import sys
8+
59

610
# When creating the sdist, make sure the django.mo file also exists:
711
if 'sdist' in sys.argv:
@@ -13,9 +17,22 @@
1317
os.chdir('..')
1418

1519

20+
def read(*parts):
21+
file_path = path.join(path.dirname(__file__), *parts)
22+
return codecs.open(file_path, encoding='utf-8').read()
23+
24+
25+
def find_version(*parts):
26+
version_file = read(*parts)
27+
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
28+
if version_match:
29+
return str(version_match.group(1))
30+
raise RuntimeError("Unable to find version string.")
31+
32+
1633
setup(
1734
name='django-polymorphic-tree',
18-
version='0.8.7',
35+
version=find_version('polymorphic_tree', '__init__.py'),
1936
license='Apache License, Version 2.0',
2037

2138
install_requires=[
@@ -27,7 +44,7 @@
2744
'Django (>=1.3)', # Using staticfiles
2845
],
2946
description="A polymorphic mptt structure to display content in a tree.",
30-
long_description=open(join(dirname(__file__), 'README.rst')).read(),
47+
long_description=read('README.rst'),
3148

3249
author='Diederik van der Boor',
3350
author_email='[email protected]',
@@ -49,5 +66,8 @@
4966
'Programming Language :: Python',
5067
'Programming Language :: Python :: 2.6',
5168
'Programming Language :: Python :: 2.7',
69+
'Topic :: Internet :: WWW/HTTP',
70+
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
71+
'Topic :: Software Development :: Libraries :: Python Modules',
5272
]
5373
)

0 commit comments

Comments
 (0)