V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 · 16 天前 · 1531 次点击

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

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

    7 条回复    2024-08-29 14:20:59 +08:00
    ysc3839
        1
    ysc3839  
       16 天前 via Android
    Dockerfile 里是怎么写的?不能先生成一个基础镜像,然后不同仓库都使用这个镜像吗?
    onichandame
        2
    onichandame  
    OP
       16 天前
    @ysc3839 正在尝试这个方案,基础镜像维护起来复杂度怎么样?会不会基础镜像升个级导致上层 repo 出一些未知问题
    ysc3839
        3
    ysc3839  
       16 天前 via Android
    @onichandame 一般不会吧,不过也得看具体做了什么操作。能发一下现在 Dockerfile 的内容吗?
    julyclyde
        4
    julyclyde  
       16 天前
    为什么是“有个客户”来提这个要求?
    uni
        5
    uni  
       16 天前
    用 uv 或者 rye
    onichandame
        6
    onichandame  
    OP
       16 天前
    @ysc3839 #3 有的是基于 python-alpine 镜像,有的是基于 ubuntu 镜像。正在调试,想先把他们统一成一个 base 镜像
    onichandame
        7
    onichandame  
    OP
       16 天前
    @julyclyde 因为这些 repo 的维护者离职了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   4081 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 10:00 · PVG 18:00 · LAX 03:00 · JFK 06:00
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.