Skip to content
Snippets Groups Projects

getting-started: replace usage of swh-storage/sql/bin/db-init by swh-db-init

see swh-core!16 (closed) in which this swh-db-init command is added.

also add init.py files so that it's considered a true package

Test Plan

none


Migrated from D568 (view on Phabricator)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Merge request was accepted

  • Nicolas Dandrimont approved this merge request

    approved this merge request

  • To try this i've re-installed locally swh-core and got the swh-db-init entry point. However, it fails as follows:

    $ swh-db-init 
    Traceback (most recent call last):
      File "/home/zack/.local/bin/swh-db-init", line 6, in <module>
        from pkg_resources import load_entry_point
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3105, in <module>
        @_call_aside
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3089, in _call_aside
        f(*args, **kwargs)
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3118, in _initialize_master_working_set
        working_set = WorkingSet._build_master()
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 578, in _build_master
        ws.require(__requires__)
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 895, in require
        needed = self.resolve(parse_requirements(requirements))
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 781, in resolve
        raise DistributionNotFound(req, requirers)
    pkg_resources.DistributionNotFound: The 'msgpack-python' distribution was not found and is required by swh.core

    even if I have msgpack installed (it loads fine in ipython3 and i can successfully run all swh-core tests).

    So I'm a bit stuck testing this to approve this diff. Any tip?

  • ! In !8 (closed), @zack wrote: To try this i've re-installed locally swh-core and got the swh-db-init entry point. However, it fails as follows:

    $ swh-db-init 
    Traceback (most recent call last):
      File "/home/zack/.local/bin/swh-db-init", line 6, in <module>
        from pkg_resources import load_entry_point
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3105, in <module>
        @_call_aside
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3089, in _call_aside
        f(*args, **kwargs)
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3118, in _initialize_master_working_set
        working_set = WorkingSet._build_master()
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 578, in _build_master
        ws.require(__requires__)
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 895, in require
        needed = self.resolve(parse_requirements(requirements))
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 781, in resolve
        raise DistributionNotFound(req, requirers)
    pkg_resources.DistributionNotFound: The 'msgpack-python' distribution was not found and is required by swh.core

    even if I have msgpack installed (it loads fine in ipython3 and i can successfully run all swh-core tests).

    So I'm a bit stuck testing this to approve this diff. Any tip?

    The name of the Python package for msgpack has been very helpfully changed from msgpack-python to msgpack in version 0.5.0. The Debian package for python3-msgpack doesn't ship the shim that's available in PyPI itself for the transition (which means that testing this in a virtualenv works fine).

    I guess this means we should migrate everything to 0.5 anyway.

  • Author Maintainer

    Merge request was merged

  • closed

Please register or sign in to reply
Loading