Skip to content

Commit 45f4979

Browse files
committed
Migrate to Python 3.13, deprecate pip install
1 parent db6d475 commit 45f4979

4 files changed

Lines changed: 37 additions & 802 deletions

File tree

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13

README.md

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,20 @@ If you want to run statelessly you omit mounting volume onto /cache (not recomme
4141
$ docker run --rm -v $(pwd):/out ghcr.io/alterakey/trueseeing
4242

4343

44-
### With pip / uvx
44+
### Install with [uv](https://github.com/astral-sh/uv)
4545

46-
Alternatively, you can install our package with pip as follows. This form of installation might be useful for extensions, as it grants them the greatest freedom. Just remember you need a JRE and Android SDK (optionally; to mess with devices):
46+
Alternatively, you can install our package with [uv](https://github.com/astral-sh/uv) as follows. Especially the `uv tool install` form of installation might be useful for extensions (see below), as it grants them the greatest freedom. Just remember you need a JRE and Android SDK (optionally; to mess with devices):
4747

48-
$ pip install --user trueseeing
48+
$ uvx trueseeing
49+
50+
$ uv tool install trueseeing
4951
$ trueseeing
5052

51-
Or, with [uv](https://github.com/astral-sh/uv) you could do:
53+
### Install with pip (deprecated)
5254

53-
$ uvx trueseeing
55+
Of course you can always use the good old pip if you must:
5456

57+
$ pip install trueseeing
5558

5659
## Usage
5760

@@ -122,7 +125,7 @@ To get report generated in stdout, specify '-' as filename:
122125

123126
### Extensions
124127

125-
You can write your own commands and signatures as extensions. Extensions are placed under `/ext` (containers) or `~/.trueseeing2/extensions/` (pip) . Alternatively you can distribute your extensions as wheels. We provide type information so you can not only type-check your extensions with [mypy](https://github.com/python/mypy) but also get a decent assist from IDEs. See the details section for details.
128+
You can write your own commands and signatures as extensions. Extensions are placed under `/ext` (containers) or `~/.trueseeing2/extensions/` (uv/pip) . Alternatively you can distribute your extensions as wheels. We provide type information so you can not only type-check your extensions with [zuban](https://github.com/zubanls/zuban) but also get a decent assist from IDEs. See the details section for details.
126129

127130
## Build
128131

@@ -134,30 +137,30 @@ To build wheels you can do with [flit](https://flit.pypa.io/en/stable/), as foll
134137

135138
$ flit build
136139

137-
To hack it, you need to create a proper build environment. To create one, set up a venv, install [flit](https://flit.pypa.io/en/stable/) in there, and have it pull dependencies and validating toolchains; esp. [mypy](https://github.com/python/mypy) and [pflake8](https://github.com/csachs/pyproject-flake8). In short, do something like this:
140+
To hack it, you need to create a proper build environment. With [uv](https://github.com/astral-sh/uv) you could just do:
138141

139142
$ git clone https://github.com/alterakey/trueseeing.git wc
140-
$ python3 -m venv wc/.venv
141-
$ source wc/.venv/bin/activate
142-
(.venv) $ pip install flit
143-
(.venv) $ flit install --deps=develop -s
144-
(.venv) $ (... hack ...)
145-
(.venv) $ trueseeing ... # to run
146-
(.venv) $ mypy trueseeing && pflake8 trueseeing # to validate
143+
$ uv sync --locked --dev
144+
$ (... hack ...)
145+
$ uv run trueseeing ... # to run
146+
$ uv run zuban check trueseeing && uv run ruff trueseeing # to validate
147147
Success: no issues found in XX source files
148-
(.venv) $ flit build # to build (wheel)
149-
(.venv) $ docker build -t trueseeing . # to build (container)
148+
$ uv run flit build # to build (wheel)
149+
$ docker build -t trueseeing . # to build (container)
150150

151-
Or, with [uv](https://github.com/astral-sh/uv) you could do:
151+
With pip, to create one, firstly set up a venv, install [flit](https://flit.pypa.io/en/stable/) and validating toolchains ([zuban](https://github.com/zubanls/zuban) and [ruff](https://github.com/astral-sh/ruff)) in there, and have flit pull dependencies. In short, do something like this:
152152

153153
$ git clone https://github.com/alterakey/trueseeing.git wc
154-
$ uv sync --locked
155-
$ (... hack ...)
156-
$ uv run trueseeing ... # to run
157-
$ uv run mypy trueseeing && uv run pflake8 trueseeing # to validate
154+
$ python3 -m venv wc/.venv
155+
$ source wc/.venv/bin/activate
156+
(.venv) $ pip install flit zuban ruff
157+
(.venv) $ flit install --deps=develop -s
158+
(.venv) $ (... hack ...)
159+
(.venv) $ trueseeing ... # to run
160+
(.venv) $ zuban check trueseeing && ruff check trueseeing # to validate
158161
Success: no issues found in XX source files
159-
$ uv run flit build # to build (wheel)
160-
$ docker build -t trueseeing . # to build (container)
162+
(.venv) $ flit build # to build (wheel)
163+
(.venv) $ docker build -t trueseeing . # to build (container)
161164

162165

163166
## Details
@@ -204,7 +207,7 @@ Currently we can detect the following class of vulnerabilities, largely ones cov
204207

205208
### Extension API
206209

207-
Our extension API lays under the `trueseeing.api` package. As we provide type information with it, your IDE will assist you when writing your extensions.
210+
Our extension API lays under the `trueseeing.api` package. As we provide type information with it, your IDE will assist you when writing your extensions. Just make sure its (or its language server's) PYTHONPATH covers the venv in where our package; see `uv tool list --show-paths` if you installed it with `uv tool install`. If you installed with `uvx`, consider re-install it with `uvx install`. If you installed with pip, you've already know where it is.
208211

209212
#### Commands
210213

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ dependencies = [
3434
"pyzstd~=0.16",
3535
"termcolor~=2.4",
3636
]
37-
requires-python = ">=3.9"
37+
requires-python = ">=3.13"
3838
dynamic = ['version', 'description']
3939

4040
[project.urls]

0 commit comments

Comments
 (0)