How to use the rpg.spec.Spec function in rpg

To help you get started, we’ve selected a few rpg examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rh-lab-q / rpg / tests / mock_build / test_mock_analyse.py View on Github external
def __init__(self):
        self.spec = Spec()
        self.spec.Name = "mock"
        self.spec.Version = "1.0"
        self.spec.Release = "1%{?dist}"
        self.spec.Summary = "Hello World test program"
        self.spec.License = "GPLv2"
        self.spec.Source = "mock-1.0.tar.gz"
        self.spec.description = "Hello World C project for testing RPG."
        self.spec.prep = r'%autosetup'
        self.spec.build = "make"
        self.sack = self.load_dnf_sack()
        self._package_builder = PackageBuilder()
        self.conf = FakeConf()
        self.load_plugins()
github rh-lab-q / rpg / tests / support.py View on Github external
def assertZipEqualDir(self, z, d):
        def _get_zip_files(t):
            with zipfile.ZipFile(str(t)) as zip:
                return set(zip.namelist())

        def _get_dir_files(d):
            return set([str(f.relative_to(d)) + "/"
                        if f.is_dir() else str(f.relative_to(d))
                        for f in d.glob("**/*")])

        self.assertEqual(_get_zip_files(Path(z)), _get_dir_files(Path(d)))


class PluginTestCase(RpgTestCase):
    sack = mock.MagicMock()
    spec = Spec()
github rh-lab-q / rpg / tests / unit / test_plugins.py View on Github external
def setUp(self):
        self.maxDiff = None
        self.spec = Spec()
        self.sack = None
        self.temp_dir = Path(tempfile.mkdtemp())
github rh-lab-q / rpg / tests / unit / test_build_srpm.py View on Github external
def __init__(self):
        self._package_builder = PackageBuilder()
        self.spec = Spec()
        self.spec.Name = "hello"
        self.spec.Version = "1.4"
        self.spec.Release = "1%{?dist}"
        self.spec.Summary = "Hello World test program"
        self.spec.License = "GPLv2"
        self.spec.Source = "hello-1.4.tar.gz"
        self.spec.description = "Hello World C project for testing RPG."
        self.spec.prep = r'%autosetup'
        self.spec.build = "make"
        self.spec.install = r"make install DESTDIR=%{RPM_BUILD_ROOT}"
github rh-lab-q / rpg / rpg / __init__.py View on Github external
def __init__(self):
        self.conf = Conf()
        self._setup_logging()
        self._project_builder = ProjectBuilder()
        self.spec = Spec()
        self.sack = None
        self._package_builder = PackageBuilder()