Fixing setup.py script to use valid setuptools format.
This will fix the broken pip / easy_install issues on many platforms (like most linux distros).
This commit is contained in:
parent
d630e02b6e
commit
d9fcd3a264
1 changed files with 21 additions and 25 deletions
46
setup.py
46
setup.py
|
|
@ -1,46 +1,42 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
import sys, os
|
import sys, os
|
||||||
|
from setuptools import setup
|
||||||
|
from setuptools import find_packages
|
||||||
|
|
||||||
|
|
||||||
__author__ = 'Ryan McGrath <ryan@venodesigns.net>'
|
__author__ = 'Ryan McGrath <ryan@venodesigns.net>'
|
||||||
__version__ = '1.2'
|
__version__ = '1.2'
|
||||||
|
|
||||||
# Distutils version
|
|
||||||
METADATA = dict(
|
setup(
|
||||||
name = "twython",
|
|
||||||
|
# Basic package information.
|
||||||
|
name = 'twython',
|
||||||
version = __version__,
|
version = __version__,
|
||||||
py_modules = ['setup', 'twython/__init__', 'twython/core', 'twython/twyauth', 'twython/streaming', 'twython/oauth'],
|
packages = find_packages(),
|
||||||
|
|
||||||
|
# Packaging options.
|
||||||
|
include_package_data = True,
|
||||||
|
|
||||||
|
# Package dependencies.
|
||||||
|
install_requires = ['setuptools', 'simplejson'],
|
||||||
|
|
||||||
|
# Metadata for PyPI.
|
||||||
author = 'Ryan McGrath',
|
author = 'Ryan McGrath',
|
||||||
author_email = 'ryan@venodesigns.net',
|
author_email = 'ryan@venodesigns.net',
|
||||||
description = 'An easy (and up to date) way to access Twitter data with Python.',
|
|
||||||
long_description = open("README.markdown").read(),
|
|
||||||
license = 'MIT License',
|
license = 'MIT License',
|
||||||
url = 'http://github.com/ryanmcgrath/twython/tree/master',
|
url = 'http://github.com/ryanmcgrath/twython/tree/master',
|
||||||
keywords = 'twitter search api tweet twython',
|
keywords = 'twitter search api tweet twython',
|
||||||
)
|
description = 'An easy (and up to date) way to access Twitter data with Python.',
|
||||||
|
long_description = open('README.markdown').read(),
|
||||||
# Setuptools version
|
|
||||||
SETUPTOOLS_METADATA = dict(
|
|
||||||
install_requires = ['setuptools', 'simplejson'],
|
|
||||||
include_package_data = True,
|
|
||||||
classifiers = [
|
classifiers = [
|
||||||
'Development Status :: 4 - Beta',
|
'Development Status :: 4 - Beta',
|
||||||
'Intended Audience :: Developers',
|
'Intended Audience :: Developers',
|
||||||
'License :: OSI Approved :: MIT License',
|
'License :: OSI Approved :: MIT License',
|
||||||
'Topic :: Software Development :: Libraries :: Python Modules',
|
'Topic :: Software Development :: Libraries :: Python Modules',
|
||||||
'Topic :: Communications :: Chat',
|
'Topic :: Communications :: Chat',
|
||||||
'Topic :: Internet',
|
'Topic :: Internet'
|
||||||
]
|
]
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def Main():
|
|
||||||
try:
|
|
||||||
import setuptools
|
|
||||||
METADATA.update(SETUPTOOLS_METADATA)
|
|
||||||
setuptools.setup(**METADATA)
|
|
||||||
except ImportError:
|
|
||||||
import distutils.core
|
|
||||||
distutils.core.setup(**METADATA)
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
Main()
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue