-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Generated setup.py should use setuptools.setup instead of distutils.core.setup #866
Comments
This is becoming a problem in Fedora as well. In particular we are seeing file based egg-info being generated rather than directories, which can cause issues with RPM. |
I just started testing from distutils.core import setup Quoting from https://docs.python.org/3/library/distutils.html
Sadly, I am one of these people. This issue should be a top priority. |
For all fedora builds of python packages that were published with poetry, I have to patch the generated |
Is there a workaround on this with |
My solution was to create distro packages of "dephell" for the Arch Linux distribution and use https://dephell.readthedocs.io/cmd-deps-convert.html to convert pyproject.toml into a usable setup.py file. I just download the source tarball from GitHub instead of PyPI, and as a result I also get testsuite files. |
@eli-schwartz Thanks, this worked out! But I think the team still has to put this on higher priority. |
Sure, happy to help. But you're correct that "don't use poetry, use something else" is not remotely optimal. I too am waiting for a better solution in poetry itself. |
I'm going to be including a fix for this in my work to fix #1350 since there is currently an outstanding PR ( pypa/setuptools#1767 ) to bring |
- Added support for specifying a set of license files as part of the project config. - Moved the license file config into the package configuration. (`Poetry.create()`) this matches how similar configurations such as “readme” are configured. - Updated the builders to use the project level license file list instead of searching for their own (previously different) lists of license files. - Moved the existing auto-discovery behaviours to become the default case during `create()` if nothing specific was configured. - Fix python-poetry#866 by modifing the base template used by `SdistBuilder`. It now uses `setuptools`, since as documented by @seifertm in issue python-poetry#866 `pip` uses `setuptools` anyway and this clears the way to immediately supporting pypa/setuptools#1767 once this is merged and released from `setuptools`.
- Added support for specifying a set of license files as part of the project config. - Moved the license file config into the package configuration. (`Poetry.create()`) this matches how similar configurations such as “readme” are configured. - Updated the builders to use the project level license file list instead of searching for their own (previously different) lists of license files. - Moved the existing auto-discovery behaviours to become the default case during `create()` if nothing specific was configured. - Fix python-poetry#866 by modifing the base template used by `SdistBuilder`. It now uses `setuptools`, since as documented by @seifertm in issue python-poetry#866 `pip` uses `setuptools` anyway and this clears the way to immediately supporting pypa/setuptools#1767 once this is merged and released from `setuptools`. Until `setuptools` updates to support multiple license files, this will result in a single log line in the debug output from `setuptools` so this is ok to merge before the change to `setuptools` is merged.
- Added support for specifying a set of license files as part of the project config. - Moved the license file config into the package configuration. (`Poetry.create()`) this matches how similar configurations such as “readme” are configured. - Updated the builders to use the project level license file list instead of searching for their own (previously different) lists of license files. - Moved the existing auto-discovery behaviours to become the default case during `create()` if nothing specific was configured. - Added tests for the new features - Added the “license-files” field to the poetry-schema.json - Fix python-poetry#866 by modifing the base template used by `SdistBuilder`. It now uses `setuptools`, since as documented by @seifertm in issue python-poetry#866 `pip` uses `setuptools` anyway and this clears the way to immediately supporting pypa/setuptools#1767 once this is merged and released from `setuptools`. Until `setuptools` updates to support multiple license files, this will result in a single log line in the debug output from `setuptools` so this is ok to merge before the change to `setuptools` is merged.
- Added support for specifying a set of license files as part of the project config. - Moved the license file config into the package configuration. (`Poetry.create()`) this matches how similar configurations such as “readme” are configured. - Updated the builders to use the project level license file list instead of searching for their own (previously different) lists of license files. - Moved the existing auto-discovery behaviours to become the default case during `create()` if nothing specific was configured. - Added tests for the new features - Documented the new configuration field. - Added the “license-files” field to the poetry-schema.json - Fix python-poetry#866 by modifing the base template used by `SdistBuilder`. It now uses `setuptools`, since as documented by @seifertm in issue python-poetry#866 `pip` uses `setuptools` anyway and this clears the way to immediately supporting pypa/setuptools#1767 once this is merged and released from `setuptools`. Until `setuptools` updates to support multiple license files, this will result in a single log line in the debug output from `setuptools` so this is ok to merge before the change to `setuptools` is merged.
- Added support for specifying a set of license files as part of the project config. - Moved the license file config into the package configuration. (`Poetry.create()`) this matches how similar configurations such as “readme” are configured. - Updated the builders to use the project level license file list instead of searching for their own (previously different) lists of license files. - Moved the existing auto-discovery behaviours to become the default case during `create()` if nothing specific was configured. - Added tests for the new features - Documented the new configuration field. - Added the “license-files” field to the poetry-schema.json - Fix python-poetry#866 by modifing the base template used by `SdistBuilder`. It now uses `setuptools`, since as documented by @seifertm in issue python-poetry#866 `pip` uses `setuptools` anyway and this clears the way to immediately supporting pypa/setuptools#1767 once this is merged and released from `setuptools`. Until `setuptools` updates to support multiple license files, this will result in a single log line in the debug output from `setuptools` so this is ok to merge before the change to `setuptools` is merged.
- Added support for specifying a set of license files as part of the project config. - Moved the license file config into the package configuration. (`Poetry.create()`) this matches how similar configurations such as “readme” are configured. - Updated the builders to use the project level license file list instead of searching for their own (previously different) lists of license files. - Moved the existing auto-discovery behaviours to become the default case during `create()` if nothing specific was configured. - Added tests for the new features - Documented the new configuration field. - Added the “license-files” field to the poetry-schema.json - Fix python-poetry#866 by modifing the base template used by `SdistBuilder`. It now uses `setuptools`, since as documented by @seifertm in issue python-poetry#866 `pip` uses `setuptools` anyway and this clears the way to immediately supporting pypa/setuptools#1767 once this is merged and released from `setuptools`. Until `setuptools` updates to support multiple license files, this will result in a single log line in the debug output from `setuptools` so this is ok to merge before the change to `setuptools` is merged.
- Added support for specifying a set of license files as part of the project config. - Moved the license file config into the package configuration. (`Poetry.create()`) this matches how similar configurations such as “readme” are configured. - Updated the builders to use the project level license file list instead of searching for their own (previously different) lists of license files. - Moved the existing auto-discovery behaviours to become the default case during `create()` if nothing specific was configured. - Added tests for the new features - Documented the new configuration field. - Added the “license-files” field to the poetry-schema.json - Updated pre-commit config to use the correct black source repo. - Fix python-poetry#866 by modifing the base template used by `SdistBuilder`. It now uses `setuptools`, since as documented by @seifertm in issue python-poetry#866 `pip` uses `setuptools` anyway and this clears the way to immediately supporting pypa/setuptools#1767 once this is merged and released from `setuptools`. Until `setuptools` updates to support multiple license files, this will result in a single log line in the debug output from `setuptools` so this is ok to merge before the change to `setuptools` is merged.
- Fixes python-poetry#1350 - Added support for specifying a set of license files as part of the project config. - Moved the license file config into the package configuration. (`Poetry.create()`) this matches how similar configurations such as “readme” are configured. - Updated the builders to use the project level license file list instead of searching for their own (previously different) lists of license files. - Moved the existing auto-discovery behaviours to become the default case during `create()` if nothing specific was configured. - Added tests for the new features - Documented the new configuration field. - Added the “license-files” field to the poetry-schema.json - Updated pre-commit config to use the correct black source repo. - Fix python-poetry#866 by modifing the base template used by `SdistBuilder`. It now uses `setuptools`, since as documented by @seifertm in issue python-poetry#866 `pip` uses `setuptools` anyway and this clears the way to immediately supporting pypa/setuptools#1767 once this is merged and released from `setuptools`. Until `setuptools` updates to support multiple license files, this will result in a single log line in the debug output from `setuptools` so this is ok to merge before the change to `setuptools` is merged.
- Fixes python-poetry#1350 - Added support for specifying a set of license files as part of the project config. - Moved the license file config into the package configuration. (`Poetry.create()`) this matches how similar configurations such as “readme” are configured. - Updated the builders to use the project level license file list instead of searching for their own (previously different) lists of license files. - Moved the existing auto-discovery behaviours to become the default case during `create()` if nothing specific was configured. - Added tests for the new features - Documented the new configuration field. - Added the “license-files” field to the poetry-schema.json - Updated pre-commit config to use the correct black source repo. - Fix python-poetry#866 by modifing the base template used by `SdistBuilder`. It now uses `setuptools`, since as documented by @seifertm in issue python-poetry#866 `pip` uses `setuptools` anyway and this clears the way to immediately supporting pypa/setuptools#1767 once this is merged and released from `setuptools`. Until `setuptools` updates to support multiple license files, this will result in a single log line in the debug output from `setuptools` so this is ok to merge before the change to `setuptools` is merged.
- Fixes python-poetry#1350 - Added support for specifying a set of license files as part of the project config. - Moved the license file config into the package configuration. (`Poetry.create()`) this matches how similar configurations such as “readme” are configured. - Updated the builders to use the project level license file list instead of searching for their own (previously different) lists of license files. - Moved the existing auto-discovery behaviours to become the default case during `create()` if nothing specific was configured. - Added tests for the new features - Documented the new configuration field. - Added the “license-files” field to the poetry-schema.json - Updated pre-commit config to use the correct black source repo. - Fix python-poetry#866 by modifing the base template used by `SdistBuilder`. It now uses `setuptools`, since as documented by @seifertm in issue python-poetry#866 `pip` uses `setuptools` anyway and this clears the way to immediately supporting pypa/setuptools#1767 once this is merged and released from `setuptools`. Until `setuptools` updates to support multiple license files, this will result in a single log line in the debug output from `setuptools` so this is ok to merge before the change to `setuptools` is merged.
- Fixes python-poetry#1350 - Added support for specifying a set of license files as part of the project config. - Moved the license file config into the package configuration. (`Poetry.create()`) this matches how similar configurations such as “readme” are configured. - Updated the builders to use the project level license file list instead of searching for their own (previously different) lists of license files. - Moved the existing auto-discovery behaviours to become the default case during `create()` if nothing specific was configured. - Added tests for the new features - Documented the new configuration field. - Added the “license-files” field to the poetry-schema.json - Updated pre-commit config to use the correct black source repo. - Fix python-poetry#866 by modifing the base template used by `SdistBuilder`. It now uses `setuptools`, since as documented by @seifertm in issue python-poetry#866 `pip` uses `setuptools` anyway and this clears the way to immediately supporting pypa/setuptools#1767 once this is merged and released from `setuptools`. Until `setuptools` updates to support multiple license files, this will result in a single log line in the debug output from `setuptools` so this is ok to merge before the change to `setuptools` is merged.
- Fixes python-poetry#1350 - Added support for specifying a set of license files as part of the project config. - Moved the license file config into the package configuration. (`Poetry.create()`) this matches how similar configurations such as “readme” are configured. - Updated the builders to use the project level license file list instead of searching for their own (previously different) lists of license files. - Moved the existing auto-discovery behaviours to become the default case during `create()` if nothing specific was configured. - Added tests for the new features - Documented the new configuration field. - Added the “license-files” field to the poetry-schema.json - Updated pre-commit config to use the correct black source repo. - Fix python-poetry#866 by modifing the base template used by `SdistBuilder`. It now uses `setuptools`, since as documented by @seifertm in issue python-poetry#866 `pip` uses `setuptools` anyway and this clears the way to immediately supporting pypa/setuptools#1767 once this is merged and released from `setuptools`. Until `setuptools` updates to support multiple license files, this will result in a single log line in the debug output from `setuptools` so this is ok to merge before the change to `setuptools` is merged.
- Fixes python-poetry#1350 - Added support for specifying a set of license files as part of the project config. - Moved the license file config into the package configuration. (`Poetry.create()`) this matches how similar configurations such as “readme” are configured. - Updated the builders to use the project level license file list instead of searching for their own (previously different) lists of license files. - Moved the existing auto-discovery behaviours to become the default case during `create()` if nothing specific was configured. - Added tests for the new features - Documented the new configuration field. - Added the “license-files” field to the poetry-schema.json - Updated pre-commit config to use the correct black source repo. - Fix python-poetry#866 by modifing the base template used by `SdistBuilder`. It now uses `setuptools`, since as documented by @seifertm in issue python-poetry#866 `pip` uses `setuptools` anyway and this clears the way to immediately supporting pypa/setuptools#1767 once this is merged and released from `setuptools`. Until `setuptools` updates to support multiple license files, this will result in a single log line in the debug output from `setuptools` so this is ok to merge before the change to `setuptools` is merged.
- Fixes python-poetry#1350 - Added support for specifying a set of license files as part of the project config. - Moved the license file config into the package configuration. (`Factory.create_poetry()`) this matches how similar configurations such as “readme” are configured. - Updated the builders to use the project level license file list instead of searching for their own (previously different) lists of license files. - Moved the existing auto-discovery behaviours to become the default case during `create_poetry()` if nothing specific was configured. - Added tests for the new features - Documented the new configuration field. - Added the “license-files” field to the poetry-schema.json - Updated pre-commit config to use the correct black source repo, and set the default language for better consistency with any other pre-commit checks that will be added in the future. - Fix python-poetry#866 by modifing the base template used by `SdistBuilder`. It now uses `setuptools`, since as documented by @seifertm in issue python-poetry#866 `pip` uses `setuptools` anyway and this clears the way to immediately supporting pypa/setuptools#1767 once this is merged and released from `setuptools`. Until `setuptools` updates to support multiple license files, this will result in a single log line in the debug output from `setuptools` so this is ok to merge before the change to `setuptools` is merged.
- Fixes python-poetry#1350 - Added support for specifying a set of license files as part of the project config. - Moved the license file config into the package configuration. (`Factory.create_poetry()`) this matches how similar configurations such as “readme” are configured. - Updated the builders to use the project level license file list instead of searching for their own (previously different) lists of license files. - Moved the existing auto-discovery behaviours to become the default case during `create_poetry()` if nothing specific was configured. - Added tests for the new features - Documented the new configuration field. - Added the “license-files” field to the poetry-schema.json - Updated pre-commit config to use the correct black source repo, and set the default language for better consistency with any other pre-commit checks that will be added in the future. - Fix python-poetry#866 by modifing the base template used by `SdistBuilder`. It now uses `setuptools`, since as documented by @seifertm in issue python-poetry#866 `pip` uses `setuptools` anyway and this clears the way to immediately supporting pypa/setuptools#1767 once this is merged and released from `setuptools`. Until `setuptools` updates to support multiple license files, this will result in a single log line in the debug output from `setuptools` so this is ok to merge before the change to `setuptools` is merged.
- Fixes python-poetry#1350 - Added support for specifying a set of license files as part of the project config. - Moved the license file config into the package configuration. (`Factory.create_poetry()`) this matches how similar configurations such as “readme” are configured. - Updated the builders to use the project level license file list instead of searching for their own (previously different) lists of license files. - Moved the existing auto-discovery behaviours to become the default case during `create_poetry()` if nothing specific was configured. - Added tests for the new features - Documented the new configuration field. - Added the “license-files” field to the poetry-schema.json - Updated pre-commit config to use the correct black source repo, and set the default language for better consistency with any other pre-commit checks that will be added in the future. - Fix python-poetry#866 by modifing the base template used by `SdistBuilder`. It now uses `setuptools`, since as documented by @seifertm in issue python-poetry#866 `pip` uses `setuptools` anyway and this clears the way to immediately supporting pypa/setuptools#1767 once this is merged and released from `setuptools`. Until `setuptools` updates to support multiple license files, this will result in a single log line in the debug output from `setuptools` so this is ok to merge before the change to `setuptools` is merged.
- Fixes python-poetry#1350 - Added support for specifying a set of license files as part of the project config. - Moved the license file config into the package configuration. (`Factory.create_poetry()`) this matches how similar configurations such as “readme” are configured. - Updated the builders to use the project level license file list instead of searching for their own (previously different) lists of license files. - Moved the existing auto-discovery behaviours to become the default case during `create_poetry()` if nothing specific was configured. - Added tests for the new features - Documented the new configuration field. - Added the “license-files” field to the poetry-schema.json - Updated pre-commit config to use the correct black source repo, and set the default language for better consistency with any other pre-commit checks that will be added in the future. - Fix python-poetry#866 by modifing the base template used by `SdistBuilder`. It now uses `setuptools`, since as documented by @seifertm in issue python-poetry#866 `pip` uses `setuptools` anyway and this clears the way to immediately supporting pypa/setuptools#1767 once this is merged and released from `setuptools`. Until `setuptools` updates to support multiple license files, this will result in a single log line in the debug output from `setuptools` so this is ok to merge before the change to `setuptools` is merged.
- Fixes python-poetry#1350 - Added support for specifying a set of license files as part of the project config. - Moved the license file config into the package configuration. (`Factory.create_poetry()`) this matches how similar configurations such as “readme” are configured. - Updated the builders to use the project level license file list instead of searching for their own (previously different) lists of license files. - Moved the existing auto-discovery behaviours to become the default case during `create_poetry()` if nothing specific was configured. - Added tests for the new features - Documented the new configuration field. - Added the “license-files” field to the poetry-schema.json - Updated pre-commit config to use the correct black source repo, and set the default language for better consistency with any other pre-commit checks that will be added in the future. - Fix python-poetry#866 by modifing the base template used by `SdistBuilder`. It now uses `setuptools`, since as documented by @seifertm in issue python-poetry#866 `pip` uses `setuptools` anyway and this clears the way to immediately supporting pypa/setuptools#1767 once this is merged and released from `setuptools`. Until `setuptools` updates to support multiple license files, this will result in a single log line in the debug output from `setuptools` so this is ok to merge before the change to `setuptools` is merged.
- Fixes python-poetry#1350 - Added support for specifying a set of license files as part of the project config. - Moved the license file config into the package configuration. (`Factory.create_poetry()`) this matches how similar configurations such as “readme” are configured. - Updated the builders to use the project level license file list instead of searching for their own (previously different) lists of license files. - Moved the existing auto-discovery behaviours to become the default case during `create_poetry()` if nothing specific was configured. - Added tests for the new features - Documented the new configuration field. - Added the “license-files” field to the poetry-schema.json - Updated pre-commit config to use the correct black source repo, and set the default language for better consistency with any other pre-commit checks that will be added in the future. - Fix python-poetry#866 by modifing the base template used by `SdistBuilder`. It now uses `setuptools`, since as documented by @seifertm in issue python-poetry#866 `pip` uses `setuptools` anyway and this clears the way to immediately supporting pypa/setuptools#1767 once this is merged and released from `setuptools`. Until `setuptools` updates to support multiple license files, this will result in a single log line in the debug output from `setuptools` so this is ok to merge before the change to `setuptools` is merged.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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 (
-vvv
option).OS version and name: Gentoo Linux
Poetry version: 0.12.11
The command
poetry build
generates asetup.py
file based on the contents ofpyproject.toml
. The setup file importsdistutils.core.setup
as 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_points
argument is not applicable for distutils.Since
setup.py
uses features that are explicitly part of setuptools, but not distutils, I suggest thatsetuptools.setup
should be imported. Would you accept a PR for this?The text was updated successfully, but these errors were encountered: