Skip to content

Commit

Permalink
chore: migrate build setup from setuptools to build (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt authored Nov 11, 2024
1 parent d342099 commit bb88079
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ extends:
- script: |
python -m pip install --upgrade pip
pip install -r local-requirements.txt
python setup.py sdist bdist_wheel
python -m build --sdist
displayName: 'Install & Build'
- task: EsrpRelease@7
inputs:
Expand Down
2 changes: 1 addition & 1 deletion local-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
black==24.3.0
pytest-cov==3.0.0
mypy==0.961
setuptools==70.3.0
build==1.2.2.post1
twine==4.0.1
wheel==0.38.1
flake8==4.0.1
Expand Down
41 changes: 41 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[build-system]
requires = ["setuptools==75.4.0", "setuptools_scm==8.1.0"]
build-backend = "setuptools.build_meta"

[project]
name = "pytest-playwright"
description = "A pytest wrapper with fixtures for Playwright to automate web browsers"
readme = "README.md"
authors = [
{name = "Microsoft"}
]
license = {file = "LICENSE"}
requires-python = ">=3.9"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Framework :: Pytest",
]
dynamic = ["version"]
dependencies = [
"playwright>=1.18",
"pytest>=6.2.4,<9.0.0",
"pytest-base-url>=1.0.0,<3.0.0",
"python-slugify>=6.0.0,<9.0.0",
]

[project.urls]
homepage = "https://github.com/microsoft/playwright-pytest"

[project.entry-points.pytest11]
playwright = "pytest_playwright.pytest_playwright"

[tool.setuptools]
packages = ["pytest_playwright"]
[tool.setuptools_scm]
42 changes: 0 additions & 42 deletions setup.py

This file was deleted.

2 changes: 0 additions & 2 deletions tests/assets/django/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@

USE_I18N = True

USE_L10N = True

USE_TZ = True


Expand Down
3 changes: 3 additions & 0 deletions tests/test_playwright.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

import os
from pathlib import Path
import sys

import pytest
Expand Down Expand Up @@ -438,6 +439,8 @@ def test_base_url(page):


def test_django(testdir: pytest.Testdir) -> None:
# Workaround for https://github.com/pytest-dev/pytest/issues/10651
os.environ.setdefault("PYTHONPATH", str(Path(__file__).parent.parent))
testdir.makepyfile(
"""
from django.test import TestCase
Expand Down

0 comments on commit bb88079

Please sign in to comment.