Skip to content

Commit 58a23db

Browse files
committed
Fix packaging instructions to use python UV
1 parent 4237cca commit 58a23db

2 files changed

Lines changed: 28 additions & 7 deletions

File tree

python/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
![Python tests](https://github.com/JeffersonLab/rcdb/actions/workflows/python-tests.yml/badge.svg)
44
[![Python examples work](https://github.com/JeffersonLab/rcdb/actions/workflows/python-examples.yml/badge.svg)](https://github.com/JeffersonLab/rcdb/actions/workflows/python-examples.yml)
5+
[![C++ tests](https://github.com/JeffersonLab/rcdb/actions/workflows/cpp-tests.yml/badge.svg)](https://github.com/JeffersonLab/rcdb/actions/workflows/cpp-tests.yml)
6+
[![C++ examples](https://github.com/JeffersonLab/rcdb/actions/workflows/cpp-examples.yml/badge.svg)](https://github.com/JeffersonLab/rcdb/actions/workflows/cpp-examples.yml)
7+
[![Documentation](https://github.com/JeffersonLab/rcdb/actions/workflows/documentation.yml/badge.svg)](https://github.com/JeffersonLab/rcdb/actions/workflows/documentation.yml)
58

69
Run Configuration/Conditions Database (RCDB) stores run related information and conditions. It uses MySQL or SQLite databases to store information about runs and provides interfaces to search runs, manage data, automatic CODA integration, etc.
710

python/packaging.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,38 @@
1-
# PIP packaging instructions
2-
TL;DR;
1+
# Packaging instructions (uv)
2+
3+
We use [uv](https://docs.astral.sh/uv/) for building and publishing.
4+
5+
TL;DR:
36

47
```bash
5-
python -m pip install --upgrade build wheel twine
6-
python -m build && python -m twine upload dist/*
8+
uv build && uv publish
79
```
810

11+
`uv build` produces the sdist and wheel in `dist/`. `uv publish` uploads them to PyPI.
12+
13+
Authentication for `uv publish` (use a PyPI API token):
14+
15+
```bash
16+
uv publish --token <pypi-token>
17+
# or via environment variables
18+
export UV_PUBLISH_TOKEN=<pypi-token>
19+
uv publish
20+
```
921

1022
JLAB CERTIFICATE ERROR:
1123

24+
If you hit an SSL certificate error behind the JLab network, point uv at the JLab CA bundle:
25+
1226
```bash
13-
python -m twine upload --cert /home/romanov/JLabCA.crt dist/*
27+
export SSL_CERT_FILE=/home/romanov/JLabCA.crt
28+
uv publish
1429
```
1530

31+
References:
32+
33+
uv build: https://docs.astral.sh/uv/guides/package/
34+
35+
uv publish: https://docs.astral.sh/uv/guides/publish/
1636

1737
A tutorial:
1838
https://packaging.python.org/tutorials/packaging-projects/
@@ -21,5 +41,3 @@ edpm pip: https://pypi.org/project/edpm/#history
2141

2242
SO question for JLab certificate validation
2343
https://stackoverflow.com/questions/10667960/python-requests-throwing-sslerror/10668173
24-
25-

0 commit comments

Comments
 (0)