Poetry: What is egg-info folder

Created on 31 Jul 2020  路  2Comments  路  Source: python-poetry/poetry

Hi! I've just started using Poetry because it looks awesome. I created a new project using poetry new ... and then poetry install, and a folder called <my_project_name>.egg-info was created in my root directory. I've searched for some info about info but I didn't find anything. I think it should be better documented, e.g I don't know whether it should be checked into git or not.

  • [x] I have searched the issues of this repo and believe that this is not a duplicate.
  • [x] I have searched the documentation and believe that my question is not covered.
Question

Most helpful comment

Hi @bartekpacia the creation of the egg-info is done by distutils as described in PEP 376.

The reason why poetry install causes the creation of this is because, poetry <= 1.0.10 relies on setuptools to for the editable installation of the project under development. This is the same if you were to pip install -e . a project using setuptools.

This and similar directories are generally included in common python ignore files.

https://github.com/github/gitignore/blob/218a941be92679ce67d0484547e3e142b2f5f6f0/Python.gitignore#L9-L27

This behaviour is changing as of 1.1.0 (including current pre-release) as we have moved away from needing to generate a setup.py file to enable editable installs. Although, it is a good idea to base your ignore file off the above file.

All 2 comments

Hi @bartekpacia the creation of the egg-info is done by distutils as described in PEP 376.

The reason why poetry install causes the creation of this is because, poetry <= 1.0.10 relies on setuptools to for the editable installation of the project under development. This is the same if you were to pip install -e . a project using setuptools.

This and similar directories are generally included in common python ignore files.

https://github.com/github/gitignore/blob/218a941be92679ce67d0484547e3e142b2f5f6f0/Python.gitignore#L9-L27

This behaviour is changing as of 1.1.0 (including current pre-release) as we have moved away from needing to generate a setup.py file to enable editable installs. Although, it is a good idea to base your ignore file off the above file.

Thank you @abn! This is a good clarification:)

Was this page helpful?
0 / 5 - 0 ratings