Skip to content

Commit 6a93d54

Browse files
authored
Merge pull request #25 from chireiden/feature/pyproject
Migrate from setup.py to pyproject
2 parents 22bb6bf + 3e628ba commit 6a93d54

File tree

9 files changed

+503
-296
lines changed

9 files changed

+503
-296
lines changed

MANIFEST.in

Lines changed: 0 additions & 4 deletions
This file was deleted.

Pipfile

Lines changed: 0 additions & 14 deletions
This file was deleted.

Pipfile.lock

Lines changed: 0 additions & 224 deletions
This file was deleted.

ass/renderer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,8 +456,8 @@ def populate(self, doc):
456456
self.wrap_style = doc.wrap_style
457457
self.scaled_border_and_shadow = (doc.scaled_border_and_shadow.lower() == "yes")
458458

459-
self.style_format = ", ".join(doc.SECTIONS[doc.STYLE_ASS_HEADER].field_order).encode("utf-8")
460-
self.event_format = ", ".join(doc.SECTIONS[doc.EVENTS_HEADER].field_order).encode("utf-8")
459+
self.style_format = ", ".join(doc.SECTIONS[doc.STYLE_ASS_HEADER].field_order).encode()
460+
self.event_format = ", ".join(doc.SECTIONS[doc.EVENTS_HEADER].field_order).encode()
461461

462462
for d_style in doc.styles:
463463
style = self.make_style()

pyproject.toml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
[project]
2+
name = "ass"
3+
version = "1.0.0"
4+
description = "A library for parsing and manipulating Advanced SubStation Alpha subtitle files."
5+
authors = [
6+
{ name="Tony Young", email="[email protected]" },
7+
{ name="FichteFoll", email="[email protected]" },
8+
{ name="Myaamori" },
9+
]
10+
maintainers = [
11+
{ name="FichteFoll", email="[email protected]" },
12+
]
13+
readme = "README.md"
14+
requires-python = ">=3.8"
15+
license = "MIT"
16+
license-files = ["LICENSE"]
17+
classifiers = [
18+
"Development Status :: 4 - Beta",
19+
"Intended Audience :: Developers",
20+
"Operating System :: OS Independent",
21+
"Programming Language :: Python :: 3",
22+
"Topic :: Multimedia :: Video",
23+
"Topic :: Software Development :: Libraries",
24+
"Topic :: Text Processing :: Markup",
25+
]
26+
dependencies = []
27+
28+
[project.urls]
29+
homepage = "http://github.com/chireiden/python-ass"
30+
issues = "http://github.com/chireiden/python-ass/issues"
31+
releasenotes = "https://github.com/chireiden/python-ass/releases"
32+
33+
[dependency-groups]
34+
dev = [
35+
"coverage",
36+
"flake8==3.7.9",
37+
"pytest",
38+
]
39+
40+
[build-system]
41+
requires = ["uv_build>=0.8.22,<0.9.0"]
42+
build-backend = "uv_build"

setup.py

Lines changed: 0 additions & 29 deletions
This file was deleted.

tests/test_ass.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def test_default_sections(self):
5858
assert len(doc.styles) == 0
5959
assert len(doc.events) == 0
6060

61-
def test_scipt_info(self):
61+
def test_script_info(self):
6262
TEST_SCRIPT_INFO = dedent("""\
6363
[Script Info]
6464
ScriptType: v4.00+
@@ -80,9 +80,11 @@ def test_scipt_info(self):
8080
assert copy["Arbitrary Field"] == "hi"
8181
assert doc.play_res_x == 500
8282

83+
@pytest.mark.skip("Unimplemented")
8384
def test_styles(self):
8485
pass
8586

87+
@pytest.mark.skip("Unimplemented")
8688
def test_events(self):
8789
pass
8890

tox.ini

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,8 @@
1-
[tox]
2-
envlist = py35,py36,py37,py38,flake8
3-
4-
[testenv]
5-
deps =
6-
pytest==5.3.5
7-
coverage==5.0.3
8-
commands =
9-
coverage run -m pytest {posargs}
10-
# coverage report -m
11-
# coverage html --skip-covered
12-
1+
# We don't use tox anymore. This is just for configuring our dev tools.
132
[pytest]
143
testpaths =
154
tests
16-
# Linters
17-
[testenv:flake8]
18-
skipsdist = True
19-
basepython = python3
20-
deps =
21-
flake8==3.7.9
22-
# flake8-docstrings==1.3.0
23-
commands =
24-
flake8 {posargs} .
255

26-
# Other tools
276
[flake8]
287
exclude =
298
./.*,
@@ -58,4 +37,5 @@ exclude_lines =
5837
# Have to re-enable the standard pragma
5938
pragma: no cover
6039
@(abc\.)?abstractmethod
40+
@pytest\.mark\.skip
6141
if __name__ == ['"]__main__['"]:

0 commit comments

Comments
 (0)