pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: py-pydantic V2



> I realize pkgsrc is only providing V1 of py-pydantic. V2 was rewritten
> in Rust, and this version is not yet available as a pkgsrc package. I
> tried to install it directly with pip, but the installation process
> fails with a rust compile error. Using Python 3.11, rust 1.73.0,
> latest pkgsrc-2023Q4 and NetBSD-10.0-RC3.

The README.md of pydantic-core says

  "You'll need rust stable installed"

with a reference to https://rustup.rs/.  It is somewhat unclear
to me what "rust stable" translates to in terms of a rust version
requirement.  They go on to say 
  
  "or rust nightly if you want to generate accurate coverage."

which *might* mean that rust 1.73.0 is too old(?)  Rust is quite the
moving target.  As a packager (and user!) I must say that I detest
instructions which say "you'll need the latest and greatest, install
it in your own environment without any version and dependency
tracking".

I looked at the pydantic-core github repository, and it looks
like the code section which gave rise to the error message in
question currently is the same as what was quoted by the error
message.


That said...  I just now cloned the pydantic-core github
repository, and completed a build on NetBSD/amd64 10.99.4 with
rust 1.75.0 (from pkgsrc-wip), the only other thing than "cargo
build" I needed was to setenv

PYO3_PYTHON /usr/pkg/bin/python3.11

for the build to complete in my setup.

...which reminds me that I need to create the wip/rust175-bin package.
Meanwhile you can give it a try with the wip/rust174-bin package instead
to see if that fares any better than 1.73.0.

Regards,

- Håvard


Home | Main Index | Thread Index | Old Index