Skip to content

Commit 1a9bc1d

Browse files
authored
Revert "Switched to new build and publish workflow (#4337)" (#4340)
This reverts commit 9603c71.
1 parent 9603c71 commit 1a9bc1d

File tree

5 files changed

+93
-53
lines changed

5 files changed

+93
-53
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 build twine
49+
run: pip install --upgrade setuptools wheel twine
5050

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

5454
- name: Publish Python package
5555
env:

Dockerfile

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

3333
# Copy files necessary for build
3434
COPY material material
35+
COPY MANIFEST.in MANIFEST.in
3536
COPY package.json package.json
3637
COPY README.md README.md
3738
COPY requirements.txt requirements.txt
38-
COPY pyproject.toml pyproject.toml
39+
COPY setup.py setup.py
3940

4041
# Perform build and cleanup artifacts and caches
4142
RUN \

MANIFEST.in

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
recursive-include material *.js *.css *.map *.html *.svg *.png *.yml
2+
recursive-include material *.ttf *.woff *.woff2 LICENSE*
3+
recursive-exclude material/overrides *
4+
recursive-exclude site *
5+
recursive-exclude src *
6+
recursive-exclude * __pycache__
7+
recursive-exclude * *.py[co]
8+
include LICENSE
9+
include package.json
10+
include README.md
11+
include requirements.txt

pyproject.toml

-50
This file was deleted.

setup.py

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Copyright (c) 2016-2022 Martin Donath <[email protected]>
2+
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to
5+
# deal in the Software without restriction, including without limitation the
6+
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7+
# sell copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
10+
# The above copyright notice and this permission notice shall be included in
11+
# all copies or substantial portions of the Software.
12+
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19+
# IN THE SOFTWARE.
20+
21+
import json
22+
from setuptools import setup, find_packages
23+
24+
# Load package.json contents
25+
with open("package.json") as f:
26+
package = json.load(f)
27+
28+
# Load list of dependencies
29+
with open("requirements.txt") as f:
30+
install_requires = [
31+
line for line in f.read().split("\n")
32+
if line and not line.startswith("#")
33+
]
34+
35+
# Load README contents
36+
with open("README.md", encoding = "utf-8") as f:
37+
long_description = f.read()
38+
39+
# Package description
40+
setup(
41+
name = "mkdocs-material",
42+
version = package["version"],
43+
url = package["homepage"],
44+
project_urls = {
45+
"Source": "https://github.com/squidfunk/mkdocs-material",
46+
},
47+
license = package["license"],
48+
description = package["description"],
49+
long_description = long_description,
50+
long_description_content_type = "text/markdown",
51+
author = package["author"]["name"],
52+
author_email = package["author"]["email"],
53+
keywords = package["keywords"],
54+
classifiers = [
55+
"Development Status :: 5 - Production/Stable",
56+
"Environment :: Web Environment",
57+
"License :: OSI Approved :: MIT License",
58+
"Programming Language :: JavaScript",
59+
"Programming Language :: Python",
60+
"Topic :: Documentation",
61+
"Topic :: Software Development :: Documentation",
62+
"Topic :: Text Processing :: Markup :: HTML"
63+
],
64+
packages = find_packages(exclude = ["src", "src.*"]),
65+
include_package_data = True,
66+
install_requires = install_requires,
67+
python_requires='>=3.7',
68+
entry_points = {
69+
"mkdocs.themes": [
70+
"material = material"
71+
],
72+
"mkdocs.plugins": [
73+
"search = material.plugins.search.plugin:SearchPlugin",
74+
"tags = material.plugins.tags.plugin:TagsPlugin"
75+
]
76+
},
77+
zip_safe = False
78+
)

0 commit comments

Comments
 (0)