Skip to content

Commit 216fecc

Browse files
committed
package: set of supported package formats
Introduce this set as single source of thruth for all package formats supported by Rift.
1 parent a5526e4 commit 216fecc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/rift/package/_base.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
_TESTS_DIR = 'tests'
5151
_DOC_FILES = ['README', 'README.md', 'README.rst', 'README.txt']
5252

53+
54+
# Rift supported package formats
55+
RIFT_SUPPORTED_FORMATS = ('rpm',)
56+
57+
5358
class Package(ABC):
5459
"""
5560
Abstract base object in Rift framework.
@@ -63,7 +68,7 @@ def __init__(self, name, config, staff, modules, _format, buildfile):
6368
self._modules = modules
6469
self.name = name
6570
# check package format
66-
if _format != 'rpm':
71+
if _format not in RIFT_SUPPORTED_FORMATS:
6772
raise RiftError(f"Unsupported package format {_format}")
6873
self.format = _format
6974

0 commit comments

Comments
 (0)