PySlurm / pyslurm

Python Interface to Slurm
https://pyslurm.github.io
GNU General Public License v2.0
474 stars 116 forks source link

`bdist_rpm` doesn't work because `pyslurm.pyx` isn't included in the source file #246

Closed martijnkruiten closed 1 year ago

martijnkruiten commented 1 year ago

Details

Issue

python3 setup.py bdist_rpm doesn't build and package pyslurm.cpython-*.so, which is fixed by manually including pyslurm/pyslurm.pyx in the source file (pyslurm-<version>.tar.bz2) and building the RPMs with rpmbuild directly. I also had to add -D 'debug_package %{nil}' to rpmbuild to get it to build, but that's a separate issue.

tazend commented 1 year ago

Hi,

alright, I can take a look at it and try to get a fix going.

tazend commented 1 year ago

@martijnkruiten Could you test it with this branch?

martijnkruiten commented 1 year ago

Initially it failed, because it tries to build a noarch package with a binary inside, but it works with this command:

python3 setup.py bdist_rpm --force-arch=x86_64

On my system I did have to change python-devel into python3-devel in setup.cfg and the system Cython is too old (0.28.1 < 0.29.30), so I had to either take the risk and change the requirement, or install a newer version of Cython from somewhere else. That has nothing to do with this issue, though, which is now solved. Thanks a lot!

I'll leave it up to you to close this issue in case you want to keep it open until it's merged.

tazend commented 1 year ago

Alright I see, thought it was because I tested it on WSL2 Ubuntu that for some reason it would try to make a noarch package instead of x86_64, but interesting that it's also on your side - not sure why it generates the spec file like that.

You're right with the python version, it should be python3-devel, I'll change that one and then make a pull request