saltstack / saltstack/salt

[BUG] onedir - vendor system python packages

Open
#64,956 9 comments 1 reaction 1 assignee View on GitHub

@dwoz is already working on this.

Since Aug 18, 2023.

bug
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description
note: follow on from https://saltstackcommunity.slack.com/archives/CNZKJMQ1E/p1691686473917269?thread_ts=1691617721.100279&cid=CNZKJMQ1E

some vendors supply custom os's with built in custom python packages (cisco, sonic (edgecore, broadcom), nimble, f5) which are not available from pypi etc AND have specific customizations in them for that specific build of the custom os/image.

those python packages make adjusting config/settings of these switches/sans/loadbalancers easier.
with classic packaging it was possible to import and use these python packages, with onedir it is not.

Setup
An example with sonic:

    from sonic_py_common.multi_asic import is_multi_asic
    from sonic_py_common.interface import get_interface_table_name, get_port_table_name
    from swsscommon import swsscommon
    from swsssdk import ConfigDBConnector
    from swsscommon.swsscommon import SonicV2Connector
    import utilities_common.cli as clicommon
    from config.config_mgmt import sonic_cfggen
    import click
    import config.main as sonic_config_main

this will fail as onedir cant access these on-system libs

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.