Skip to content

Commit

Permalink
Migrate from setup.py to pyproject.toml (#1238)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsfehler committed Feb 14, 2024
1 parent 1bfb537 commit b824a46
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 69 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/upload-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ jobs:
with:
python-version: 3.x

- run: pip install setuptools twine wheel
- run: pip install build twine wheel

- run: pip install -e .

- run: python setup.py sdist bdist_wheel
- run: python -m build

- run: twine upload --skip-existing dist/*
env:
Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

47 changes: 47 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "splinter"
author = "CobraTeam"
author_email = "andrewsmedina@gmail.com"
keywords = [
"splinter", "django", "flask", "selenium", "browser", "automation"
]
description = "Browser abstraction for web acceptance testing"
readme = "README.rst"
license = {file = "LICENSE"}
requires-python = ">=3.8"
classifiers = [
"Operating System :: OS Independent",
"License :: OSI Approved :: BSD License",
"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"
]
dependencies = [
"urllib3>=1.26.14,<3.0"
]
dynamic = ["version"]

[project.urls]
documentation = "https://splinter.readthedocs.io/"
changelog = "https://github.com/cobrateam/splinter/tree/master/docs/news"
source = "https://github.com/cobrateam/splinter/"
tracker = "https://github.com/cobrateam/splinter/issues"

[project.optional-dependencies]
"zope.testbrowser" = ["zope.testbrowser>=6.0", "lxml>=4.2.4", "cssselect"]
django = ["Django>=2.0.6", "lxml>=4.2.4", "cssselect"]
flask = ["Flask>=2.3.2", "lxml>=4.2.4", "cssselect"]
selenium = ["selenium>=4.1.0,<4.17.0"]

[tool.hatch.build]
include = ["splinter/**"]

[tool.hatch.version]
path = "splinter/version.py"
60 changes: 0 additions & 60 deletions setup.py

This file was deleted.

1 change: 0 additions & 1 deletion splinter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from splinter.browser import Browser
from splinter.config import Config
from splinter.version import __version__ # noqa: F401
from splinter.version import __version_info__ # noqa: F401


__all__ = [
Expand Down
3 changes: 1 addition & 2 deletions splinter/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
__version_info__ = (0, 21, 0)
__version__ = ".".join(map(str, __version_info__))
__version__ = "0.21.0"

0 comments on commit b824a46

Please sign in to comment.