astral-sh / uv

An extremely fast Python package and project manager, written in Rust.
https://docs.astral.sh/uv
Apache License 2.0
25.22k stars 732 forks source link

pynmstar failure to compile sub package #7589

Open varioustoxins opened 1 month ago

varioustoxins commented 1 month ago

HI if I do uv tool install nef-pipelines it all appears to work However, when I run the command nef [the main entry point to my application in nef-pipelines], I get

raise ImportError('Could not import cnmrstar sub-module! Your installation appears to be broken.')

This appears to be because the dependant c file from the package pynmstar.cnmrstar doesn't appear to be compiled properly. I appear to have had similar but different problems as the c component seems to require the latest setup tools to compile. So when using pip I have to do

pip install --upgrade wheel setuptools

and sometimes

pip install --upgrade wheel setuptools backports.tarfile

to get the installation to work, this is on a centos 7 system but I have had this problem elsewhere

this is with the latest uv at time of writing 0.4.13

varioustoxins commented 1 month ago

this is also discussed here, binary wheels are provided so it shouldn't need to build the c

charliermarsh commented 1 month ago

Can you share the output of uv tool install with --verbose?

varioustoxins commented 1 month ago

here you go output.txt

charliermarsh commented 1 month ago

So for one: pynmrstar only ships wheels for Python 3.9 and earlier. You're on Python 3.12, so I think it's correct that it's building from source.

charliermarsh commented 1 month ago

See here (look at cp39 etc.).

charliermarsh commented 1 month ago

It seems to install ok for me:

❯ nef
Usage: nef [OPTIONS] COMMAND [ARGS]...

Options:
  --install-completion [bash|zsh|fish|powershell|pwsh]
                                  Install completion for the specified shell.
  --show-completion [bash|zsh|fish|powershell|pwsh]
                                  Show completion for the specified shell, to
                                  copy it or customize the installation.
  --help                          Show this message and exit.

Commands:
  chains     - carry out operations on chains
  csv        - read [rdcs]
  deep       - read deep [peaks]
  echidna    - read echidna data [peaks]
  entry      - carry out operations on the nef file entry
  fasta      - read and write fasta sequences
  fit        - carry out fitting operations [alpha]
  frames     - carry out operations on frames in nef files
  globals    - add global options to the pipeline [use save as your last...
  header     - add a header to the stream
  help       - help on the nef pipelines tools and their usage
  loops      - carry out operations on loops in nef frames
  mars       - read and write mars [shifts and sequences]
  modelfree  - write modelfree [relaxation data]
  nmrpipe    - read nmrpipe [peaks shifts & sequencess]
  nmrstar    - read NMR-STAR [sequences & shifts]
  nmrview    - read and write nmrview [peaks, sequences & shifts]
  pales      - read and write pales/dc [rdcs]
  pdbx       - read pdb [sequences]
  peaks      - carry out operations on nef peaks
  rpf        - write rpf shifts
  save       - save the entries in the stream to a file / files or stdout...
  series     - carry out operations on a data series
  shifts     - carry out operations on shifts [average]
  shiftx2    - read shiftx2 data [shifts]
  shifty     - write shifty [shifts]
  simulate   - simulate data
  sink       - read the current stream and don't write anything
  sparky     - read sparky files [shifts]
  stream     - stream a nef file
  talos      - read and write talos files [shifts & restraints]
  test       - run the test suite
  xcamshift  - write xcamshift for xplor [shifts]
  xeasy      - read xeasy files [flya dialect: sequence]
  xplor      - read xplor [sequences, dihedral & distance restraints]

Do you see a failure when running just nef? Or when you run nef within a project, some specific subcommand, etc.?

varioustoxins commented 1 month ago

just running it as a command as you did... it maybe a centos 7 oddity it is quite old, I have tried it on a couple of centos 7 installations, so I assume that its not just a wrinkle on a particular install

charliermarsh commented 1 month ago

Are you able to put together a reproduction, e.g., with Docker?

varioustoxins commented 3 weeks ago

Hi Charlie

I should be able to, but it will take a little while as I am currently on holiday till the 24th and I will need an hour or two to sort something out.

gary

charliermarsh commented 3 weeks ago

No problem, thanks for following up. Enjoy your holiday.