-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setup: use pyproject.toml file and update test workflow (#160)
* setup: use pyproject.toml file * update workflow * simplify workflow * review order * remove condition
- Loading branch information
Showing
3 changed files
with
106 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/ | ||
[build-system] | ||
requires = ["setuptools>=61.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "htmldate" | ||
description = "Fast and robust extraction of original and updated publication dates from URLs and web pages." | ||
readme = "README.md" | ||
license = { text = "Apache 2.0" } | ||
dynamic = ["version"] | ||
requires-python = ">=3.8" | ||
authors = [ | ||
{name = "Adrien Barbaresi", email = "barbaresi@bbaw.de"} | ||
] | ||
keywords=[ | ||
"datetime", | ||
"date-parser", | ||
"entity-extraction", | ||
"html-extraction", | ||
"html-parsing", | ||
"metadata-extraction", | ||
"webarchives", | ||
"web-scraping", | ||
] | ||
classifiers = [ | ||
# http://pypi.python.org/pypi?%3Aaction=list_classifiers | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Console", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Education", | ||
"Intended Audience :: Information Technology", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: MacOS :: MacOS X", | ||
"Operating System :: Microsoft :: Windows", | ||
"Operating System :: POSIX :: Linux", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Topic :: Internet :: WWW/HTTP", | ||
"Topic :: Scientific/Engineering :: Information Analysis", | ||
"Topic :: Text Processing :: Linguistic", | ||
"Topic :: Text Processing :: Markup :: HTML", | ||
] | ||
dependencies = [ | ||
"charset_normalizer >= 3.3.2", | ||
"dateparser >= 1.1.2", # 1.1.3+ slower | ||
# see tests on Github Actions | ||
"lxml == 4.9.2 ; platform_system == 'Darwin' and python_version <= '3.8'", | ||
"lxml >= 5.2.2, < 6 ; platform_system != 'Darwin' or python_version > '3.8'", | ||
"python-dateutil >= 2.8.2", | ||
"urllib3 >= 1.26, < 3", | ||
] | ||
|
||
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html | ||
[tool.setuptools] | ||
packages = ["htmldate"] | ||
|
||
# https://packaging.python.org/en/latest/guides/single-sourcing-package-version/ | ||
[tool.setuptools.dynamic] | ||
version = {attr = "htmldate.__version__"} | ||
|
||
[project.scripts] | ||
htmldate = "htmldate.cli:main" | ||
|
||
[project.urls] | ||
"Homepage" = "https://htmldate.readthedocs.io" | ||
"Source" = "https://github.com/adbar/htmldate" | ||
"Blog" = "https://adrien.barbaresi.eu/blog/" # /tag/htmldate.html | ||
"Tracker" = "https://github.com/adbar/htmldate/issues" | ||
|
||
# Development extras | ||
[project.optional-dependencies] | ||
dev = [ | ||
"black", | ||
"mypy", | ||
"pytest", | ||
"pytest-cov", | ||
"types-dateparser", | ||
"types-python-dateutil", | ||
"types-lxml", | ||
"types-urllib3", | ||
] | ||
speed = [ | ||
"backports-datetime-fromisoformat; python_version < '3.11'", | ||
"faust-cchardet >= 2.1.19", | ||
"urllib3[brotli]", | ||
] | ||
all = [ | ||
"htmldate[dev]", | ||
"htmldate[speed]", | ||
] | ||
|
||
# [tool.pytest.ini_options] | ||
# testpaths = "tests/*test*.py" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters