Server IP : 85.214.239.14 / Your IP : 18.118.28.31 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/root/usr/lib/python3/dist-packages/resolvelib-0.9.0.dist-info/ |
Upload File : |
Metadata-Version: 2.1 Name: resolvelib Version: 0.9.0 Summary: Resolve abstract dependencies into concrete ones Home-page: https://github.com/sarugaku/resolvelib Author: Tzu-ping Chung Author-email: uranusjr@gmail.com License: ISC License Keywords: dependency,resolution Classifier: Development Status :: 3 - Alpha Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: ISC License (ISCL) Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 3 Classifier: Topic :: Software Development :: Libraries :: Python Modules Description-Content-Type: text/x-rst License-File: LICENSE Provides-Extra: examples Requires-Dist: html5lib ; extra == 'examples' Requires-Dist: packaging ; extra == 'examples' Requires-Dist: pygraphviz ; extra == 'examples' Requires-Dist: requests ; extra == 'examples' Provides-Extra: lint Requires-Dist: black ; extra == 'lint' Requires-Dist: flake8 ; extra == 'lint' Requires-Dist: isort ; extra == 'lint' Requires-Dist: mypy ; extra == 'lint' Requires-Dist: types-requests ; extra == 'lint' Provides-Extra: release Requires-Dist: build ; extra == 'release' Requires-Dist: towncrier ; extra == 'release' Requires-Dist: twine ; extra == 'release' Provides-Extra: test Requires-Dist: commentjson ; extra == 'test' Requires-Dist: packaging ; extra == 'test' Requires-Dist: pytest ; extra == 'test' ========== ResolveLib ========== ResolveLib at the highest level provides a ``Resolver`` class that includes dependency resolution logic. You give it some things, and a little information on how it should interact with them, and it will spit out a resolution result. Intended Usage ============== :: import resolvelib # Things I want to resolve. requirements = [...] # Implement logic so the resolver understands the requirement format. class MyProvider: ... provider = MyProvider() reporter = resolvelib.BaseReporter() # Create the (reusable) resolver. resolver = resolvelib.Resolver(provider, reporter) # Kick off the resolution process, and get the final result. result = resolver.resolve(requirements) The provider interface is specified in ``resolvelib.providers``. You don't need to inherit anything, however, only need to implement the right methods. Terminology =========== The intention of this section is to unify the terms we use when talking about this code base, and packaging in general, to avoid confusion. Class and variable names in the code base should try to stick to terms defined here. Things passed into ``Resolver.resolve()`` and provided by the provider are all considered opaque. They don't need to adhere to this set of terminologies. Nothing can go wrong as long as the provider implementers can keep their heads straight. Package ------- A thing that can be installed. A Package can have one or more versions available for installation. Version ------- A string, usually in a number form, describing a snapshot of a Package. This number should increase when a Package posts a new snapshot, i.e a higher number means a more up-to-date snapshot. Specifier --------- A collection of one or more Versions. This could be a wildcard, indicating that any Version is acceptable. Candidate --------- A combination of a Package and a Version, i.e. a "concrete requirement". Python people sometimes call this a "locked" or "pinned" dependency. Both of "requirement" and "dependency", however, SHOULD NOT be used when describing a Candidate, to avoid confusion. Some resolver architectures refer this as a "specification", but it is not used here to avoid confusion with a *Specifier*. Requirement ----------- An intention to acquire a needed package, i.e. an "abstract requirement". A "dependency", if not clarified otherwise, also refers to this concept. A Requirement should specify two things: a Package, and a Specifier. Contributing ============ Please see `developer documentation <./DEVELOPMENT.rst>`__.