This is only a guideline, which may not be adhered to.
-.. method:: API.reverse_geocode([lat], [long], [ip], [accuracy], \
- [granularity], [max_results])
-
- Given a latitude and longitude, looks for nearby places (cities and
- neighbourhoods) whose IDs can be specified in a call to
- :func:`update_status` to appear as the name of the location. This call
- provides a detailed response about the location in question; the
- :func:`nearby_places` function should be preferred for getting a list of
- places nearby without great detail.
-
- :param lat: The location's latitude.
- :param long: The location's longitude.
- :param ip: The location's IP address. Twitter will attempt to geolocate
- using the IP address.
- :param accuracy: Specify the "region" in which to search, such as a number
- (then this is a radius in meters, but it can also take a
- string that is suffixed with ft to specify feet).
- If this is not passed in, then it is assumed to be 0m
- :param granularity: Assumed to be `neighborhood' by default; can also be
- `city'.
- :param max_results: A hint as to the maximum number of results to return.
- This is only a guideline, which may not be adhered to.
-
-
.. method:: API.geo_id(id)
Given *id* of a place, provide more details about that place.
#!/usr/bin/env python
-# from distutils.core import setup
import re
from setuptools import find_packages, setup
-VERSIONFILE = "tweepy/__init__.py"
-ver_file = open(VERSIONFILE, "rt").read()
-VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
-mo = re.search(VSRE, ver_file, re.M)
+VERSION_FILE = "tweepy/__init__.py"
+with open(VERSION_FILE) as version_file:
+ match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
+ version_file.read(), re.MULTILINE)
-if mo:
- version = mo.group(1)
+if match:
+ version = match.group(1)
else:
- raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
+ raise RuntimeError("Unable to find version string in %s." % (VERSION_FILE,))
-setup(name="tweepy",
- version=version,
- description="Twitter library for python",
- license="MIT",
- author="Joshua Roesslein",
- author_email="tweepy@googlegroups.com",
- url="http://github.com/tweepy/tweepy",
- packages=find_packages(exclude=['tests', 'examples']),
- install_requires=[
- "PySocks>=1.5.7",
- "requests>=2.11.1",
- "requests_oauthlib>=0.7.0",
- "six>=1.10.0",
- ],
- keywords="twitter library",
- python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
- classifiers=[
- 'Development Status :: 5 - Production/Stable',
- 'Topic :: Software Development :: Libraries',
- 'License :: OSI Approved :: MIT License',
- 'Operating System :: OS Independent',
- 'Programming Language :: Python',
- 'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.5',
- 'Programming Language :: Python :: 3.6',
- 'Programming Language :: Python :: 3.7',
- ],
- zip_safe=True)
+with open("README.md") as readme_file:
+ long_description = readme_file.read()
+
+tests_require = [
+ "mock>=1.0.1",
+ "nose>=1.3.3",
+ "vcrpy>=1.10.3",
+]
+
+setup(
+ name="tweepy",
+ version=version,
+ description="Twitter library for Python",
+ long_description=long_description,
+ long_description_content_type="text/markdown",
+ license="MIT",
+ author="Joshua Roesslein",
+ author_email="tweepy@googlegroups.com",
+ url="https://www.tweepy.org/",
+ project_urls={
+ "Documentation": "https://tweepy.readthedocs.io/",
+ "Issue Tracker": "https://github.com/tweepy/tweepy/issues",
+ "Source Code": "https://github.com/tweepy/tweepy",
+ },
+ download_url="https://pypi.org/project/tweepy/",
+ packages=find_packages(exclude=["tests", "examples"]),
+ install_requires=[
+ "requests[socks]>=2.11.1",
+ "requests_oauthlib>=0.7.0",
+ "six>=1.10.0",
+ ],
+ tests_require=tests_require,
+ extras_require={
+ "dev": [
+ "coveralls>=1.8.2",
+ "tox>=2.4.0",
+ ],
+ "test": tests_require,
+ },
+ test_suite="nose.collector",
+ keywords="twitter library",
+ python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
+ classifiers=[
+ "Development Status :: 5 - Production/Stable",
+ "Topic :: Software Development :: Libraries",
+ "License :: OSI Approved :: MIT License",
+ "Operating System :: OS Independent",
+ "Programming Language :: Python",
+ "Programming Language :: Python :: 2",
+ "Programming Language :: Python :: 2.7",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3.5",
+ "Programming Language :: Python :: 3.6",
+ "Programming Language :: Python :: 3.7",
+ "Programming Language :: Python :: 3.8",
+ ],
+ zip_safe=True,
+)