btrfs-progs
btrfs-progs copied to clipboard
libbtrfsutil python bindings not available in pip
The python bindings located in libbtrfsutil/python are not available within the pypi repository. This makes it very complicated for programmers to use them.
Since most of the work is already done (setup.py
is included in the repository), it was not that difficult for me to create and upload a pipy package to the testing server using the following Dockerfile:
FROM python:3.8 as build
ARG GIT_BRANCH=master
ARG TWINE_USERNAME
ARG TWINE_PASSWORD
RUN apt update && apt install -y \
libbtrfsutil-dev \
patchelf \
&& rm -rf /var/lib/apt/lists/*
RUN pip install setuptools wheel twine auditwheel
RUN git clone --branch "$GIT_BRANCH" --depth 1 https://github.com/kdave/btrfs-progs.git /btrfs-progs/
WORKDIR /btrfs-progs/libbtrfsutil/python
RUN python setup.py sdist bdist_wheel
RUN python -m auditwheel repair dist/btrfsutil-*.whl
RUN python -m twine upload --repository testpypi wheelhouse/btrfsutil-*.whl
The result is available on the pypi testing server.
Is the btrfs-progs project interested in adding python package creation to its ci pipelines? If so, how can I help integrating it?
Yes, that sounds great, thanks. I'm not familiar with pypi packaging, so please let me explore that first, but that you did the test build test will sure help.
Did this go anywhere? I've been working with BTRFS and want to use a venv without having to resort to site-packages.
Not yet, sorry.
OK - I'll try to figure out what @niklasfi did, see if I can build my own.
I would also be interested in having this available in PyPi, is there an option to raise a PR for this and include it, as suggested by @niklasfi, in the CI build to be published?