| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A Python wrapper module has been added for the pki pkcs12-import
command to provide a mechanism to implement a workaround for JSS
import limitation.
Additional fixes by cheimes have been merged into this patch:
setup.py:
We must track all sub-packages manually.
pylint-build-scan.py:
pylint confuses the 'pki' package with the 'pki' command. The
workaround symlinks the command and analysis the command under its
alternative name.
https://fedorahosted.org/pki/ticket/1742
|
|
|
|
|
|
|
|
|
| |
In Python 3 dict methods like values(), items() and keys() return views
rather than lists. The iter equivalents are gone. Use six to use
iterators on Python 2 and 3.
In some places like setup.py a list is required. Use
list(somedict.values()) to get a list on all Python versions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enforce absolute imports or explicit relative imports. Python 3 no
longer supports implicit relative imports, that is unqualified imports
from a module's directory. In order to load a module from the same
directory inside a package, use
from . import module
The future feature 'from __future__ import absolute_import' ensures that
pki uses absolute imports on Python 2, too.
See https://www.python.org/dev/peps/pep-0328/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Large portions of the patch was automatically created with autopep8:
find base/ -name '*.py' | xargs autopep8 --in-place --ignore E309 \
--aggressive
find base/common/upgrade base/server/upgrade -type f -and \
-not -name .gitignore | autopep8 --in-place --ignore E309 --aggressive
autopep8 --in-place --ignore E309 --aggressive \
base/common/sbin/pki-upgrade \
base/server/sbin/pkispawn \
base/server/sbin/pkidestroy \
base/server/sbin/pki-server \
base/server/sbin/pki-server-upgrade
About two dozent violations were fixed manually.
https://fedorahosted.org/pki/ticket/708
|
|
|
|
|
|
| |
Move internal helper and its configuration out of the project's root
directory into scripts/. Also use re instead of fnmatch to find the
upgrade scriptlets.
|
|
Before the patch it wasn't possible to run pylint outside a RPM build.
The Python sources were split into common and server files in two
separate trees. With setup.py and tox the pki package can now be
installed and tested in a virtual env.
Tox enables developers to automate installation and testing in Python
virtual environment. The new tox.ini performs several tasks with one
command:
* It creates and installs a source distribution of pki packages and its
command line scripts
* It verifies that all CLI scripts can be execute (using its --help
argument).
* It runs pylint on all Python files and CLI scripts.
* It can run flake8 on all Python and CLI files (disabled for now).
* Finally it builds Sphinx autodocs.
I had to delay the root check in pkispawn and pkidestroy and modify two
files to get rid of Sphinx warnings.
https://fedorahosted.org/pki/ticket/696
http://tox.readthedocs.org
|