Skip to content

Commit 9603c71

Browse files
authored
Switched to new build and publish workflow (#4337)
1 parent b344ae8 commit 9603c71

File tree

5 files changed

+53
-93
lines changed

5 files changed

+53
-93
lines changed

.github/workflows/publish.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ jobs:
4646
python-version: ${{ env.PYTHON_VERSION }}
4747

4848
- name: Set up Python dependencies
49-
run: pip install --upgrade setuptools wheel twine
49+
run: pip install --upgrade build twine
5050

5151
- name: Build Python package
52-
run: python setup.py build sdist bdist_wheel --universal
52+
run: python -m build
5353

5454
- name: Publish Python package
5555
env:

Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@ WORKDIR /tmp
3232

3333
# Copy files necessary for build
3434
COPY material material
35-
COPY MANIFEST.in MANIFEST.in
3635
COPY package.json package.json
3736
COPY README.md README.md
3837
COPY requirements.txt requirements.txt
39-
COPY setup.py setup.py
38+
COPY pyproject.toml pyproject.toml
4039

4140
# Perform build and cleanup artifacts and caches
4241
RUN \

MANIFEST.in

-11
This file was deleted.

pyproject.toml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
[build-system]
2+
requires = ["hatchling", "hatch-requirements-txt", "hatch-nodejs-version"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "mkdocs-material"
7+
dynamic = [
8+
"version",
9+
"dependencies",
10+
"license",
11+
"description",
12+
"authors",
13+
"keywords",
14+
"urls",
15+
]
16+
readme = "README.md"
17+
requires-python = ">=3.7"
18+
classifiers = [
19+
"Development Status :: 5 - Production/Stable",
20+
"Environment :: Web Environment",
21+
"License :: OSI Approved :: MIT License",
22+
"Programming Language :: JavaScript",
23+
"Programming Language :: Python",
24+
"Topic :: Documentation",
25+
"Topic :: Software Development :: Documentation",
26+
"Topic :: Text Processing :: Markup :: HTML",
27+
]
28+
29+
[project.entry-points."mkdocs.plugins"]
30+
search = "material.plugins.search.plugin:SearchPlugin"
31+
tags = "material.plugins.tags.plugin:TagsPlugin"
32+
33+
[project.entry-points."mkdocs.themes"]
34+
material = "material"
35+
36+
[tool.hatch.version]
37+
source = "nodejs"
38+
39+
[tool.hatch.metadata.hooks.nodejs]
40+
fields = ["license", "description", "authors", "keywords", "urls"]
41+
42+
[tool.hatch.metadata.hooks.requirements_txt]
43+
filename = "requirements.txt"
44+
45+
[tool.hatch.build.targets.wheel]
46+
include = ["/material"]
47+
48+
[tool.hatch.build.targets.sdist]
49+
include = ["/material", "/package.json", "/requirements.txt"]
50+
exclude = ["/material/overrides"]

setup.py

-78
This file was deleted.

0 commit comments

Comments
 (0)