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
buildPython*: propagate setuptools #68314
Conversation
This was accidentally removed in 7e28bf5d8181926e600a222cb70180519d09726. Longer-term, we should not propagate setuptools though, and let derivations explicitly declare whether they require setuptools during runtime.
If we don't encounter too many runtime issues I think we can do without this change. |
Noticed that this broke
Adding |
Yes, it's made more often, but I think we can still fix them on a case by case basis. |
Is this a bugfix which should be backported to 19.09 as well? |
For now I would like to avoid merging and backporting it and fix case-by-case. If it turns out to be too much, we can merge this and backport it. |
While testing 19.09 I realized that |
@Ma27 first master, then cherry-pick (and push yourself to) 19.09 |
Currently, `setuptools` isn't propagated automatically to python packages[1] which causes the following error when starting `matrix-synapse`: ``` Traceback (most recent call last): File "/nix/store/xxkds7821mrahfx75az0sq3ryf69m612-matrix-synapse-1.3.1/bin/.homeserver-wrapped", line 39, in <module> import synapse.config.logger File "/nix/store/xxkds7821mrahfx75az0sq3ryf69m612-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/config/logger.py", line 27, in <module> from synapse.app import _base as appbase File "/nix/store/xxkds7821mrahfx75az0sq3ryf69m612-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/app/__init__.py", line 18, in <module> E402 File "/nix/store/xxkds7821mrahfx75az0sq3ryf69m612-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/python_dependencies.py", line 19, in <module> from pkg_resources import ( No module named 'pkg_resources' ``` [1] NixOS#68314
Currently, `setuptools` isn't propagated automatically to python packages[1] which causes the following error when starting `matrix-synapse`: ``` Traceback (most recent call last): File "/nix/store/xxkds7821mrahfx75az0sq3ryf69m612-matrix-synapse-1.3.1/bin/.homeserver-wrapped", line 39, in <module> import synapse.config.logger File "/nix/store/xxkds7821mrahfx75az0sq3ryf69m612-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/config/logger.py", line 27, in <module> from synapse.app import _base as appbase File "/nix/store/xxkds7821mrahfx75az0sq3ryf69m612-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/app/__init__.py", line 18, in <module> E402 File "/nix/store/xxkds7821mrahfx75az0sq3ryf69m612-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/python_dependencies.py", line 19, in <module> from pkg_resources import ( No module named 'pkg_resources' ``` [1] #68314 (cherry picked from commit 58dc1e2)
This fixes: Traceback (most recent call last): File "/nix/store/607z14x0spsz1lsh0fg9cbyc9lr038mi-python3.7-snscrape-0.3.0/bin/.snscrape-wrapped", line 11, in <module> sys.exit(main()) File "/nix/store/607z14x0spsz1lsh0fg9cbyc9lr038mi-python3.7-snscrape-0.3.0/lib/python3.7/site-packages/snscrape/cli.py", line 218, in main args = parse_args() File "/nix/store/607z14x0spsz1lsh0fg9cbyc9lr038mi-python3.7-snscrape-0.3.0/lib/python3.7/site-packages/snscrape/cli.py", line 154, in parse_args import snscrape.version File "/nix/store/607z14x0spsz1lsh0fg9cbyc9lr038mi-python3.7-snscrape-0.3.0/lib/python3.7/site-packages/snscrape/version.py", line 1, in <module> import pkg_resources ModuleNotFoundError: No module named 'pkg_resources' Related: NixOS#68314
This fixes: Traceback (most recent call last): File "/nix/store/607z14x0spsz1lsh0fg9cbyc9lr038mi-python3.7-snscrape-0.3.0/bin/.snscrape-wrapped", line 11, in <module> sys.exit(main()) File "/nix/store/607z14x0spsz1lsh0fg9cbyc9lr038mi-python3.7-snscrape-0.3.0/lib/python3.7/site-packages/snscrape/cli.py", line 218, in main args = parse_args() File "/nix/store/607z14x0spsz1lsh0fg9cbyc9lr038mi-python3.7-snscrape-0.3.0/lib/python3.7/site-packages/snscrape/cli.py", line 154, in parse_args import snscrape.version File "/nix/store/607z14x0spsz1lsh0fg9cbyc9lr038mi-python3.7-snscrape-0.3.0/lib/python3.7/site-packages/snscrape/version.py", line 1, in <module> import pkg_resources ModuleNotFoundError: No module named 'pkg_resources' Related: NixOS#68314 (cherry picked from commit 7e7c98a)
Yep, many packages have been fixed so let's close it. |
@FRidh I still think something should be posted on discuss.python.org/c/packaging though ;-) |
It is used during runtime. cc NixOS#68314
As a side-effect of f7e28bf, the build no longer propagated 'setuptools', which is a run-time dependency. See NixOS#68314 for further details.
This is used during runtime. cc NixOS#68314
As a side-effect of f7e28bf, the build no longer propagated 'setuptools', which is a run-time dependency. See NixOS#68314 for further details. (cherry picked from commit ce3ddb2)
More NixOS#68314 related breakage. (cherry picked from commit 01aa4bb)
As a side-effect of f7e28bf, the build no longer propagated 'setuptools', which is a run-time dependency. See NixOS#68314 for further details. (cherry picked from commit 55bf3b4)
Related: NixOS#68314 This fixes startup of anki, which currently shows this in a dialog: Error during startup: Traceback (most recent call last): File "/nix/store/0h395dwc6b80n5xg93p86ywaz6kpz6ck-anki-2.1.15/lib/python3.7/site-packages/aqt/main.py", line 46, in __init__ self.setupAddons() File "/nix/store/0h395dwc6b80n5xg93p86ywaz6kpz6ck-anki-2.1.15/lib/python3.7/site-packages/aqt/main.py", line 657, in setupAddons import aqt.addons File "/nix/store/0h395dwc6b80n5xg93p86ywaz6kpz6ck-anki-2.1.15/lib/python3.7/site-packages/aqt/addons.py", line 9, in <module> import markdown File "/nix/store/knq8798kl0xzzr7ii4bchskg1c8mq6pj-python3.7-Markdown-3.1.1/lib/python3.7/site-packages/markdown/__init__.py", line 25, in <module> from .core import Markdown, markdown, markdownFromFile File "/nix/store/knq8798kl0xzzr7ii4bchskg1c8mq6pj-python3.7-Markdown-3.1.1/lib/python3.7/site-packages/markdown/core.py", line 29, in <module> import pkg_resources ModuleNotFoundError: No module named 'pkg_resources' (cherry picked from commit 2769d61)
`setuptools` isn't propagated automatically anymore, see also NixOS#68314. (cherry picked from commit 54752cd)
As a side-effect of f7e28bf, the build no longer propagated 'setuptools', which is a run-time dependency. See NixOS#68314 for further details. (cherry picked from commit 14854f2)
…puts As a side-effect of f7e28bf, the build no longer propagated 'setuptools', which is a run-time dependency. See NixOS#68314 for further details. Fixes NixOS#68479. (cherry picked from commit b57f25a)
This fixes: Traceback (most recent call last): File "/nix/store/607z14x0spsz1lsh0fg9cbyc9lr038mi-python3.7-snscrape-0.3.0/bin/.snscrape-wrapped", line 11, in <module> sys.exit(main()) File "/nix/store/607z14x0spsz1lsh0fg9cbyc9lr038mi-python3.7-snscrape-0.3.0/lib/python3.7/site-packages/snscrape/cli.py", line 218, in main args = parse_args() File "/nix/store/607z14x0spsz1lsh0fg9cbyc9lr038mi-python3.7-snscrape-0.3.0/lib/python3.7/site-packages/snscrape/cli.py", line 154, in parse_args import snscrape.version File "/nix/store/607z14x0spsz1lsh0fg9cbyc9lr038mi-python3.7-snscrape-0.3.0/lib/python3.7/site-packages/snscrape/version.py", line 1, in <module> import pkg_resources ModuleNotFoundError: No module named 'pkg_resources' Related: NixOS#68314 (cherry picked from commit 7e7c98a)
Currently, `setuptools` isn't propagated automatically to python packages[1] which causes the following error when starting `matrix-synapse`: ``` Traceback (most recent call last): File "/nix/store/xxkds7821mrahfx75az0sq3ryf69m612-matrix-synapse-1.3.1/bin/.homeserver-wrapped", line 39, in <module> import synapse.config.logger File "/nix/store/xxkds7821mrahfx75az0sq3ryf69m612-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/config/logger.py", line 27, in <module> from synapse.app import _base as appbase File "/nix/store/xxkds7821mrahfx75az0sq3ryf69m612-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/app/__init__.py", line 18, in <module> E402 File "/nix/store/xxkds7821mrahfx75az0sq3ryf69m612-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/python_dependencies.py", line 19, in <module> from pkg_resources import ( No module named 'pkg_resources' ``` [1] NixOS#68314 (cherry picked from commit 58dc1e2)
Due to a change in Nix, `setuptools` is no longer available by default. Upstream issue [#68314](NixOS/nixpkgs#68314) Signed-off-by: Rajiv Ranganath <rajiv.ranganath@atihita.com>
This is used during runtime. cc NixOS#68314
This is used during runtime. cc NixOS#68314
This was accidentally removed in
7e28bf5d8181926e600a222cb70180519d09726. Longer-term, we should not
propagate setuptools though, and let derivations explicitly declare
whether they require setuptools during runtime.
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @