pylsd2
pylsd2 copied to clipboard
clang fixes allow compilation of EDLines
I've made some small changes to the code and CMakeLists.txt to permit this to compile on a Mac.
I still cannot get it to correctly setup the Python extension, however. The problem relates to the lib directory. For example,
$ /usr/local/bin/python3 setup.py install
running install
/usr/local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/usr/local/lib/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running bdist_egg
running egg_info
writing pylsd2.egg-info/PKG-INFO
writing dependency_links to pylsd2.egg-info/dependency_links.txt
writing top-level names to pylsd2.egg-info/top_level.txt
error: package directory 'pylsd2/lib' does not exist
If I do cp -a build/lib pylsd2/lib
, it gives a different error,
/usr/local/bin/python3 setup.py install
running install
/usr/local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/usr/local/lib/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running bdist_egg
running egg_info
writing pylsd2.egg-info/PKG-INFO
writing dependency_links to pylsd2.egg-info/dependency_links.txt
writing top-level names to pylsd2.egg-info/top_level.txt
package init file 'pylsd2/lib/__init__.py' not found (or not a regular file)
though it continues the install. Then, if I try to load the library in Python, I get
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/juno/Projects/pylsd2/pylsd2/__init__.py", line 9, in <module>
from pylsd2.wrapper import *
File "/Users/juno/Projects/pylsd2/pylsd2/wrapper.py", line 8, in <module>
from pylsd2.bindings.fn_types import *
File "/Users/juno/Projects/pylsd2/pylsd2/bindings/__init__.py", line 9, in <module>
from pylsd2.bindings.lsd_ctypes import *
File "/Users/juno/Projects/pylsd2/pylsd2/bindings/lsd_ctypes.py", line 60, in <module>
raise ImportError('Cannot load dynamic library. Did you compile LSD?')
ImportError: Cannot load dynamic library. Did you compile LSD?
I'm not sure how to resolve most of these, but thought you all might be able to.