mirror of
https://github.com/SELinuxProject/selinux
synced 2025-01-19 03:40:50 +00:00
789d0ebbf9
When trying to get policycoreutils working in python3, I kept running into TabErrors: Traceback (most recent call last): File "/usr/lib/python-exec/python3.3/semanage", line 27, in <module> import seobject File "/usr/lib64/python3.3/site-packages/seobject.py", line 154 context = "%s%s" % (filler, raw) ^ TabError: inconsistent use of tabs and spaces in indentation Python3 is a lot stricter than python2 regarding whitespace and looks like previous commits mixed the two. When fixing this, I took the chance to fix other PEP8 style issues at the same time. This commit was made using: $ file $(find . -type f) | grep -i python | sed 's/:.*$//' > pyfiles $ autopep8 --in-place --ignore=E501,E265 $(cat pyfiles) The ignore E501 is long lines since there are many that would be wrapped otherwise, and E265 is block comments that start with ## instead of just #. Signed-off-by: Jason Zaman <jason@perfinion.com> |
||
---|---|---|
checkpolicy | ||
libselinux | ||
libsemanage | ||
libsepol | ||
policycoreutils | ||
scripts | ||
secilc | ||
sepolgen | ||
.gitignore | ||
Android.mk | ||
CleanSpec.mk | ||
Makefile | ||
README |
Please submit all bug reports and patches to selinux@tycho.nsa.gov. Subscribe via selinux-join@tycho.nsa.gov. Build dependencies on Fedora: yum install audit-libs-devel bison bzip2-devel dbus-devel dbus-glib-devel flex flex-devel flex-static glib2-devel libcap-devel libcap-ng-devel pam-devel pcre-devel python-devel setools-devel swig ustr-devel To build and install everything under a private directory, run: make DESTDIR=~/obj install install-pywrap To install as the default system libraries and binaries (overwriting any previously installed ones - dangerous!), on x86_64, run: make LIBDIR=/usr/lib64 SHLIBDIR=/lib64 install install-pywrap relabel or on x86 (32-bit), run: make install install-pywrap relabel This may render your system unusable if the upstream SELinux userspace lacks library functions or other dependencies relied upon by your distribution. If it breaks, you get to keep both pieces.