py-toxcore-c
py-toxcore-c copied to clipboard
Failed to install package
clang: error: no such file or directory: 'pytox/av.c'
clang: error: no input files
error: command '/usr/bin/clang' failed with exit code 1
In ubuntu 20.4LTS:
- create directory
pytoxand clone from this directory:git clone --recurse-submodules https://github.com/Toktok/c-toxcore
git clone https://github.com/TokTok/py-toxcore-c.git - create script
build-toxcore.shwith+xmode:
#!/bin/bash
# dependencies for toxcore: libsodium, libm, libpthread, librt
# gits:
# git clone --recurse-submodules https://github.com/Toktok/c-toxcore
# git clone https://github.com/TokTok/py-toxcore-c.git
cd c-toxcore
rm -rf _build > /dev/null 2>&1
cmake -B _build -D BOOTSTRAP_DAEMON=OFF -D BUILD_TOXAV=OFF -D DHT_BOOTSTRAP=OFF -D ENABLE_SHARED=ON
cd _build
make
cd ../../
cp -r c-toxcore/toxav/* py-toxcore-c/pytox/toxav/
cp -r c-toxcore/toxcore/* py-toxcore-c/pytox/toxcore/
cp -r c-toxcore/toxencryptsave/* py-toxcore-c/pytox/toxencryptsave/
cp c-toxcore/_build/lib*.* py-toxcore-c/pytox/
# edit library-path in py-toxcore-c/setup.py: libraries = ["py-toxcore-c/pytox/toxcore",]
# pip install py-toxcore-c/
-
edit cmake-options as you wish and execute
build-toxcore.sh -
if the build is successful, then edit the correct path to the library in the file
py-toxcore-c/setup.py:
from distutils.core import Extension
from distutils.core import setup
libraries = [
"py-toxcore-c/pytox/toxcore", # This !
]
cflags = [
"-funsigned-char",
]
setup(
name="py-toxcore-c",
version="0.2.19",
description="Python binding for Tox the skype replacement",
author="Iphigenia Df",
author_email="[email protected]",
url="http://github.com/TokTok/py-toxcore-c",
license="GPL",
py_modules=["pytox.common"],
ext_modules=[
#Extension(
# "pytox.toxav.toxav",
# ["pytox/toxav/toxav.c"],
# extra_compile_args=cflags,
# libraries=libraries,
#),
Extension(
"pytox.toxcore.tox",
["pytox/toxcore/tox.c"],
extra_compile_args=cflags,
libraries=libraries,
),
#Extension(
# "pytox.toxencryptsave.toxencryptsave",
# ["pytox/toxencryptsave/toxencryptsave.c"],
# extra_compile_args=cflags,
# libraries=libraries,
#),
],
)
- Enjoy:
pip install py-toxcore-c/
You need to run cython (for now). See the Dockerfile for an example. I'll add cythonize to the setup.py soon.
iphydf, Please regenerate the api for the master branch toxcore
Something is missing:
python3 -c 'import pytox.toxcore.tox as core; print(core.Tox_Ptr.__init__.__doc__)' produce undefined symbol send_group_invite_packet:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: /home/mint/_freeLance/8Work_kivy/src/.venv/lib/python3.8/site-packages/pytox/toxcore/tox.cpython-38-x86_64-linux-gnu.so: undefined symbol: send_group_invite_packet
I'll look into it next week.