samuelcolvin / rtoml

A fast TOML library for python implemented in rust.
https://pypi.org/project/rtoml/
MIT License
323 stars 28 forks source link

not installed correctly with pypa's build #67

Open evils opened 1 year ago

evils commented 1 year ago

hi, i maintain a package for this project in nixpkgs (though i'm not very familiar with python)

i'm trying to update it from v0.8 to v0.9 this mostly worked on our 23.05 channel (though there's two problems with the benchmarks)

but when i tried to build again on the latest nixpkgs channel it fails to install the rtoml output i suspect this is due to nixpkgs having switched to using pypa's build instead of pip

an incomplete and misnamed lib/python3.10/site-packages/_rtoml gets created but not the site-packages/rtoml i got on 23.05

evils commented 1 year ago

specifically, i get this output on 23.05

/nix/store/sqdbq6calf5z53i5n6l01rcry6jpssjs-python3.10-rtoml-0.9
├── lib
│   └── python3.10
│       └── site-packages
│           ├── rtoml
│           │   ├── __init__.py
│           │   ├── __pycache__
│           │   │   └── __init__.cpython-310.pyc
│           │   ├── py.typed
│           │   ├── _rtoml.cpython-310-x86_64-linux-gnu.so
│           │   └── _rtoml.pyi
│           └── rtoml-0.9.0.dist-info
│               ├── direct_url.json
│               ├── INSTALLER
│               ├── license_files
│               │   └── LICENSE
│               ├── METADATA
│               ├── RECORD
│               ├── REQUESTED
│               └── WHEEL
└── nix-support
    └── propagated-build-inputs

(which fails to complete due to a benchmark problem)

and this on the latest nixpkgs

/nix/store/ac7q6p5n6kl7kb86z05z1sirrh9j9p8x-python3.10-rtoml-0.9
├── lib
│   └── python3.10
│       └── site-packages
│           ├── _rtoml
│           │   ├── __init__.py
│           │   ├── __pycache__
│           │   │   ├── __init__.cpython-310.opt-1.pyc
│           │   │   └── __init__.cpython-310.pyc
│           │   └── _rtoml.cpython-310-x86_64-linux-gnu.so
│           └── rtoml-0.9.0.dist-info
│               ├── license_files
│               │   └── LICENSE
│               ├── METADATA
│               ├── RECORD
│               └── WHEEL
└── nix-support
    └── propagated-build-inputs

(which fails due to the import check failing to import rtoml)

samuelcolvin commented 1 year ago

Probably just requires an update to maturin, does python -m build pass on macos or Linux?

evils commented 1 year ago

oh, should have included this

https://github.com/NixOS/nixpkgs/compare/master...evils:nixpkgs:rtoml

i am using maturin in both builds, which works on 23.05

does python -m build pass on macos or Linux?

i don't know where i'm supposed to try that (and you probably don't know where in the Nix package i could try it...)