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

Installation via pip not working? #1

Closed
nomeata opened this issue Jan 2, 2021 · 3 comments
Closed

Installation via pip not working? #1

nomeata opened this issue Jan 2, 2021 · 3 comments

Comments

@nomeata
Copy link

nomeata commented Jan 2, 2021

It seems that pip install doesn't actually install any .py files, only the dist-info:

$ pip install pyseccomp==0.1.1
Requirement already satisfied: pyseccomp==0.1.1 in ./env/lib/python3.7/site-packages (0.1.1)
$ find env/**/*pyseccomp*
env/lib/python3.7/site-packages/pyseccomp-0.1.1.dist-info
env/lib/python3.7/site-packages/pyseccomp-0.1.1.dist-info/RECORD
env/lib/python3.7/site-packages/pyseccomp-0.1.1.dist-info/WHEEL
env/lib/python3.7/site-packages/pyseccomp-0.1.1.dist-info/INSTALLER
env/lib/python3.7/site-packages/pyseccomp-0.1.1.dist-info/LICENSE
env/lib/python3.7/site-packages/pyseccomp-0.1.1.dist-info/METADATA
env/lib/python3.7/site-packages/pyseccomp-0.1.1.dist-info/top_level.txt
env/lib/python3.7/site-packages/pyseccomp-0.1.1.dist-info/REQUESTED
$ python3 -m pyseccomp
…/env/bin/python3: No module named pyseccomp
@nomeata
Copy link
Author

nomeata commented Jan 2, 2021

This seems to help:

diff --git a/setup.cfg b/setup.cfg
index f31f393..596cfd2 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -15,6 +15,7 @@ classifiers =
     Operating System :: POSIX :: Linux
 
 [options]
+py_modules = pyseccomp
 packages = find:
 python_requires = >=3.6
 

@cptpcrd
Copy link
Owner

cptpcrd commented Jan 2, 2021

This seems to help:

diff --git a/setup.cfg b/setup.cfg
index f31f393..596cfd2 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -15,6 +15,7 @@ classifiers =
     Operating System :: POSIX :: Linux
 
 [options]
+py_modules = pyseccomp
 packages = find:
 python_requires = >=3.6
 

Yes, some research seems to indicate that will work. I'll do some testing and release a fix together with #2.

cptpcrd added a commit that referenced this issue Jan 2, 2021
Surprisingly. "packages = find:" doesn't find standalone modules. Those
need to be listed manually.

Fixes #1.
@cptpcrd cptpcrd closed this as completed in ee49ef0 Jan 2, 2021
cptpcrd added a commit that referenced this issue Jan 2, 2021
CHANGELOG:
- fix: FE -> GE
- fix: correct architecture constants
- meta: remove pytype from "check" script
- fix: fix setup.cfg module detection (#1)
- fix: support libseccomp<2.4 (#2)
@nomeata
Copy link
Author

nomeata commented Jan 2, 2021

Thanks! Although it may be that I can't use this after all, it seems that Amazon Lambda doesn't support seccomp :-(

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

2 participants