|
1 | 1 | importast |
2 | | -importos |
3 | 2 | importcodecs |
4 | 3 |
|
| 4 | +fromos.pathimportjoin,dirname |
5 | 5 | fromsetuptoolsimportsetup,find_packages |
6 | 6 |
|
7 | 7 |
|
|
22 | 22 | 'Topic :: Text Processing :: Markup :: HTML' |
23 | 23 | ] |
24 | 24 |
|
25 | | -current_dir=os.path.dirname(__file__) |
26 | | -withcodecs.open(os.path.join(current_dir,'README.rst'),'r','utf8')asreadme_file: |
27 | | -withcodecs.open(os.path.join(current_dir,'CHANGES.rst'),'r','utf8')aschanges_file: |
| 25 | +here=dirname(__file__) |
| 26 | +withcodecs.open(join(here,'README.rst'),'r','utf8')asreadme_file: |
| 27 | +withcodecs.open(join(here,'CHANGES.rst'),'r','utf8')aschanges_file: |
28 | 28 | long_description=readme_file.read()+'\n'+changes_file.read() |
29 | 29 |
|
30 | 30 | version=None |
31 | | -withopen(os.path.join("html5lib","__init__.py"),"rb")asinit_file: |
| 31 | +withopen(join("html5lib","__init__.py"),"rb")asinit_file: |
32 | 32 | t=ast.parse(init_file.read(),filename="__init__.py",mode="exec") |
33 | 33 | assertisinstance(t,ast.Module) |
34 | 34 | assignments=filter(lambdax:isinstance(x,ast.Assign),t.body) |
|