rustworkx icon indicating copy to clipboard operation
rustworkx copied to clipboard

'setup.py install --record {plist}' doesn't record lib/python3.9/site-packages/rustworkx/rustworkx.cpython-39.so in plist

Open yurivict opened this issue 3 years ago • 5 comments

Information

  • retworkx version: e9edfdc
  • Python version: 3.9
  • Rust version: 1.62.1
  • Operating system: FreeBSD 13.1

What is the current behavior?

plist is missing lib/python3.9/site-packages/rustworkx/rustworkx.cpython-39.so

What is the expected behavior?

n/a

Steps to reproduce the problem

regular distutils build using the --record {plist} feature.

yurivict avatar Aug 08 '22 16:08 yurivict

There's not a lot of context here, I had never heard of the disutils record feature before. The only hits I found on google were from issues you opened on other projects. That being said running python setup.py install --record plist.txt creates a plist.txt file with the following contents:

lib/python3.10/site-packages/rustworkx-0.12.0-py3.10-linux-x86_64.egg/EGG-INFO/PKG-INFO
lib/python3.10/site-packages/rustworkx-0.12.0-py3.10-linux-x86_64.egg/EGG-INFO/SOURCES.txt
lib/python3.10/site-packages/rustworkx-0.12.0-py3.10-linux-x86_64.egg/EGG-INFO/dependency_links.txt
lib/python3.10/site-packages/rustworkx-0.12.0-py3.10-linux-x86_64.egg/EGG-INFO/native_libs.txt
lib/python3.10/site-packages/rustworkx-0.12.0-py3.10-linux-x86_64.egg/EGG-INFO/not-zip-safe
lib/python3.10/site-packages/rustworkx-0.12.0-py3.10-linux-x86_64.egg/EGG-INFO/requires.txt
lib/python3.10/site-packages/rustworkx-0.12.0-py3.10-linux-x86_64.egg/EGG-INFO/top_level.txt
lib/python3.10/site-packages/rustworkx-0.12.0-py3.10-linux-x86_64.egg/rustworkx/__init__.py
lib/python3.10/site-packages/rustworkx-0.12.0-py3.10-linux-x86_64.egg/rustworkx/rustworkx.cpython-310-x86_64-linux-gnu.so
lib/python3.10/site-packages/rustworkx-0.12.0-py3.10-linux-x86_64.egg/rustworkx/visit.py
lib/python3.10/site-packages/rustworkx-0.12.0-py3.10-linux-x86_64.egg/rustworkx/__pycache__/__init__.cpython-310.pyc
lib/python3.10/site-packages/rustworkx-0.12.0-py3.10-linux-x86_64.egg/rustworkx/__pycache__/visit.cpython-310.pyc
lib/python3.10/site-packages/rustworkx-0.12.0-py3.10-linux-x86_64.egg/rustworkx/visualization/__init__.py
lib/python3.10/site-packages/rustworkx-0.12.0-py3.10-linux-x86_64.egg/rustworkx/visualization/graphviz.py
lib/python3.10/site-packages/rustworkx-0.12.0-py3.10-linux-x86_64.egg/rustworkx/visualization/matplotlib.py
lib/python3.10/site-packages/rustworkx-0.12.0-py3.10-linux-x86_64.egg/rustworkx/visualization/__pycache__/__init__.cpython-310.pyc
lib/python3.10/site-packages/rustworkx-0.12.0-py3.10-linux-x86_64.egg/rustworkx/visualization/__pycache__/graphviz.cpython-310.pyc
lib/python3.10/site-packages/rustworkx-0.12.0-py3.10-linux-x86_64.egg/rustworkx/visualization/__pycache__/matplotlib.cpython-310.pyc
bin/f2py
bin/f2py3
bin/f2py3.10

(with absolute paths I trimmed)

This looks like the correct contents to me and includes the compiled lib rustworkx.cpython-310-x86_64-linux-gnu.so. So I assume this might just be an issue on FreeBSD (especially considering the similar issues I saw you opened on other projects with compiled extensions). I'm inclined to close this especially because distutils is deprecated and will no longer be available soon and this seems to work correctly on other platforms.

mtreinish avatar Aug 08 '22 17:08 mtreinish

For some reason .so file is missing from plist on FreeBSD.

yurivict avatar Aug 08 '22 18:08 yurivict

FreeBSD ports framework is the only systems that uses the --record feature. Otherwise all similar issues were a result of bugs in other projects.

yurivict avatar Aug 08 '22 18:08 yurivict

Thanks for attempting to port rustworkx to FreeBSD. FreeBSD is not officially supported by us (we do not test it in our CI), but I am sure FreeBSD users will appreciate the efforts.

Can you post the output of python setup.py install --verbose --record plist.txt in your system?

Basically, there should be a line among the output that looks like this:

Copying rust artifact from <YOUR_PATH>/librustworkx.so to build/lib.linux-x86_64-cpython-310/rustworkx/rustworkx.cpython-310-x86_64-linux-gnu.so

I wonder if the copying is working on FreeBSD. It could be an issue with Cargo or setuptools-rust

IvanIsCoding avatar Aug 15 '22 22:08 IvanIsCoding

Also, strongly advise you to port from our releases (https://github.com/Qiskit/rustworkx/releases) instead of the main branch

IvanIsCoding avatar Aug 15 '22 22:08 IvanIsCoding