How to use the pyp2rpm.utils.get_default_save_path function in pyp2rpm

To help you get started, we’ve selected a few pyp2rpm 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 fedora-python / pyp2rpm / tests / test_utils.py View on Github external
def test_get_default_save_path_eval_success(self):
        if rpm:
            flexmock(rpm).should_receive(
                'expandMacro').once().and_return('foo')
        else:
            flexmock(utils).should_receive('rpm_eval').once().and_return('foo')
        assert utils.get_default_save_path() == 'foo'
github fedora-python / pyp2rpm / tests / test_utils.py View on Github external
def test_get_default_save_path_eval_fail(self):
        if rpm:
            flexmock(rpm).should_receive(
                'expandMacro').once().and_return('foo')
        else:
            flexmock(utils).should_receive('rpm_eval').once().and_return('')
            flexmock(os).should_receive('path.expanduser').once(
            ).and_return('foo')
        assert utils.get_default_save_path() == 'foo'
github fedora-python / pyp2rpm / pyp2rpm / settings.py View on Github external
from pyp2rpm import utils

DEFAULT_TEMPLATE = 'fedora'
DEFAULT_PYTHON_VERSIONS = {
    'fedora': ['3'],
    'epel7': ['2', '3'],
    'epel6': ['2'],
    'mageia': ['3'],
    'pld': ['2', '3']
}
DEFAULT_PYTHON_VERSION = DEFAULT_PYTHON_VERSIONS[DEFAULT_TEMPLATE][0]
DEFAULT_PKG_SOURCE = 'pypi'
DEFAULT_METADATA_SOURCE = 'pypi'
DEFAULT_DISTRO = 'fedora'
DEFAULT_PKG_SAVE_PATH = utils.get_default_save_path()
KNOWN_DISTROS = DEFAULT_PYTHON_VERSIONS.keys()
ARCHIVE_SUFFIXES = ['.tar', '.tgz', '.tar.gz', '.tar.bz2',
                    '.gz', '.bz2', '.xz', '.zip', '.egg', '.whl']
EXTENSION_SUFFIXES = ['.c', '.cpp']
MODULE_SUFFIXES = ('.py', '.pyc')
DOC_FILES_RE = [r'readme.+', r'licens.+', r'copying.+']
LICENSE_FILES = ['license', 'copyright', 'copying']
SPHINX_DIR_RE = r'[^/]+/doc.?'
PYPI_URL = 'https://pypi.org/pypi'
PYPI_USABLE_DATA = ['description', 'summary', 'license',
                    'home_page', 'requires']
PYTHON_INTERPRETER = '/usr/bin/python'
EXTRACT_DIST_COMMAND_ARGS = ['--quiet', '--command-packages',
                             'pyp2rpm.command', 'extract_dist']
RPM_RICH_DEP_BLACKLIST = ['epel6', 'epel7']