forked from jjlee/mechanize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·92 lines (81 loc) · 3.23 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/usr/bin/env python
"""Stateful programmatic web browsing.
Stateful programmatic web browsing, after Andy Lester's Perl module
WWW::Mechanize.
mechanize.Browser implements the urllib2.OpenerDirector interface. Browser
objects have state, including navigation history, HTML form state, cookies,
etc. The set of features and URL schemes handled by Browser objects is
configurable. The library also provides an API that is mostly compatible with
urllib2: your urllib2 program will likely still work if you replace "urllib2"
with "mechanize" everywhere.
Features include: ftp:, http: and file: URL schemes, browser history, hyperlink
and HTML form support, HTTP cookies, HTTP-EQUIV and Refresh, Referer [sic]
header, robots.txt, redirections, proxies, and Basic and Digest HTTP
authentication.
Much of the code originally derived from Perl code by Gisle Aas (libwww-perl),
Johnny Lee (MSIE Cookie support) and last but not least Andy Lester
(WWW::Mechanize). urllib2 was written by Jeremy Hylton.
"""
import os
VERSION = open(os.path.join("mechanize", "_version.py")).\
readlines()[0].strip(' "\n')
CLASSIFIERS = """\
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
Intended Audience :: System Administrators
License :: OSI Approved :: BSD License
License :: OSI Approved :: Zope Public License
Natural Language :: English
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.4
Programming Language :: Python :: 2.5
Programming Language :: Python :: 2.6
Programming Language :: Python :: 2.7
Topic :: Internet
Topic :: Internet :: File Transfer Protocol (FTP)
Topic :: Internet :: WWW/HTTP
Topic :: Internet :: WWW/HTTP :: Browsers
Topic :: Internet :: WWW/HTTP :: Indexing/Search
Topic :: Internet :: WWW/HTTP :: Site Management
Topic :: Internet :: WWW/HTTP :: Site Management :: Link Checking
Topic :: Software Development :: Libraries
Topic :: Software Development :: Libraries :: Python Modules
Topic :: Software Development :: Testing
Topic :: Software Development :: Testing :: Traffic Generation
Topic :: System :: Archiving :: Mirroring
Topic :: System :: Networking :: Monitoring
Topic :: System :: Systems Administration
Topic :: Text Processing
Topic :: Text Processing :: Markup
Topic :: Text Processing :: Markup :: HTML
Topic :: Text Processing :: Markup :: XML
"""
def main():
try:
import setuptools
except ImportError:
import ez_setup
ez_setup.use_setuptools()
import setuptools
setuptools.setup(
name = "mechanize",
version = VERSION,
license = "BSD", # or ZPL 2.1
platforms = ["any"],
classifiers = [c for c in CLASSIFIERS.split("\n") if c],
install_requires = [],
zip_safe = True,
test_suite = "test",
author = "John J. Lee",
author_email = "[email protected]",
description = __doc__.split("\n", 1)[0],
long_description = __doc__.split("\n", 2)[-1],
url = "http://wwwsearch.sourceforge.net/mechanize/",
download_url = ("http://pypi.python.org/packages/source/m/mechanize/"
"mechanize-%s.tar.gz" % VERSION),
packages = ["mechanize"],
)
if __name__ == "__main__":
main()