1
from distutils.core import setup
4
warnings.filterwarnings("ignore", "Unknown distribution option")
7
# patch distutils if it can't cope with the "classifiers" keyword
8
if sys.version < '2.2.3':
9
from distutils.dist import DistributionMetadata
10
DistributionMetadata.classifiers = None
11
DistributionMetadata.download_url = None
13
from BeautifulSoup import __version__
15
#Make sure all the tests complete.
16
import BeautifulSoupTests
17
loader = unittest.TestLoader()
18
result = unittest.TestResult()
19
suite = loader.loadTestsFromModule(BeautifulSoupTests)
21
if not result.wasSuccessful():
22
print "Unit tests have failed!"
23
for l in result.errors, result.failures:
26
desc = case.shortDescription()
30
print '''If you see an error like: "'ascii' codec can't encode character...", see\nthe Beautiful Soup documentation:\n http://www.crummy.com/software/BeautifulSoup/documentation.html#Why%20can't%20Beautiful%20Soup%20print%20out%20the%20non-ASCII%20characters%20I%20gave%20it?'''
31
print "This might or might not be a problem depending on what you plan to do with\nBeautiful Soup."
32
if sys.argv[1] == 'sdist':
34
print "I'm not going to make a source distribution since the tests don't pass."
37
setup(name="BeautifulSoup",
39
py_modules=['BeautifulSoup', 'BeautifulSoupTests'],
40
description="HTML/XML parser for quick-turnaround applications like screen-scraping.",
41
author="Leonard Richardson",
42
author_email = "leonardr@segfault.org",
43
long_description="""Beautiful Soup parses arbitrarily invalid SGML and provides a variety of methods and Pythonic idioms for iterating and searching the parse tree.""",
44
classifiers=["Development Status :: 5 - Production/Stable",
45
"Intended Audience :: Developers",
46
"License :: OSI Approved :: Python Software Foundation License",
47
"Programming Language :: Python",
48
"Topic :: Text Processing :: Markup :: HTML",
49
"Topic :: Text Processing :: Markup :: XML",
50
"Topic :: Text Processing :: Markup :: SGML",
51
"Topic :: Software Development :: Libraries :: Python Modules",
53
url="http://www.crummy.com/software/BeautifulSoup/",
55
download_url="http://www.crummy.com/software/BeautifulSoup/download/"
59
# python-announce@python.org
60
# python-list@python.org