Closed tylerjw closed 2 months ago
Through some googling I found that tomllib is part of the Python standard library but only after 3.11 (I'm on Ubuntu 22.04 with 3.10 installed). It was easy enough for me to create an environment with 3.11 installed. It would be helpful to document this.
I wondered if that would be an issue. There's another option here, tomllib in the python standard library was previously called tomli, and was developed as a third party module. We could also support older python with tomli installed. I can send a patch for that.
I think it would be ok to just call it out in the readme that you developed it with a specific version of python.
Locally this is what I did to setup an environment for working on this project. I created a pixi.toml
:
[project]
name = "cps-config"
version = "0.1.0"
channels = ["conda-forge"]
platforms = ["linux-64"]
[tasks]
setup = "meson setup build"
build = { cmd = "ninja", cwd = "build", depends_on = ["setup"] }
test = { cmd = "ninja test", cwd = "build", depends_on = ["build"] }
[dependencies]
python = "3.12.*"
ninja = ">=1.11.1,<1.12"
meson = ">=1.3.2,<1.4"
cxx-compiler = ">=1.7.0,<1.8"
Then after installing the pixi tool I was able to do these things:
Install environment dependencies:
pixi install
Config/Build/Test
pixi run test
Ah, Conda :)
I opened a PR, i didnt realize I was also using some asyncio stuff from 3.11, so for now I'll just document it and have Meson enforce that for us. We can wind back the requirement later if there's a need/want for it.
When I run the tests I get this failure:
I suspect there are python dependencies for testing. It would be helpful if these were documented via some file I could use to create a python enviroment for this project. I've had good success with pixi for this in the past.