def build_deps_from_setup_py(self): # setup_requires """Same as runtime_deps_from_setup_py, but build dependencies. Returns: list of build dependencies of the package """ build_requires = self.archive.find_list_argument('setup_requires') if 'setuptools' in build_requires: build_requires.remove('setuptools') build = self.name_convert_deps_list(deps_from_pyp_format(build_requires, runtime=False)) test = self.name_convert_deps_list(deps_from_pyp_format(self.archive.find_list_argument('tests_require'), runtime=False)) return list(build + test)
def build_deps_from_setup_py(self): # setup_requires """Same as runtime_deps_from_setup_py, but build dependencies. Returns: list of build dependencies of the package """ build_requires = self.archive.find_list_argument('setup_requires') if 'setuptools' in build_requires: build_requires.remove('setuptools') build = self.name_convert_deps_list( deps_from_pyp_format(build_requires, runtime=False)) test = self.name_convert_deps_list( deps_from_pyp_format(self.archive.find_list_argument('tests_require'), runtime=False)) return list(build + test)
def runtime_deps_from_egg_info(self): """ Returns list of runtime dependencies of the package specified in EGG-INFO/requires.txt. Dependencies are in RPM SPECFILE format - see dependency_to_rpm() for details, but names are already transformed according to current distro. Returns: list of runtime dependencies of the package """ requires_txt = self.archive.get_content_of_file("EGG-INFO/requires.txt", True) or "" return self.name_convert_deps_list(deps_from_pyp_format(requires_txt.splitlines()))
def build_deps(self): # setup_requires + tests_require """Same as runtime_deps, but build dependencies. Test requires are included only if package contains test suite. Returns: list of build dependencies of the package """ build_requires = self.metadata['setup_requires'] + self.metadata['tests_require'] if 'setuptools' not in build_requires: build_requires.append('setuptools') return self.name_convert_deps_list(deps_from_pyp_format( build_requires, runtime=False))
def runtime_deps_from_egg_info(self): """ Returns list of runtime dependencies of the package specified in EGG-INFO/requires.txt. Dependencies are in RPM SPECFILE format - see dependency_to_rpm() for details, but names are already transformed according to current distro. Returns: list of runtime dependencies of the package """ requires_txt = self.archive.get_content_of_file( 'EGG-INFO/requires.txt', True) or '' return self.name_convert_deps_list(deps_from_pyp_format(requires_txt.splitlines()))
def runtime_deps_from_setup_py(self): # install_requires """ Returns list of runtime dependencies of the package specified in setup.py. Dependencies are in RPM SPECFILE format - see dependency_to_rpm() for details, but names are already transformed according to current distro. Returns: list of runtime dependencies of the package """ install_requires = self.archive.find_list_argument('install_requires') if self.archive.has_argument('entry_points') and 'setuptools' not in install_requires: install_requires.append('setuptools') # entrypoints return self.name_convert_deps_list(deps_from_pyp_format(install_requires, runtime=True))
def build_deps(self): # setup_requires [tests_require, install_requires] """Same as runtime_deps, but build dependencies. Test and install requires are included if package contains test suite to prevent %check phase crashes because of missing dependencies Returns: list of build dependencies of the package """ build_requires = self.metadata['setup_requires'] if self.has_test_suite: build_requires += self.metadata['tests_require'] + self.metadata[ 'install_requires'] if 'setuptools' not in build_requires: build_requires.append('setuptools') return sorted( self.name_convert_deps_list( deps_from_pyp_format(build_requires, runtime=False)))
def runtime_deps(self): # install_requires """Returns list of runtime dependencies of the package specified in setup.py. Dependencies are in RPM SPECFILE format - see dependency_to_rpm() for details, but names are already transformed according to current distro. Returns: list of runtime dependencies of the package """ use_rich_deps = self.distro not in settings.RPM_RICH_DEP_BLACKLIST install_requires = self.metadata['install_requires'] if self.metadata[ 'entry_points'] and 'setuptools' not in install_requires: install_requires.append('setuptools') # entrypoints return sorted( self.name_convert_deps_list( deps_from_pyp_format(install_requires, runtime=True, use_rich_deps=use_rich_deps)))
def build_deps_from_setup_py(self): return self.name_convert_deps_list(deps_from_pyp_format(self.distribution.build_requires, runtime=False))
def runtime_deps_from_setup_py(self): return self.name_convert_deps_list(deps_from_pyp_format(self.distribution.run_requires))