File tree Expand file tree Collapse file tree 3 files changed +47
-56
lines changed
Expand file tree Collapse file tree 3 files changed +47
-56
lines changed Original file line number Diff line number Diff line change 1+ [build-system ]
2+ requires = [" setuptools>=61.0" ]
3+ build-backend = " setuptools.build_meta"
4+
5+ [project ]
6+ name = " html5-parser"
7+ version = " 0.4.12"
8+ authors = [
9+ {name = " Kovid Goyal" , email = " redacted@acme.com" },
10+ ]
11+ description = " Fast C based HTML 5 parsing for python"
12+ license = " Apache-2.0"
13+ classifiers = [
14+ " Development Status :: 5 - Production/Stable" ,
15+ " Intended Audience :: Developers" ,
16+ " Natural Language :: English" ,
17+ " Operating System :: OS Independent" ,
18+ " Programming Language :: Python" ,
19+ " Topic :: Text Processing" ,
20+ " Topic :: Text Processing :: Markup" ,
21+ " Topic :: Text Processing :: Markup :: HTML" ,
22+ " Topic :: Text Processing :: Markup :: XML" ,
23+ ]
24+ dependencies = [
25+ " chardet" ,
26+ " lxml>=3.8.0" ,
27+ ]
28+
29+ [project .urls ]
30+ Homepage = " https://html5-parser.readthedocs.io"
31+
32+ [project .optional-dependencies ]
33+ soup = [" beautifulsoup4" ]
34+
35+ [tool .setuptools ]
36+ package-dir = {"" = " src" }
37+ packages = [" html5_parser" ]
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1717from collections import namedtuple
1818from copy import deepcopy
1919from itertools import chain
20- try :
21- import configparser
22- except ImportError :
23- import ConfigParser as configparser
20+ from typing import NamedTuple
2421
2522self_path = os .path .abspath (__file__ )
2623base = os .path .dirname (self_path )
3229is_ci = os .environ .get ('CI' ) == 'true'
3330Env = namedtuple ('Env' , 'cc cflags ldflags linker debug cc_name cc_ver' )
3431PKGCONFIG = os .environ .get ('PKGCONFIG_EXE' , 'pkg-config' )
35- cfg = configparser .ConfigParser ()
36- cfg .read (os .path .join (base , 'setup.cfg' ))
37- version = namedtuple ('Version' , 'major minor patch' )(
38- * map (int , cfg .get ('metadata' , 'version' ).split ('.' )))
32+ with open ('pyproject.toml' ) as f :
33+ version_str = re .search (r'^version = "(\d+)\.(\d+).(\d+)"' , f .read (), flags = re .MULTILINE )
34+
35+ class Version (NamedTuple ):
36+ major : int
37+ minor : int
38+ patch : int
39+ assert version_str is not None
40+ version = Version (* map (int , version_str .groups ()))
3941
4042
4143def safe_makedirs (path ):
You can’t perform that action at this time.
0 commit comments