# Path: pyp2rpm/version.py

# 
# Path: pyp2rpm/utils.py
# PY3 = sys.version > '3'
# class ChangeDir(object):
#     def __init__(self, new_path):
#     def __enter__(self):
#     def __exit__(self, type, value, traceback):  # TODO handle exception
# def memoize_by_args(func):
#     def memoized(*args):
# def build_srpm(specfile, save_dir):
# def remove_major_minor_suffix(scripts):
# def runtime_to_build(runtime_deps):
# def unique_deps(deps):
#     def console_to_str(s):
#     def console_to_str(s):
# def c_time_locale():
# def rpm_eval(macro):
# def get_default_save_path():


import subprocess
import time
import locale
import logging
from pyp2rpm import version
from pyp2rpm import utils
                    if item not in self.data[name]:
                        self.data[name].append(item)
            elif isinstance(self.data[name], set):
                if not isinstance(value, set):
                    value = set(value)
                self.data[name] |= value
            elif not self.data[name] and self.data[name] is not False:
                self.data[name] = value
        elif name not in self.data and value is not None:
            self.data[name] = value

    def set_from(self, data_dict, update=False):
        for k, v in data_dict.items():
            if update:
                self.update_attr(k, v)
            else:
                setattr(self, k, v)

    def get_changelog_date_packager(self):
        """Returns part of the changelog entry, containing date and packager.
        """
        try:
            packager = subprocess.Popen(
                'rpmdev-packager', stdout=subprocess.PIPE).communicate(
                )[0].strip()
        except OSError:
            # Hi John Doe, you should install rpmdevtools
            packager = "John Doe <john@doe.com>"
            logger.warn("Package rpmdevtools is missing, using default "
                        "name: {0}.".format(packager))

# Path: pyp2rpm/version.py

# 
# Path: pyp2rpm/utils.py
# PY3 = sys.version > '3'
# class ChangeDir(object):
#     def __init__(self, new_path):
#     def __enter__(self):
#     def __exit__(self, type, value, traceback):  # TODO handle exception
# def memoize_by_args(func):
#     def memoized(*args):
# def build_srpm(specfile, save_dir):
# def remove_major_minor_suffix(scripts):
# def runtime_to_build(runtime_deps):
# def unique_deps(deps):
#     def console_to_str(s):
#     def console_to_str(s):
# def c_time_locale():
# def rpm_eval(macro):
# def get_default_save_path():


# Path: pyp2rpm/package_data.py
import subprocess
import time
import locale
import logging
from pyp2rpm import version
from pyp2rpm import utils

                    if item not in self.data[name]:
                        self.data[name].append(item)
            elif isinstance(self.data[name], set):
                if not isinstance(value, set):
                    value = set(value)
                self.data[name] |= value
            elif not self.data[name] and self.data[name] is not False:
                self.data[name] = value
        elif name not in self.data and value is not None:
            self.data[name] = value

    def set_from(self, data_dict, update=False):
        for k, v in data_dict.items():
            if update:
                self.update_attr(k, v)
            else:
                setattr(self, k, v)

    def get_changelog_date_packager(self):
        """Returns part of the changelog entry, containing date and packager.
        """
        try:
            packager = subprocess.Popen(
                'rpmdev-packager', stdout=subprocess.PIPE).communicate(
                )[0].strip()
        except OSError:
            # Hi John Doe, you should install rpmdevtools
            packager = "John Doe <john@doe.com>"
            logger.warn("Package rpmdevtools is missing, using default "
                        "name: {0}.".format(packager))

        with utils.c_time_locale():