Compare commits
4
Commits
v0.1.1
...
748c9d18f9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
748c9d18f9 | ||
|
|
c23059b036 | ||
|
|
65520d0c74 | ||
|
|
64b219fd32 |
@@ -3,3 +3,4 @@ build/
|
|||||||
*.egg-info/
|
*.egg-info/
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.pyc
|
*.pyc
|
||||||
|
pyproject.toml
|
||||||
|
|||||||
@@ -124,6 +124,28 @@ fast `interval_ms` loop.
|
|||||||
|
|
||||||
**`to_datetime(unix_milli)`** — converts back to a local `datetime`, for logging.
|
**`to_datetime(unix_milli)`** — converts back to a local `datetime`, for logging.
|
||||||
|
|
||||||
|
## Versioning and the pyproject template
|
||||||
|
|
||||||
|
There is no `pyproject.toml` in this repository — it is generated from
|
||||||
|
`pyproject.toml.tmpl`, whose version line reads `version = "{{vless .TagName}}"`.
|
||||||
|
gitea-sidecar renders every `*.tmpl` in the source to its name minus the suffix before
|
||||||
|
building the wheel, so a tag of `v0.1.3` publishes version `0.1.3`; `vless` strips the
|
||||||
|
leading `v` that git wants and PEP 440 forbids. The tag is the only place a version is
|
||||||
|
written, and the published wheel cannot disagree with the tag that produced it.
|
||||||
|
|
||||||
|
Do not put a hardcoded version back into the template: the build would keep producing that
|
||||||
|
one version, and the next tag would fail with a 409 because the package file already
|
||||||
|
exists.
|
||||||
|
|
||||||
|
**Building locally** needs the same render step, since the file the build tools look for is
|
||||||
|
not in the repository:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sed 's/{{vless .TagName}}/0.0.0.dev0/' pyproject.toml.tmpl > pyproject.toml
|
||||||
|
```
|
||||||
|
|
||||||
|
`pyproject.toml` is gitignored, so a local copy never reaches a build.
|
||||||
|
|
||||||
## Error handling
|
## Error handling
|
||||||
|
|
||||||
Every method in this library catches its own exceptions, prints a line, and returns an empty
|
Every method in this library catches its own exceptions, prints a line, and returns an empty
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "i7lib"
|
name = "i7lib"
|
||||||
version = "0.1.0"
|
version = "{{vless .TagName}}"
|
||||||
description = "i7 library for scripts"
|
description = "i7 library for scripts"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.8"
|
requires-python = ">=3.8"
|
||||||
Reference in New Issue
Block a user