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