| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Rename setup.py to setup.py.in so that the version variables can be autopopulated by automake/m4. This will be used in subsequent commits for building python wheels. Wheels are often built in containers, and the build containers don't have knowledge of automake, its configurations, and its environment variables, so we need to pre-populate the version information. Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Change the local includes in seccomp.h.in from: #include <seccomp-syscalls.h> #include <seccomp-kvers.h> to: #include "seccomp-syscalls.h" #include "seccomp-kvers.h" Change the include directive of seccomp-syscalls.h to be a local (rather than system-wide) include. This change is required for building python wheels inside of containers where the system-wide include path will likely not include the local path to seccomp-syscalls.h Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Add two new make targets: python-wheel: build a python wheel for this system python-wheel-pip: build the series of python wheels for pip When building the wheels for pip, cibuildwheel utilizes Docker containers. Because of this, it cannot reach outside of the build directory, src/python, so any files outside of this folder - libseccomp.a, seccomp.h, etc. - must be copied into the src/python folder. Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Add three python continuous integration jobs: build-wheel: Build a wheel for the native build system build-wheel-pip: Build wheels suitable for uploading to pip flake: Python lint checker Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
|
I pushed a new version of this patchset. Changes include:
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This patchset adds support for building Python wheels that are suitable for upload to pip.
I uploaded the wheels generated by the Ubuntu 24.04 continuous integration run to the Test PyPi pip repository. Note that I have not uploaded any wheels to the formal pip repository. (We'll likely need to create a seccomp organization in pip just like the seccomp organization in github.)
For local testing, I used the following commands on my machine:
The above commands will load the package into ~/.local/lib/{PYTHON_VERSION}/site-packages/. With the packages loaded into the local python repo, any python program on that machine (run by the same user) can utilize the newly-built packages. For example, I ran several built-in tests in the tests/ folder without updating the PYTHONPATH environment variable.