Skip to content

Commit eea9921

Browse files
committed
Sync the shared README and audited Cython scaffolding
Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
1 parent 3577537 commit eea9921

5 files changed

Lines changed: 20 additions & 14 deletions

File tree

.copier-answers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: 4dfea45
2+
_commit: 3ab9bd2
33
_src_path: https://github.com/python-project-templates/base.git
44
add_docs: true
55
add_extension: cython

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ __pycache__/
1010
*.so
1111
*.pyd
1212
*.dylib
13-
python_template_cython/*.c
14-
python_template_cython/*.cpp
13+
python_template_cython/_compiled.c
14+
python_template_cython/_native.c
1515
*.obj
1616
*.dll
1717
*.exp

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.DEFAULT_GOAL := help
2-
.PHONY: develop requirements build install lint-py lint-docs lint lints fix-py fix-docs fix format check-dist check-types checks check test tests coverage show-version patch minor major dist dist-build dist-py-wheel dist-py-sdist dist-check test-dist publish clean help
2+
.PHONY: develop requirements build install lint-py lint-docs lint lints fix-py fix-docs fix format check-dist check-types checks check test tests coverage show-version patch minor major dist dist-build dist-py-wheel dist-py-sdist dist-check test-dist publish deep-clean clean help
33

44
develop: ## install dependencies and build library
55
uv pip install -e '.[develop]'
@@ -85,8 +85,14 @@ dist: ## build and check local distributions
8585

8686
publish: dist
8787

88+
deep-clean: ## clean everything from the repository
89+
git clean -fdx
90+
8891
clean: ## remove distribution build output
8992
rm -rf build dist python_template_cython.egg-info
9093

9194
help:
92-
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "%-24s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
95+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
96+
97+
print-%:
98+
@echo '$*=$($*)'

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
A Python project template with compiled Cython extensions
44

55
[![Build Status](https://github.com/python-project-templates/python-template-cython/actions/workflows/build.yaml/badge.svg?branch=main&event=push)](https://github.com/python-project-templates/python-template-cython/actions/workflows/build.yaml)
6+
[![codecov](https://codecov.io/gh/python-project-templates/python-template-cython/branch/main/graph/badge.svg)](https://codecov.io/gh/python-project-templates/python-template-cython)
67
[![License](https://img.shields.io/github/license/python-project-templates/python-template-cython)](https://github.com/python-project-templates/python-template-cython)
8+
[![PyPI](https://img.shields.io/pypi/v/python-template-cython.svg)](https://pypi.python.org/pypi/python-template-cython)
79

8-
This project demonstrates compiling Python (`_compiled.py`) and Cython (`_native.pyx`)
9-
modules with Hatchling and hatch-cython. CI builds native wheels for Linux x86_64,
10-
Linux ARM64, macOS ARM64, and Windows x86_64.
10+
## Overview
1111

12-
See [How to build and test extensions](docs/development.md) for local development,
13-
compilation targets, and distribution checks.
12+
> [!NOTE]
13+
> This library was generated using [copier](https://copier.readthedocs.io/en/stable/) from the [Base Python Project Template repository](https://github.com/python-project-templates/base).
1414
15-
Generated with [Copier](https://copier.readthedocs.io/en/stable/) from the
16-
[Cython variant of the base template](https://github.com/python-project-templates/base).
15+
The examples compile Python (`_compiled.py`) and Cython (`_native.pyx`) modules with hatch-cython.
16+
See the [development guide](docs/development.md) for build and test instructions.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ ignore_errors = true
9494
fail_under = 50
9595

9696
[tool.hatch.build.targets.sdist]
97-
include = ["/python_template_cython", "/LICENSE", "/README.md", "/pyproject.toml"]
98-
exclude = ["*.so", "*.pyd", "*.dylib", "*.c", "*.cpp"]
97+
packages = ["python_template_cython"]
98+
exclude = ["*.so", "*.pyd", "*.dylib", "python_template_cython/_compiled.c", "python_template_cython/_native.c"]
9999

100100
[tool.hatch.build.targets.wheel]
101101
packages = [

0 commit comments

Comments
 (0)