推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
onichandame
V2EX  ›  Python

多 repo 如何管理 Python 版本

  •  
  •   onichandame · Aug 29, 2024 · 6178 views
    This topic created in 802 days ago, the information mentioned may be changed or developed.

    公司里的服务分成了好多 repo ,nodejs 的已经合并成一个 monorepo ,但 python 的还是各管各的。现在有个客户要求我们升级所有 python 服务的 python 版本,我只能一个 repo 一个 repo 地改 Dockerfile ,一团乱麻。

    有啥好办法统一管理多 repo 的 python 版本嘛?我的想法是最好能合并成一个 monorepo ,但不太熟悉 python 业界的 monorepo 方案。想问问 V 友们有没有好的经验。

    7 replies  •  2024-08-29 14:20:59 +08:00
    ysc3839
    ysc3839
    Aug 29, 2024 via Android
    1
    Dockerfile 里是怎么写的?不能先生成一个基础镜像,然后不同仓库都使用这个镜像吗?
    onichandame
    onichandame
    OP
    Aug 29, 2024
    2
    @ysc3839 正在尝试这个方案,基础镜像维护起来复杂度怎么样?会不会基础镜像升个级导致上层 repo 出一些未知问题
    ysc3839
    ysc3839
    Aug 29, 2024 via Android
    3
    @onichandame 一般不会吧,不过也得看具体做了什么操作。能发一下现在 Dockerfile 的内容吗?
    julyclyde
    julyclyde
    Aug 29, 2024
    4
    为什么是“有个客户”来提这个要求?
    uni
    uni
    Aug 29, 2024
    5
    用 uv 或者 rye
    onichandame
    onichandame
    OP
    Aug 29, 2024
    6
    @ysc3839 #3 有的是基于 python-alpine 镜像,有的是基于 ubuntu 镜像。正在调试,想先把他们统一成一个 base 镜像
    onichandame
    onichandame
    OP
    Aug 29, 2024
    7
    @julyclyde 因为这些 repo 的维护者离职了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4748 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 02:17 · PVG 10:17 · LAX 18:17 · JFK 21:17
    ♥ Do have faith in what you're doing.