File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11Statsd Changelog
22================
33
4+ Version 2.0.1
5+ -------------
6+
7+ - Fix install with Django 1.5 in the environment.
8+
9+
410Version 2.0
511-----------
612
Original file line number Diff line number Diff line change 1- from setuptools import setup , find_packages
1+ import os
2+ import re
3+ from setuptools import find_packages , setup
4+
5+
6+ VERSIONFILE = os .path .join ('statsd' , '_version.py' )
7+ VSRE = r'^__version__ = [\'"]([^\'"]*)[\'"]'
8+
9+
10+ def get_version ():
11+ verstrline = open (VERSIONFILE , "rt" ).read ()
12+ mo = re .search (VSRE , verstrline , re .M )
13+ if mo :
14+ return mo .group (1 )
15+ else :
16+ raise RuntimeError (
17+ "Unable to find version string in %s." % VERSIONFILE )
218
3- import statsd
419
520setup (
621 name = 'statsd' ,
7- version = statsd . __version__ ,
22+ version = get_version () ,
823 description = 'A simple statsd client.' ,
924 long_description = open ('README.rst' ).read (),
1025 author = 'James Socol' ,
Original file line number Diff line number Diff line change 88 settings = None
99
1010from .client import StatsClient
11+ from ._version import __version__
1112
1213
1314__all__ = ['StatsClient' , 'statsd' ]
1415
15- VERSION = (2 , 0 , 0 )
16- __version__ = '.' .join (map (str , VERSION ))
17-
18-
1916statsd = None
2017
2118if settings :
Original file line number Diff line number Diff line change 1+ __version__ = '2.0.1'
You can’t perform that action at this time.
0 commit comments