Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add libsec bindings to pypi install #88

Open
mflaxman opened this issue Aug 23, 2021 · 2 comments
Open

Add libsec bindings to pypi install #88

mflaxman opened this issue Aug 23, 2021 · 2 comments

Comments

@mflaxman
Copy link
Collaborator

Currently this is only manually supported!

@mflaxman
Copy link
Collaborator Author

From a buidl user:

After running the libsec_build.py file, I just built the wheel package regularly with python3 -m build. Oh, but I had to modify the setup.py file with this patch:

index 931f6b3..91c33e0 100644
--- a/setup.py
+++ b/setup.py
@@ -21,5 +21,8 @@ setup(
         "License :: OSI Approved :: MIT License",
         "Operating System :: OS Independent",
     ],
+    package_data={
+        "buidl": [".c", "*.h", "*.o", "*.so", "*.txt"],
+    },
     python_requires=">=3.6",
 )

Probably really just needs the *.so and *.txt, but I did them all to be safe. I have not looked into what it takes to build architecture specific wheel files, but it would be nice to have such a thing published to pypi (or whatever) so that buidl works out of the box with cecc enabled if you have the libraries installed when you install it.

@mflaxman
Copy link
Collaborator Author

mflaxman commented Mar 1, 2022

Update: I just spent an hour playing with this patch on pypi and couldn't get it to work. I'm not sure if that's something to do with pypi's config (I'm uploading to test pypi and installing direct from pypi), or on my end (I suppose I could install directly from my own wheel to find out). I got errors when I tried to install libsec within the virtualenv, so I modified the uploader script to do the whole thing outside the virtualenv (yikes) but that behaved strangely (couldn't import buidl using ipython at all, and importing buidl via regulat python3 had is_libsec_enabled() return False.

Leaving this as an open problem, a solution would still be great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant