summaryrefslogtreecommitdiffstats
path: root/ipaplatform
diff options
context:
space:
mode:
authorPetr Spacek <pspacek@redhat.com>2016-10-20 15:27:44 +0200
committerDavid Kupka <dkupka@redhat.com>2016-10-24 13:30:12 +0200
commitc70a2873f8a4447f8b38ad7b8468fc78c91bbb63 (patch)
tree1d1cc99a8b134699694845855c144bc8e5512d27 /ipaplatform
parentc954d0e1ba2a9ba8e8da679bc7246788d086d976 (diff)
downloadfreeipa-c70a2873f8a4447f8b38ad7b8468fc78c91bbb63.tar.gz
freeipa-c70a2873f8a4447f8b38ad7b8468fc78c91bbb63.tar.xz
freeipa-c70a2873f8a4447f8b38ad7b8468fc78c91bbb63.zip
Build: replace ipaplatform magic with symlinks generated by configure
The original approach with __path__ implemented by 8f98fa1bd5f1da207fab6f89b75e0cdc19d00797 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>
Diffstat (limited to 'ipaplatform')
-rw-r--r--ipaplatform/__init__.py.in20
-rw-r--r--ipaplatform/base/services.py5
-rw-r--r--ipaplatform/fedora/__init__.py1
-rw-r--r--ipaplatform/rhel/__init__.py1
4 files changed, 3 insertions, 24 deletions
diff --git a/ipaplatform/__init__.py.in b/ipaplatform/__init__.py.in
deleted file mode 100644
index 9821bf62a..000000000
--- a/ipaplatform/__init__.py.in
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
-#
-"""Module containing platform-specific functionality.
-
-ipaplatform.constants
-ipaplatform.paths
-ipaplatform.services
-ipaplatform.tasks
-"""
-import os
-
-
-NAME = "__PLATFORM__"
-
-# Create an alias for platform specific modulues, e.g.
-# 'import ipaplatform.paths' loads 'ipaplatform/NAME/paths.py'.
-
-__path__.append(
- os.path.join(os.path.dirname(os.path.abspath(__file__)), NAME))
diff --git a/ipaplatform/base/services.py b/ipaplatform/base/services.py
index ec38b28a8..750d97953 100644
--- a/ipaplatform/base/services.py
+++ b/ipaplatform/base/services.py
@@ -483,10 +483,7 @@ class SystemdService(PlatformService):
# Objects below are expected to be exported by platform module
-def base_service_class_factory(name):
- raise NotImplementedError
-
-service = base_service_class_factory
+service = None
knownservices = None
# System may support more time&date services. FreeIPA supports ntpd only, other
diff --git a/ipaplatform/fedora/__init__.py b/ipaplatform/fedora/__init__.py
index fb172ed2b..6eb647ed0 100644
--- a/ipaplatform/fedora/__init__.py
+++ b/ipaplatform/fedora/__init__.py
@@ -20,3 +20,4 @@
'''
This module contains Fedora specific platform files.
'''
+NAME = 'fedora'
diff --git a/ipaplatform/rhel/__init__.py b/ipaplatform/rhel/__init__.py
index f94f06d22..0a56188bf 100644
--- a/ipaplatform/rhel/__init__.py
+++ b/ipaplatform/rhel/__init__.py
@@ -20,3 +20,4 @@
'''
This module contains RHEL-specific platform files.
'''
+NAME = 'rhel'