Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace distutils with setuptools #2

Merged

Conversation

MoutonSanglant
Copy link

Poetry can not retrieve version because the setup.py file uses distutils which does not provide the egg_infocommand for depency resolution. When the command is not available, poetry tries to retrieve version and dependencies as strings in setup.py with AST parsing which cannot interpret __version__ variable. Because of that, Poetry thinks there is no available version and refuse to add dependency.
Read more: python-poetry/poetry#673

While distutils does not provide capacity to generate the egg_info command setuptools can and it is the now (as of 2019) recommended tool to generate package setup files.

Here is an abstract from python official documentation:

Although you can use pure distutils for many projects, it does not support defining dependencies on other projects and is missing several convenience utilities for automatically populating distribution metadata correctly that are provided by setuptools. Being outside the standard library, setuptools also offers a more consistent feature set across different versions of Python, and (unlike distutils), recent versions of setuptools support all of the modern metadata fields described in Core metadata specifications.

source: https://packaging.python.org/guides/tool-recommendations/

@sylvainemery sylvainemery merged commit ed783a9 into JohnPaulConcierge:master Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants