From 50087480ff7e20dfab79484abf813ea56a394624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20N=C3=A4slund?= Date: Mon, 17 Jan 2022 18:59:47 +0100 Subject: [PATCH] Moving to a more modern build system --- pyproject.toml | 7 +++++++ setup.cfg | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 44 ++------------------------------------------ 3 files changed, 58 insertions(+), 42 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d1ebbe6..4202faf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,10 @@ +[build-system] +requires = [ + "setuptools >= 48", + "wheel >= 0.29.0" +] +build-backend = 'setuptools.build_meta' + [tool.isort] multi_line_output = 3 include_trailing_comma = true diff --git a/setup.cfg b/setup.cfg index 73ac6ba..823ac4d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,52 @@ +[metadata] +name = webtraversallibrary +description = Abstractions of web interactions +long_description = file: README.md +long_description_content_type = text/markdown; charset=UTF-8 +url = https://github.com/klarna-incubator/webtraversallibrary +author = Klarna Bank AB +author_email = naslundx@gmail.com, +license = Apache Software License +license_file = LICENSE +classifiers = + Development Status :: 5 - Production/Stable + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + License :: OSI Approved :: Apache Software License + Operating System :: OS Independent +project_urls = + Documentation = https://webtraversallibrary.readthedocs.io + Source = https://github.com/klarna-incubator/webtraversallibrary + Tracker = https://github.com/klarna-incubator/webtraversallibrary/issues + +[options] +zip_safe = False +packages = find: +platforms = any +include_package_data = True +python_requires = >=3.7 +setup_requires = + beautifulsoup4>=4.8 + html5lib>=1.0.1 + pillow>=7.1 + requests>=2.24 + selenium>=3.141 + soupsieve>=2.0 + tld + urllib3 + prodict>=0.8 + +[options.extras_require] +test = + pylint + pytest >= 6.2.2 + black + mypy +all = + %(test)s + [coverage:run] branch = True omit = */__init__.py diff --git a/setup.py b/setup.py index 38e84ec..1abbd06 100644 --- a/setup.py +++ b/setup.py @@ -1,44 +1,4 @@ -import re import setuptools - -with open("README.md", "r") as f: - long_description = f.read() - - -with open("webtraversallibrary/version.py", "r") as f: - version = re.search(r"__version__ = \"(.*?)\"", f.read()).group(1) - - -setuptools.setup( - name="webtraversallibrary", - version=version, - author="Klarna Bank AB", - author_email="marcus.naslund@klarna.com", - description="Abstractions of web interactions", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/klarna-incubator/webtraversallibrary", - python_requires=">=3.7", - packages=["webtraversallibrary", "webtraversallibrary.driver_check"], - include_package_data=True, - install_requires=[ - "beautifulsoup4>=4.8", - "html5lib>=1.0.1", - "pillow>=7.1", - "requests>=2.24", - "selenium>=3.141", - "soupsieve>=2.0" - "tld", - "urllib3", - "prodict>=0.8" - ], - classifiers=[ - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "License :: OSI Approved :: Apache Software License", - "Operating System :: OS Independent", - ], -) +if __name__ == "__main__": + setuptools.setup()