mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipaplatform: Add constants submodule
Introduce a ipaplatform/constants.py file to store platform related constants, which are not paths. Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Petr Spacek <pspacek@redhat.com>
This commit is contained in:
parent
5ea41abe98
commit
a487e42d3f
3
Makefile
3
Makefile
@ -159,10 +159,11 @@ version-update: release-update
|
||||
if [ "$(SUPPORTED_PLATFORM)" != "" ]; then \
|
||||
sed -e s/__PLATFORM__/$(SUPPORTED_PLATFORM)/ \
|
||||
ipaplatform/__init__.py.in > ipaplatform/__init__.py; \
|
||||
rm -f ipaplatform/paths.py ipaplatform/services.py ipaplatform/tasks.py; \
|
||||
rm -f ipaplatform/paths.py ipaplatform/services.py ipaplatform/tasks.py ipaplatform/constants.py; \
|
||||
ln -s $(SUPPORTED_PLATFORM)/paths.py ipaplatform/paths.py; \
|
||||
ln -s $(SUPPORTED_PLATFORM)/services.py ipaplatform/services.py; \
|
||||
ln -s $(SUPPORTED_PLATFORM)/tasks.py ipaplatform/tasks.py; \
|
||||
ln -s $(SUPPORTED_PLATFORM)/constants.py ipaplatform/constants.py; \
|
||||
fi
|
||||
|
||||
if [ "$(SKIP_API_VERSION_CHECK)" != "yes" ]; then \
|
||||
|
@ -381,6 +381,7 @@ rm -f ipapython/version.py
|
||||
rm -f ipaplatform/services.py
|
||||
rm -f ipaplatform/tasks.py
|
||||
rm -f ipaplatform/paths.py
|
||||
rm -f ipaplatform/constants.py
|
||||
make version-update
|
||||
cd ipa-client; ../autogen.sh --prefix=%{_usr} --sysconfdir=%{_sysconfdir} --localstatedir=%{_localstatedir} --libdir=%{_libdir} --mandir=%{_mandir}; cd ..
|
||||
%if ! %{ONLY_CLIENT}
|
||||
@ -403,6 +404,7 @@ rm -f ipapython/version.py
|
||||
rm -f ipaplatform/services.py
|
||||
rm -f ipaplatform/tasks.py
|
||||
rm -f ipaplatform/paths.py
|
||||
rm -f ipaplatform/constants.py
|
||||
make version-update
|
||||
%if ! %{ONLY_CLIENT}
|
||||
make install DESTDIR=%{buildroot}
|
||||
|
11
ipaplatform/base/constants.py
Normal file
11
ipaplatform/base/constants.py
Normal file
@ -0,0 +1,11 @@
|
||||
#
|
||||
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
|
||||
#
|
||||
|
||||
'''
|
||||
This base platform module exports platform dependant constants.
|
||||
'''
|
||||
|
||||
|
||||
class BaseConstantsNamespace(object):
|
||||
pass
|
16
ipaplatform/fedora/constants.py
Normal file
16
ipaplatform/fedora/constants.py
Normal file
@ -0,0 +1,16 @@
|
||||
#
|
||||
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
|
||||
#
|
||||
|
||||
'''
|
||||
This Fedora base platform module exports platform related constants.
|
||||
'''
|
||||
|
||||
# Fallback to default constant definitions
|
||||
from ipaplatform.redhat.constants import RedHatConstantsNamespace
|
||||
|
||||
|
||||
class FedoraConstantsNamespace(RedHatConstantsNamespace):
|
||||
pass
|
||||
|
||||
constants = FedoraConstantsNamespace()
|
17
ipaplatform/redhat/constants.py
Normal file
17
ipaplatform/redhat/constants.py
Normal file
@ -0,0 +1,17 @@
|
||||
#
|
||||
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
|
||||
#
|
||||
|
||||
'''
|
||||
This Red Hat OS family base platform module exports default platform
|
||||
related constants for the Red Hat OS family-based systems.
|
||||
'''
|
||||
|
||||
# Fallback to default path definitions
|
||||
from ipaplatform.base.constants import BaseConstantsNamespace
|
||||
|
||||
|
||||
class RedHatConstantsNamespace(BaseConstantsNamespace):
|
||||
pass
|
||||
|
||||
constants = RedHatConstantsNamespace()
|
16
ipaplatform/rhel/constants.py
Normal file
16
ipaplatform/rhel/constants.py
Normal file
@ -0,0 +1,16 @@
|
||||
#
|
||||
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
|
||||
#
|
||||
|
||||
'''
|
||||
This RHEL base platform module exports platform related constants.
|
||||
'''
|
||||
|
||||
# Fallback to default constant definitions
|
||||
from ipaplatform.redhat.constants import RedHatConstantsNamespace
|
||||
|
||||
|
||||
class RHELConstantsNamespace(RedHatConstantsNamespace):
|
||||
pass
|
||||
|
||||
constants = RHELConstantsNamespace()
|
Loading…
Reference in New Issue
Block a user