Skip to content

Commit f39f075

Browse files
committed
chore: Update template
1 parent b624fb7 commit f39f075

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

.cruft.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"template": "https://github.com/sphinx-notes/template",
3-
"commit": "cbf447e57f35a62a097cf0f8b740e047a3827e08",
3+
"commit": "93c85ed7fe6dc87e11ffd024b762a3c8c9a83a1b",
44
"checkout": null,
55
"context": {
66
"cookiecutter": {
@@ -14,10 +14,6 @@
1414
"github_repo": "any",
1515
"pypi_name": "sphinxnotes-any",
1616
"pypi_owner": "SilverRainZ",
17-
"dependencies": [
18-
"Sphinx >= 4"
19-
],
20-
"additional_docs": [],
2117
"_template": "https://github.com/sphinx-notes/template"
2218
}
2319
},

Makefile

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,56 @@
33

44
LANG = en_US.UTF-8
55

6-
MAKE = make
7-
PY = python3
8-
RM = rm -rf
6+
MAKE = make
7+
PY = python3
8+
RM = rm -rf
99

10+
# Build sphinx documentation.
1011
.PHONY: docs
1112
docs:
1213
$(MAKE) -C docs/
1314

15+
# Run unittest.
1416
.PHONY: test
1517
test:
1618
$(PY) -m unittest discover -s tests -v
1719

20+
# Build distribution package, for "install" or "upload".
1821
.PHONY: dist
1922
dist: pyproject.toml
2023
$(RM) dist/ # clean up old dist
2124
$(PY) -m build
2225

26+
# Install distribution package to user directory.
27+
#
28+
# NOTE: It may breaks your system-level packages, use at your own risk.
2329
.PHONY: install
2430
install: dist
31+
export PIP_BREAK_SYSTEM_PACKAGES=1 # required by Python 3.11+, see PEP-668
2532
$(PY) -m pip install --user --no-deps --force-reinstall dist/*.whl
2633

34+
# Publish wheel to PyPI offical server <https://pypi.org/> when you want to
35+
# You should have a PyPI account and have PyPI token configured.
36+
#
37+
# See also https://packaging.python.org/en/latest/tutorials/packaging-projects/#uploading-the-distribution-archives
2738
.PHONY: upload
2839
upload: dist
2940
$(PY) -m twine upload --repository pypi $</*
3041

31-
.PHONY: test-upload
32-
test-upload: dist
42+
# Same to the aboved "upload" target, but this publishs to PyPI test server
43+
# <https://test.pypi.org/>.
44+
.PHONY: upload-test
45+
upload-test: dist
3346
$(PY) -m twine upload --repository testpypi $</*
3447

48+
# Keep up to date with the latest template.
49+
# See also https://github.com/sphinx-notes/template.
3550
.PHONY: update-template
3651
update-template:
3752
$(PY) -m cruft update
53+
54+
# Update project version.
55+
.PHONY: bump-version
56+
bump-version:
57+
@echo -n "Please enter the version to bump: "
58+
@read version && $(PY) -m cruft update --variables-to-update "{ \"version\" : \"$$version\" }"

0 commit comments

Comments
 (0)