- Added a ``HISTORY.rst`` to start tracking history of changes
- Updated ``twitter_endpoints.py`` to ``endpoints.py`` for cleanliness
- Removed twython3k directory, no longer needed
- Added ``compat.py`` for compatability with Python 2.6 and greater
- Added some ascii art, moved description of Twython and ``__author__`` to ``__init__.py``
- Added ``version.py`` to store the current Twython version, instead of repeating it twice -- it also had to go into it's own file because of dependencies of ``requests`` and ``requests-oauthlib``, install would fail because those libraries weren't installed yet (on fresh install of Twython)
- Removed ``find_packages()`` from ``setup.py``, only one package -- we can
just define it
- added quick publish method for Ryan and I: ``python setup.py publish`` is faster to type and easier to remember than ``python setup.py sdist upload``
- Removed ``base_url`` from ``endpoints.py`` because we're just repeating it in
``Twython.__init__``
- ``Twython.get_authentication_tokens()`` now takes ``callback_url`` argument rather than passing the ``callback_url`` through ``Twython.__init__``, ``callback_url`` is only used in the ``get_authentication_tokens`` method and nowhere else (kept in init though for backwards compatability)
- Updated README to better reflect current Twython codebase
- Added ``warnings.simplefilter('default')`` line in ``twython.py`` for Python 2.7 and greater to display Deprecation Warnings in console
- Added Deprecation Warnings for usage of ``twitter_token``, ``twitter_secret`` and ``callback_url`` in ``Twython.__init__``
- Headers now always include the User-Agent as Twython vXX unless User-Agent is overwritten
- Removed senseless TwythonError thrown if method is not GET or POST, who cares -- if the user passes something other than GET or POST just let Twitter return the error that they messed up
- Removed conversion to unicode of (int, bool) params passed to a requests. ``requests`` isn't greedy about variables that can't be converted to unicode anymore
46 lines
1.2 KiB
Python
46 lines
1.2 KiB
Python
import os
|
|
import sys
|
|
|
|
from twython.version import __version__
|
|
|
|
from setuptools import setup
|
|
|
|
__author__ = 'Ryan McGrath <ryan@venodesigns.net>'
|
|
|
|
packages = [
|
|
'twython'
|
|
]
|
|
|
|
if sys.argv[-1] == 'publish':
|
|
os.system('python setup.py sdist upload')
|
|
sys.exit()
|
|
|
|
setup(
|
|
# Basic package information.
|
|
name='twython',
|
|
version=__version__,
|
|
packages=packages,
|
|
|
|
# Packaging options.
|
|
include_package_data=True,
|
|
|
|
# Package dependencies.
|
|
install_requires=['requests>=1.0.0, <2.0.0', 'requests_oauthlib==0.3.0'],
|
|
|
|
# Metadata for PyPI.
|
|
author='Ryan McGrath',
|
|
author_email='ryan@venodesigns.net',
|
|
license='MIT License',
|
|
url='http://github.com/ryanmcgrath/twython/tree/master',
|
|
keywords='twitter search api tweet twython',
|
|
description='An easy (and up to date) way to access Twitter data with Python.',
|
|
long_description=open('README.rst').read(),
|
|
classifiers=[
|
|
'Development Status :: 4 - Beta',
|
|
'Intended Audience :: Developers',
|
|
'License :: OSI Approved :: MIT License',
|
|
'Topic :: Software Development :: Libraries :: Python Modules',
|
|
'Topic :: Communications :: Chat',
|
|
'Topic :: Internet'
|
|
]
|
|
)
|