@classmethod<EOL><INDENT>def from_package_versions(<EOL>cls,<EOL>packages: typing.List[PackageVersion],<EOL>packages_locked: typing.List[PackageVersion] = None,<EOL>meta: PipfileMeta = None,<EOL>):<DEDENT>
pipfile = Pipfile.from_package_versions(packages, meta=meta)<EOL>pipfile_lock = None<EOL>if packages_locked:<EOL><INDENT>pipfile_lock = PipfileLock.from_package_versions(pipfile, packages_locked, meta=meta)<EOL><DEDENT>instance = cls(pipfile, pipfile_lock)<EOL>instance.sanitize_source_indexes()<EOL>return instance<EOL>
Create project from PackageVersion objects.

        If locked packages are omitted, the lock has to be explicitly performed to generate
        in-memory Pipfile.lock representation.