SELinux Archive on
 help / color / Atom feed
* ImportError: cannot import name '_selinux' from 'selinux' with swig-4.0.0
@ 2019-05-16 15:37 Petr Lautrbach
  0 siblings, 0 replies; only message in thread
From: Petr Lautrbach @ 2019-05-16 15:37 UTC (permalink / raw)
  To: selinux\

Hello all,

selinux python module can't be imported when it's built using

>>> import selinux
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.7/site-packages/selinux/", 
  line 13, in <module>
    from . import _selinux
ImportError: cannot import name '_selinux' from 'selinux' 

You can see it at [1]

The reason is that swig changed the way how it generates
Now it uses:
from . import _selinux

I've started to rewrite libselinux in order not to build and 
python bindings manually, but to use python distutils [2]. It 
still fails
on travis but I was able to built it and use it on my local 
rawhide machine.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-16 15:37 ImportError: cannot import name '_selinux' from 'selinux' with swig-4.0.0 Petr Lautrbach

SELinux Archive on

Archives are clonable:
	git clone --mirror selinux/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 selinux selinux/ \
	public-inbox-index selinux

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox