mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-07-29 15:55:47 -05:00
Build: replace ipaplatform magic with symlinks generated by configure
The original approach with __path__ implemented
by 8f98fa1bd5 broke Pylint:
We decided to resort back to symlinks as it is easiest solution
which does not break pylint in weird ways.
This commit introduces configure --with-ipaplatform option.
https://fedorahosted.org/freeipa/ticket/6418
Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
+1
-19
@@ -6,11 +6,9 @@ from __future__ import print_function
|
||||
|
||||
import copy
|
||||
import sys
|
||||
import textwrap
|
||||
|
||||
from astroid import MANAGER, register_module_extender
|
||||
from astroid import MANAGER
|
||||
from astroid import scoped_nodes
|
||||
from astroid.builder import AstroidBuilder
|
||||
|
||||
|
||||
def register(linter):
|
||||
@@ -257,19 +255,3 @@ def fix_ipa_classes(cls):
|
||||
fake_class(cls, ipa_class_members[class_name_with_module])
|
||||
|
||||
MANAGER.register_transform(scoped_nodes.Class, fix_ipa_classes)
|
||||
|
||||
|
||||
def ipaplatform_transform():
|
||||
"""Module aliases for IpaPlatformImporter
|
||||
"""
|
||||
return AstroidBuilder(MANAGER).string_build(textwrap.dedent(
|
||||
"""
|
||||
from ipaplatform.base import constants
|
||||
from ipaplatform.base import paths
|
||||
from ipaplatform.base import services
|
||||
from ipaplatform.base import tasks
|
||||
"""
|
||||
))
|
||||
|
||||
|
||||
register_module_extender(MANAGER, 'ipaplatform', ipaplatform_transform)
|
||||
|
||||
Reference in New Issue
Block a user