Skip to content

Commit a105db4

Browse files
committed
PYPI readiness
1 parent 86a6544 commit a105db4

5 files changed

Lines changed: 46 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ jobs:
1717
with:
1818
python-version: "3.12"
1919

20-
- name: Install cfb (not yet on PyPI)
21-
run: pip install git+https://github.com/rembish/cfb.git
22-
2320
- name: Install dependencies
2421
run: pip install -e ".[dev]"
2522

@@ -46,9 +43,6 @@ jobs:
4643
with:
4744
python-version: ${{ matrix.python-version }}
4845

49-
- name: Install cfb (not yet on PyPI)
50-
run: pip install git+https://github.com/rembish/cfb.git
51-
5246
- name: Install dependencies
5347
run: pip install -e ".[dev]"
5448

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
id-token: write
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
environment: pypi
14+
15+
steps:
16+
- uses: actions/checkout@v6
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v6
20+
with:
21+
python-version: "3.12"
22+
23+
- name: Install build tools
24+
run: pip install build
25+
26+
- name: Build package
27+
run: python -m build
28+
29+
- name: Publish to PyPI
30+
uses: pypa/gh-action-pypi-publish@release/v1

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ VENV := .venv
22
PYTHON := $(VENV)/bin/python
33
PIP := $(VENV)/bin/pip
44

5-
.PHONY: help install lint format typecheck test tox pre-commit clean
5+
.PHONY: help install lint format typecheck test tox pre-commit build publish clean
66

77
help:
88
@echo "Usage: make <target>"
@@ -14,12 +14,13 @@ help:
1414
@echo " test run pytest with coverage"
1515
@echo " tox run tests across py38, py310, py312"
1616
@echo " pre-commit install pre-commit hooks"
17+
@echo " build build sdist and wheel"
18+
@echo " publish upload to PyPI with twine"
1719
@echo " clean remove build artifacts and caches"
1820

1921
$(VENV)/bin/activate: pyproject.toml
2022
python3 -m venv $(VENV)
2123
$(PIP) install --upgrade pip
22-
$(PIP) install -e "../cfb"
2324
$(PIP) install -e ".[dev]"
2425
touch $(VENV)/bin/activate
2526

@@ -41,6 +42,14 @@ test: $(VENV)/bin/activate
4142
tox: $(VENV)/bin/activate
4243
$(VENV)/bin/tox
4344

45+
build: $(VENV)/bin/activate
46+
$(PIP) install build
47+
$(PYTHON) -m build
48+
49+
publish: build
50+
$(PIP) install twine
51+
$(VENV)/bin/twine upload dist/*
52+
4453
pre-commit: $(VENV)/bin/activate
4554
$(VENV)/bin/pre-commit install
4655

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ make pre-commit # install pre-commit hooks
2929
make clean # remove build artifacts and caches
3030
```
3131

32-
> **Note:** `cfb` is not yet on PyPI. The Makefile installs it from `../cfb`.
33-
> For CI, it is installed from GitHub.
34-
3532
## License
3633

3734
BSD 2-Clause — see [LICENSE](LICENSE).

pyproject.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ name = "miette"
77
version = "2.0.2"
88
description = "Miette is a light-weight Microsoft Office documents reader"
99
readme = "README.md"
10-
license = { text = "BSD-2-Clause" }
10+
license = "BSD-2-Clause"
1111
authors = [{ name = "Alex Rembish", email = "alex@rembish.org" }]
1212
requires-python = ">=3.8"
1313
classifiers = [
1414
"Development Status :: 3 - Alpha",
1515
"Intended Audience :: Developers",
16-
"License :: OSI Approved :: BSD License",
1716
"Programming Language :: Python :: 3",
1817
"Programming Language :: Python :: 3.8",
1918
"Programming Language :: Python :: 3.9",
@@ -25,10 +24,13 @@ classifiers = [
2524
"Topic :: Software Development :: Libraries :: Python Modules",
2625
"Topic :: Text Processing",
2726
]
28-
dependencies = ["cfb", "typing_extensions"]
27+
dependencies = ["cfb>=0.9.3", "typing_extensions"]
2928

3029
[project.urls]
3130
Homepage = "https://github.com/rembish/Miette"
31+
Repository = "https://github.com/rembish/Miette"
32+
Changelog = "https://github.com/rembish/Miette/blob/master/CHANGELOG.md"
33+
Issues = "https://github.com/rembish/Miette/issues"
3234

3335
[project.optional-dependencies]
3436
dev = [

0 commit comments

Comments
 (0)