11#!/usr/bin/env python
2+
23from setuptools import setup , find_packages
4+ import os
5+ import sys
6+ import re
7+ import shutil
8+
9+
10+ def get_version (package ):
11+ """
12+ Return package version as listed in `__version__` in `init.py`.
13+ """
14+ init_py = open (os .path .join (package , '__init__.py' )).read ()
15+ return re .search ("__version__ = ['\" ]([^'\" ]+)['\" ]" , init_py ).group (1 )
16+
17+
18+ def read_all (f ):
19+ with open (f ) as I :
20+ return I .read ()
21+
22+ requirements = map (str .strip , open ("requirements.txt" ).readlines ())
23+
24+ version = get_version ('rejson' )
25+
26+ if sys .argv [- 1 ] == 'publish' :
27+ print ("You probably want to also tag the version now:" )
28+ print (" git tag -a %s -m 'version %s'" % (version , version ))
29+ print (" git push --tags" )
30+ shutil .rmtree ('dist' )
31+ shutil .rmtree ('build' )
32+ shutil .rmtree ('rejson.egg-info' )
33+ sys .exit ()
334
4- setup (
5- name = 'rejson' ,
6- version = '0.1' ,
7- author = 'Redis Labs' ,
8- author_email = 'oss@redislabs.com' ,
9- description = 'ReJSON Python Client' ,
10- url = 'http://github.com/RedisLabs/rejson-py' ,
11- packages = find_packages (),
12- install_requires = ['redis' , 'hiredis' ],
13- classifiers = [
14- 'Development Status :: 4 - Beta' ,
15- 'Intended Audience :: Developers' ,
16- 'License :: OSI Approved :: BSD License' ,
17- 'Programming Language :: Python :: 2.7' ,
18- 'Topic :: Database' ,
19- ]
20- )
35+ setup (name = 'rejson' ,
36+ version = version ,
37+ description = 'ReJSON Python Client' ,
38+ long_description = read_all ("README.md" ),
39+ classifiers = [
40+ 'Programming Language :: Python' ,
41+ 'License :: OSI Approved :: BSD License' ,
42+ 'Intended Audience :: Developers' ,
43+ 'Operating System :: OS Independent' ,
44+ 'Development Status :: 4 - Beta' ,
45+ 'Topic :: Database' ,
46+ 'Programming Language :: Python' ,
47+ 'Programming Language :: Python :: 2' ,
48+ 'Programming Language :: Python :: 2.7' ,
49+ 'Programming Language :: Python :: 3.5' ,
50+ ], # Get from http://pypi.python.org/pypi?%3Aaction=list_classifiers
51+ keywords = 'YAML parser configuration' ,
52+ author = 'RedisLabs' ,
53+ author_email = 'oss@redislabs.com' ,
54+ url = 'http://github.com/RedisLabs/rejson-py' ,
55+ packages = find_packages (exclude = ['ez_setup' , 'examples' , 'tests' ]),
56+ test_suite = "tests" ,
57+ include_package_data = True ,
58+ zip_safe = False ,
59+ install_requires = requirements ,
60+ entry_points = """
61+ # -*- Entry points: -*-
62+ """ ,
63+ )
0 commit comments