Skip to content

Commit 2530b06

Browse files
committed
Random changes to the build script and so on
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%401173
1 parent 09a26b9 commit 2530b06

File tree

3 files changed

+24
-14
lines changed

3 files changed

+24
-14
lines changed

setup.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
from distutils.core import setup
1+
try:
2+
from setuptools import setup
3+
except ImportError:
4+
from distutils.core import setup
25
import os
36

47
long_description="""HTML parser designed to follow the WHATWG HTML5
@@ -7,11 +10,11 @@
710
with the behaviour of major desktop web browsers.
811
912
Output is to a tree structure; the current release supports output to
10-
a custom tree similar to DOM and to ElementTree.
11-
"""
13+
DOM, ElementTree, lxml and BeautifulSoup tree formats as well as a
14+
simple custom format"""
1215

1316
classifiers=[
14-
'Development Status :: 3 - Alpha',
17+
'Development Status :: 4 - Beta',
1518
'Intended Audience :: Developers',
1619
'License :: OSI Approved :: MIT License',
1720
'Operating System :: OS Independent',
@@ -21,7 +24,7 @@
2124
],
2225

2326
setup(name='html5lib',
24-
version='0.3',
27+
version='0.11',
2528
url='http://code.google.com/p/html5lib/',
2629
license="MIT License",
2730
description='HTML parser based on the WHAT-WG Web Applications 1.0'
@@ -34,5 +37,7 @@
3437
for name in os.listdir(os.path.join('src','html5lib'))
3538
if os.path.isdir(os.path.join('src','html5lib',name)) and
3639
not name.startswith('.')],
37-
package_dir = {'html5lib': 'src/html5lib'}
40+
package_dir = {'html5lib': 'src/html5lib'},
41+
test_suite = "tests.buildTestSuite",
42+
tests_require = ['simplejson']
3843
)

setup_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
with the behaviour of major desktop web browsers.
88
99
Output is to a tree structure; the current release supports output to
10-
a custom tree similar to DOM and to ElementTree.
11-
"""
10+
DOM, ElementTree, lxml and BeautifulSoup tree formats as well as a
11+
simple custom format"""
1212

1313
classifiers=[
1414
'Development Status :: %(status)s',
@@ -34,7 +34,7 @@
3434
for name in os.listdir(os.path.join('src','html5lib'))
3535
if os.path.isdir(os.path.join('src','html5lib',name)) and
3636
not name.startswith('.')],
37-
package_dir = {'html5lib': 'src/html5lib'},
37+
package_dir = {'': 'src/'},
3838
test_suite = "tests.buildTestSuite",
3939
tests_require = ['simplejson']
4040
)

utils/package.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def __init__(self, inDir, outDir, version="0", status=4, installDir="~"):
2323
self.inDir = os.path.abspath(inDir)
2424
self.outDir = os.path.abspath(outDir)
2525
self.exclude = self.getExcludeList()
26+
print self.exclude
2627
self.fileList = self.getFileList()
2728
self.installDir = installDir
2829
self.outFiles = []
@@ -45,12 +46,15 @@ def getExcludeList(self):
4546
return rv
4647

4748
def copyTestData(self):
48-
outDir = "tests/testdata"
49+
outDir = os.path.join(self.inDir, "tests/testdata")
50+
print
4951
try:
5052
os.mkdir(outDir)
5153
except OSError:
52-
#the directory already exists
53-
pass
54+
#the directory already exists
55+
if not os.path.exists(outDir):
56+
raise
57+
5458
inBaseDir = os.path.abspath(os.path.join(self.inDir, "../testdata"))
5559
dirWalker = os.walk(inBaseDir)
5660
for (curDir, dirs, files) in dirWalker:
@@ -152,7 +156,8 @@ def test(self):
152156

153157
def makeZipFile(self):
154158
z = zipfile.ZipFile(os.path.join(self.outDir,
155-
"html5lib-%s.zip"%self.version), 'w')
159+
"html5lib-%s.zip"%self.version), 'w',
160+
zipfile.ZIP_DEFLATED)
156161
for f in self.outFiles:
157162
z.write(f, os.path.join("html5lib-%s"%self.version,
158163
f[len(self.outDir)+1:]))
@@ -226,4 +231,4 @@ def move(self, line):
226231
dirName = os.path.dirname(dirName)
227232

228233
for item in dirsToCreate[::-1]:
229-
os.mkdir(item)
234+
os.mkdir(item)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy