| 1 |
import re |
| 2 |
|
| 3 |
from setuptools import find_packages, setup |
| 4 |
|
| 5 |
__version__ = re.search( |
| 6 |
r"__version__.*\s*=\s*[\"]([^\"]+)[\"]", open("dateparser/__init__.py").read() |
| 7 |
).group(1) |
| 8 |
|
| 9 |
introduction = re.sub( |
| 10 |
r":members:.+|..\sautomodule::.+|:class:|:func:|:ref:", |
| 11 |
"", |
| 12 |
open("docs/introduction.rst", encoding="utf-8").read(), |
| 13 |
) |
| 14 |
history = re.sub( |
| 15 |
r":mod:|:class:|:func:", "", open("HISTORY.rst", encoding="utf-8").read() |
| 16 |
) |
| 17 |
|
| 18 |
setup( |
| 19 |
name="dateparser", |
| 20 |
version=__version__, |
| 21 |
description="Date parsing library designed to parse dates from HTML pages", |
| 22 |
long_description=introduction + "\n\n" + history, |
| 23 |
author="Scrapinghub", |
| 24 |
author_email="[email protected]", |
| 25 |
url="https://github.com/scrapinghub/dateparser", |
| 26 |
project_urls={ |
| 27 |
"History": "https://dateparser.readthedocs.io/en/latest/history.html", |
| 28 |
}, |
| 29 |
packages=find_packages(exclude=("tests", "tests.*")), |
| 30 |
include_package_data=True, |
| 31 |
install_requires=[ |
| 32 |
"python-dateutil>=2.7.0", |
| 33 |
"pytz>=2024.2", |
| 34 |
"regex>=2024.9.11", |
| 35 |
"tzlocal>=0.2", |
| 36 |
], |
| 37 |
entry_points={ |
| 38 |
"console_scripts": ["dateparser-download = dateparser_cli.cli:entrance"], |
| 39 |
}, |
| 40 |
extras_require={ |
| 41 |
"calendars": ["convertdate>=2.2.1", "hijridate"], |
| 42 |
"fasttext": ["fasttext>=0.9.1", "numpy>=1.19.3,<2"], |
| 43 |
"langdetect": ["langdetect>=1.0.0"], |
| 44 |
}, |
| 45 |
license="BSD", |
| 46 |
zip_safe=False, |
| 47 |
keywords="dateparser", |
| 48 |
python_requires=">=3.8", # Python 3.8 is required for fuzzing |
| 49 |
classifiers=[ |
| 50 |
"Development Status :: 5 - Production/Stable", |
| 51 |
"Intended Audience :: Developers", |
| 52 |
"License :: OSI Approved :: BSD License", |
| 53 |
"Natural Language :: English", |
| 54 |
"Programming Language :: Python :: 3", |
| 55 |
"Programming Language :: Python :: 3.9", |
| 56 |
"Programming Language :: Python :: 3.10", |
| 57 |
"Programming Language :: Python :: 3.11", |
| 58 |
"Programming Language :: Python :: 3.12", |
| 59 |
"Programming Language :: Python :: 3.13", |
| 60 |
"Programming Language :: Python :: Implementation :: CPython", |
| 61 |
], |
| 62 |
) |