HomeSoftware Heritage

setup.py: Install swh_ql.so alongside .py files, so it can be seen by…

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

setup.py: Install swh_ql.so alongside .py files, so it can be seen by pkg_resources

Like this:

ql_rel_paths = [
    "swh_ql.so",  # installed
    "../../query_language/swh_ql.so",  # development
]
for ql_rel_path in ql_rel_paths:
    ql_path = resource_filename("swh.search", ql_rel_path)
    if os.path.exists(ql_path):
        break
else:
    assert False, 'not found'

search_ql = Language(ql_path, "swh_search_ql")

data_files is not designed to be accessed from the same Python
package, but to write files in standard locations (typically
.desktop files in /usr/share) that other packages read with
their own discovery mechanisms.

Details

Provenance
vlorentzAuthored on Jul 28 2021, 3:08 PM
vlorentzPushed on Jul 29 2021, 9:47 AM
Differential Revision
D6039: setup.py: Install swh_ql.so alongside .py files, so it can be seen by pkg_resources
Build Status
Buildable 22816
Build 35583: test-and-buildJenkins console · Jenkins

Commit No Longer Exists

This commit no longer exists in the repository.