简体   繁体   English

Python 打包 - 如何生成 python 鸡蛋目录名称,如“myapp-0.2a40-py3.9-linux-x86_64.egg”?

[英]Python packaing - How is the python egg dir name like `myapp-0.2a40-py3.9-linux-x86_64.egg` generated?

I installed a python package My-App with python setup.py install and an egg directory My_App-0.2a40-py3.9-linux-x86_64.egg is created under my site-packages .我安装了 python package My-Apppython setup.py install和一个 egg 目录 My_App-0.2a40- site-packages My_App-0.2a40-py3.9-linux-x86_64.egg下创建。

I looked up setuptools docs and source code and some PEPs trying to figure out how the egg dir name My_App-0.2a40-py3.9-linux-x86_64.egg is generated, but I didn't find anything relavent.我查找了 setuptools 文档和源代码以及一些 PEP,试图弄清楚 egg 目录名称My_App-0.2a40-py3.9-linux-x86_64.egg是如何生成的,但我没有找到任何相关的东西。

So how is the python egg dir name like My_App-0.2a40-py3.9-linux-x86_64.egg generated?那么像My_App-0.2a40-py3.9-linux-x86_64.egg这样的 python egg 目录名称是如何生成的?

  • How does My-App package name in the setup.py get converted to My_App in the dir name? setup.py中的My-App package 名称如何转换为目录名称中的My_App
  • py3.9-linux-x86_64 looks like a platform tag, but not exactly - it doesn't contain cp39 etc. I want to know how this is generated. py3.9-linux-x86_64看起来像一个平台标签,但不完全是 - 它不包含cp39等。我想知道它是如何生成的。

The doc https://setuptools.pypa.io/en/latest/deprecated/python_eggs.html points out the functions used to construct the egg dir name.文档https://setuptools.pypa.io/en/latest/deprecated/python_eggs.html指出了用于构造 egg 目录名称的函数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM