The command poetry build generates a setup.py file based on the contents of pyproject.toml. The setup file imports distutils.core.setup as the setup function, but passes build arguments that are only available in setuptools.setup, such as entry_points. When the package is installed via pip, this is not an issue, because pip still uses setuptools.setup, regardless of what is imported (see the distutils docs). However, other package managers may run into issues, because they use distutils. My distribution's package manager (Portage) generates warnings:
usr/lib64/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
/usr/lib64/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'entry_points'
warnings.warn(msg)
/usr/lib64/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
In this case, no scripts will be installed, because the entry_points argument is not applicable for distutils.
Since setup.py uses features that are explicitly part of setuptools, but not distutils, I suggest that setuptools.setup should be imported. Would you accept a PR for this?
I am on the latest Poetry version.
I have searched the issues of this repo and believe that this is not a duplicate.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption).OS version and name: Gentoo Linux
Poetry version: 0.12.11
The command
poetry buildgenerates asetup.pyfile based on the contents ofpyproject.toml. The setup file importsdistutils.core.setupas the setup function, but passes build arguments that are only available insetuptools.setup, such asentry_points. When the package is installed via pip, this is not an issue, because pip still usessetuptools.setup, regardless of what is imported (see the distutils docs). However, other package managers may run into issues, because they use distutils. My distribution's package manager (Portage) generates warnings:In this case, no scripts will be installed, because the
entry_pointsargument is not applicable for distutils.Since
setup.pyuses features that are explicitly part of setuptools, but not distutils, I suggest thatsetuptools.setupshould be imported. Would you accept a PR for this?