annotate Code/python_oauth2-master/setup.py @ 47:b0186d4a4496 tip

Move 7Digital dataset to Downloads
author Paulo Chiliguano <p.e.chiliguano@se14.qmul.ac.uk>
date Sat, 09 Jul 2022 00:50:43 -0500
parents e68dbee1f6db
children
rev   line source
p@21 1 #!/usr/bin/env python
p@21 2 from setuptools import setup, find_packages
p@21 3 import os, re
p@21 4
p@21 5 PKG='oauth2'
p@21 6 VERSIONFILE = os.path.join('oauth2', '_version.py')
p@21 7 verstr = "unknown"
p@21 8 try:
p@21 9 verstrline = open(VERSIONFILE, "rt").read()
p@21 10 except EnvironmentError:
p@21 11 pass # Okay, there is no version file.
p@21 12 else:
p@21 13 MVSRE = r"^manual_verstr *= *['\"]([^'\"]*)['\"]"
p@21 14 mo = re.search(MVSRE, verstrline, re.M)
p@21 15 if mo:
p@21 16 mverstr = mo.group(1)
p@21 17 else:
p@21 18 print "unable to find version in %s" % (VERSIONFILE,)
p@21 19 raise RuntimeError("if %s.py exists, it must be well-formed" % (VERSIONFILE,))
p@21 20 AVSRE = r"^auto_build_num *= *['\"]([^'\"]*)['\"]"
p@21 21 mo = re.search(AVSRE, verstrline, re.M)
p@21 22 if mo:
p@21 23 averstr = mo.group(1)
p@21 24 else:
p@21 25 averstr = ''
p@21 26 verstr = '.'.join([mverstr, averstr])
p@21 27
p@21 28 setup(name=PKG,
p@21 29 version=verstr,
p@21 30 description="library for OAuth version 1.0",
p@21 31 author="Joe Stump",
p@21 32 author_email="joe@simplegeo.com",
p@21 33 url="http://github.com/simplegeo/python-oauth2",
p@21 34 packages = find_packages(),
p@21 35 install_requires = ['httplib2'],
p@21 36 license = "MIT License",
p@21 37 keywords="oauth",
p@21 38 zip_safe = True,
p@21 39 test_suite="tests",
p@21 40 tests_require=['coverage', 'mock'])