Skip to content

Commit aa8de5f

Browse files
authored
Merge pull request #167 from metabrainz/pyproject
Migrate to pyproject.toml and fix docs build
2 parents 2169089 + 5803ace commit aa8de5f

File tree

7 files changed

+55
-149
lines changed

7 files changed

+55
-149
lines changed
File renamed without changes.

docs/.readthedocs.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@ formats: all
1212

1313
python:
1414
install:
15-
- requirements: requirements.txt
15+
- requirements: docs/requirements.txt
16+
- method: pip
17+
path: .

docs/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sphinx==8.2.3
2+
sphinx-rtd-theme==3.0.2
3+
-r ../requirements.txt

docs/source/conf.py

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
master_doc = 'index'
5252

5353
# General information about the project.
54-
project = u'sir'
55-
copyright = u'2014 Wieland Hoffmann'
54+
project = 'sir'
55+
copyright = '2014-2016, Wieland Hoffmann; 2017-2025 MetaBrainz Foundation'
5656

5757
# The version info for the project you're documenting, acts as replacement for
5858
# |version| and |release|, also used in various other places throughout the
@@ -103,27 +103,8 @@
103103

104104
# The theme to use for HTML and HTML Help pages. See the documentation for
105105
# a list of builtin themes.
106-
html_theme = 'default'
107-
108-
# Theme options are theme-specific and customize the look and feel of a theme
109-
# further. For a list of options available for each theme, see the
110-
# documentation.
111-
html_theme_options = {
112-
"footerbgcolor": "#e7e7e7",
113-
"footertextcolor": "#444444",
114-
"sidebarbgcolor": "#ffffff",
115-
"sidebartextcolor": "#000000",
116-
"sidebarlinkcolor": "002bba",
117-
"relbarbgcolor": "#5c5789",
118-
"relbartextcolor": "#000000",
119-
"bgcolor": "#ffffff",
120-
"textcolor": "#000000",
121-
"linkcolor": "#002bba",
122-
"headbgcolor": "#ffba58",
123-
"headtextcolor": "#515151",
124-
"codebgcolor": "#dddddd",
125-
"codetextcolor": "#000000"
126-
}
106+
import sphinx_rtd_theme
107+
html_theme = 'sphinx_rtd_theme'
127108

128109
# Add any paths that contain custom themes here, relative to this directory.
129110
#html_theme_path = []
@@ -205,8 +186,8 @@
205186
# Grouping the document tree into LaTeX files. List of tuples
206187
# (source start file, target name, title, author, documentclass [howto/manual]).
207188
latex_documents = [
208-
('index', 'sir.tex', u'sir Documentation',
209-
u'Wieland Hoffmann', 'manual'),
189+
('index', 'sir.tex', 'sir Documentation',
190+
'MetaBrainz Foundation \and Wieland Hoffman', 'manual'),
210191
]
211192

212193
# The name of an image file (relative to this directory) to place at the top of
@@ -238,6 +219,6 @@
238219
# One entry per manual page. List of tuples
239220
# (source start file, name, description, authors, manual section).
240221
man_pages = [
241-
('index', 'sir', u'sir Documentation',
242-
[u'Wieland Hoffmann'], 1)
222+
('index', 'sir', 'sir Documentation',
223+
['MetaBrainz Foundation', 'Wieland Hoffmann'], 1)
243224
]

pyproject.toml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[project]
2+
name = "sir"
3+
description="Search Index Rabbit"
4+
authors = [
5+
{ name = "MetaBrainz Foundation", email = "support@metabrainz.org" },
6+
{ name = "Wieland Hoffmann" }
7+
]
8+
readme = "README.rst"
9+
license = "MIT"
10+
classifiers = [
11+
"Development Status :: 4 - Beta",
12+
"Natural Language :: English",
13+
"Operating System :: OS Independent",
14+
"Programming Language :: Python :: 3.13"
15+
]
16+
dynamic = ["version"]
17+
18+
[project.urls]
19+
Issues = "https://tickets.metabrainz.org/projects/SEARCH/issues/"
20+
Documentation = "https://sir.readthedocs.io"
21+
Repository = "https://github.com/metabrainz/sir"
22+
23+
[build-system]
24+
requires = ["setuptools>=80.3.1", "setuptools_scm>=8.3.1"]
25+
build-backend = "setuptools.build_meta"
26+
27+
[tool.setuptools]
28+
packages = [
29+
"sir",
30+
"sir.amqp",
31+
"sir.schema",
32+
"sir.trigger_generation",
33+
"sir.wscompat"
34+
]
35+
36+
[tool.setuptools_scm]

setup.py

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

sir/__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
from importlib.metadata import version, PackageNotFoundError
2+
13
try:
2-
# Version is required only for generating the documentation
3-
from .version import __version__ # noqa
4-
except ImportError:
5-
__version__ = None
4+
__version__ = version("sir")
5+
except PackageNotFoundError:
6+
pass
67

78
import sentry_sdk
89

0 commit comments

Comments
 (0)