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

nixops 1.7: failed build in 23.05 #217526

Closed
Izorkin opened this issue Feb 21, 2023 · 8 comments
Closed

nixops 1.7: failed build in 23.05 #217526

Izorkin opened this issue Feb 21, 2023 · 8 comments
Labels
0.kind: bug Something is broken

Comments

@Izorkin
Copy link
Contributor

Izorkin commented Feb 21, 2023

Describe the bug

Failed build nixops in master branch.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Update to latest master branch.
  2. Build nixops

Additional context

Build log:

python2.7-bootstrapped-pip> Sourcing pip-install-hook
python2.7-bootstrapped-pip> Sourcing setuptools-build-hook
python2.7-bootstrapped-pip> Using setuptoolsShellHook
python2.7-bootstrapped-pip> unpacking sources
python2.7-bootstrapped-pip> unpacking source archive /nix/store/cri5ijr2ijk5yzm1ryxybpav8l9jvx0q-wheel-0.38.4-source
python2.7-bootstrapped-pip> unpacking source archive /nix/store/rcaww7b3hmcnslb58fvp5wnkmr75c257-pip-20.3.4-source
python2.7-bootstrapped-pip> unpacking source archive /nix/store/8cg3ivvv3qlr436jvir1ygknq0idhzm7-setuptools-44.0.0-sdist.tar.gz
python2.7-bootstrapped-pip> source root is .
python2.7-bootstrapped-pip> patching sources
python2.7-bootstrapped-pip> configuring
python2.7-bootstrapped-pip> no configure script, doing nothing
python2.7-bootstrapped-pip> installing
python2.7-bootstrapped-pip> Building setuptools wheel...
python2.7-bootstrapped-pip> /build/setuptools /build
python2.7-bootstrapped-pip> DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
python2.7-bootstrapped-pip> Processing /build/setuptools
python2.7-bootstrapped-pip> Using legacy 'setup.py install' for setuptools, since package 'wheel' is not installed.
python2.7-bootstrapped-pip> Installing collected packages: setuptools
python2.7-bootstrapped-pip>     Running setup.py install for setuptools ... done
python2.7-bootstrapped-pip> Successfully installed setuptools
python2.7-bootstrapped-pip> /build
python2.7-bootstrapped-pip> Building wheel wheel...
python2.7-bootstrapped-pip> /build/wheel /build
python2.7-bootstrapped-pip> DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
python2.7-bootstrapped-pip> Processing /build/wheel
python2.7-bootstrapped-pip>     ERROR: Command errored out with exit status 1:
python2.7-bootstrapped-pip>      command: /nix/store/g4m937imv906351svqwnf4xzk0xkf558-python-2.7.18.6/bin/python2.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/build/pip-req-build-DGPYc7/setup.py'"'"'; __file__='"'"'/build/pip-req-build-DGPYc7/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /build/pip-pip-egg-info-YzEcmn
python2.7-bootstrapped-pip>          cwd: /build/pip-req-build-DGPYc7/
python2.7-bootstrapped-pip>     Complete output (5 lines):
python2.7-bootstrapped-pip>     Traceback (most recent call last):
python2.7-bootstrapped-pip>       File "<string>", line 1, in <module>
python2.7-bootstrapped-pip>       File "/build/pip-req-build-DGPYc7/setup.py", line 1
python2.7-bootstrapped-pip>         from __future__ import annotations
python2.7-bootstrapped-pip>     SyntaxError: future feature annotations is not defined
python2.7-bootstrapped-pip>     ----------------------------------------
python2.7-bootstrapped-pip> ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
error: builder for '/nix/store/v10mg0s7rdavwsfkgcnaqrr6qa1nk6cw-python2.7-bootstrapped-pip-20.3.4.drv' failed with exit code 1;
       last 10 log lines:
       >      command: /nix/store/g4m937imv906351svqwnf4xzk0xkf558-python-2.7.18.6/bin/python2.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/build/pip-req-build-DGPYc7/setup.py'"'"'; __file__='"'"'/build/pip-req-build-DGPYc7/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /build/pip-pip-egg-info-YzEcmn
       >          cwd: /build/pip-req-build-DGPYc7/
       >     Complete output (5 lines):
       >     Traceback (most recent call last):
       >       File "<string>", line 1, in <module>
       >       File "/build/pip-req-build-DGPYc7/setup.py", line 1
       >         from __future__ import annotations
       >     SyntaxError: future feature annotations is not defined
       >     ----------------------------------------
       > ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
       For full logs, run 'nix log /nix/store/v10mg0s7rdavwsfkgcnaqrr6qa1nk6cw-python2.7-bootstrapped-pip-20.3.4.drv'.
error: 1 dependencies of derivation '/nix/store/hmim2c41r3fx8inkcz6zdiggcf94ynmc-python2.7-pip-20.3.4.drv' failed to build
error: 1 dependencies of derivation '/nix/store/gsp0ww7ysf6ckjd339467j2f6a16ygyf-python2.7-setuptools-44.0.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/2cvbdkwkrnnc8glk6spd4qglb5cw1z09-pip-install-hook.drv' failed to build
error: 1 dependencies of derivation '/nix/store/gyv7q15kydsmcq0hqr970a78a5smjvby-python-catch-conflicts-hook.drv' failed to build
error: 1 dependencies of derivation '/nix/store/2ph29smb410ay4npyfw1slj2rl049kxl-setuptools-setup-hook.drv' failed to build
error: 1 dependencies of derivation '/nix/store/43jdg2js4wwj59ny215s59skdrk09hgs-nixops-1.7.drv' failed to build

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.8-hardened1, NixOS, 23.05 (Stoat), 23.05.git.6618ebae584`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.2`
 - channels(root): `"nixos"`
 - nixpkgs: `/home/user/works/src-nix/nixpkgs`
@Izorkin Izorkin added the 0.kind: bug Something is broken label Feb 21, 2023
@dotlambda
Copy link
Member

dotlambda commented Feb 22, 2023

That's because of how poetry2nix defines bootstrapped-pip.
cc @adisbladis @cpcloud

@SuperSandro2000
Copy link
Member

also python 2.7 is EOL and the only maintenance we do is reducing it.

@Izorkin
Copy link
Contributor Author

Izorkin commented Feb 23, 2023

How then to use nixops?

@dotlambda
Copy link
Member

How then to use nixops?

There is nixops_unstable.

@Izorkin
Copy link
Contributor Author

Izorkin commented Feb 23, 2023

There is nixops_unstable.

Tried. Some features don't work in unstable version :(

NixOS/nixops#1474
#139532 (comment)

@Ma27
Copy link
Member

Ma27 commented Feb 24, 2023

Let's face the unfortunate truth, nixops is basically dead these days, so I'd rather find out how to move away from it.

@Izorkin
Copy link
Contributor Author

Izorkin commented Feb 25, 2023

Found a possible fix:

--- a/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix
+++ b/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix
@@ -2410,7 +2410,7 @@ lib.composeManyExtensions [

       # Stop infinite recursion by using bootstrapped pkg from nixpkgs
       bootstrapped-pip = super.bootstrapped-pip.override {
-        wheel = (pkgs.python3.pkgs.override {
+        wheel = (pkgs.python.pkgs.override {
           python = self.python;
         }).wheel;
       };

Package python2Packages.bootstrapped-pip tries to use default package python3Packages.wheel, and package python2Packages.wheel is required.

Is it possible to add such a fix, or is another way required?

@Izorkin
Copy link
Contributor Author

Izorkin commented Feb 28, 2023

Fixed in #218399

@Izorkin Izorkin closed this as completed Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

4 participants