timbertson / gup

A better make, inspired by djb's redo.
GNU Lesser General Public License v2.1
51 stars 5 forks source link

Build fails in nixpkgs #23

Closed gkleen closed 1 month ago

gkleen commented 1 month ago

To reproduce: nix --refresh build github:nixos/nixpkgs#gup

Seems like a lint failure:

# PYLINT
#----- ORIGINAL ------#
Running: ['pylint', '--errors-only', 'gup.whichcraft', 'gup.var', 'gup.log', 'gup.path', 'gup.version', 'gup.error', 'gup.util', 'gup.parallel', 'gup.gupfile', 'gup.state', 'gup.builder', 'gup.task', 'gup.cmd'] '/build/source/python'
************* Module gup.gupfile
gup/gupfile.py:205:10: E0606: Possibly using variable 'xrange' before assignment (possibly-used-before-assignment)
Traceback (most recent call last):
  File "/build/source/python/./build/combine_modules.py", line 140, in <module>
    main()
  File "/build/source/python/./build/combine_modules.py", line 131, in main
    check(['gup.' + mod for mod in mods], os.path.dirname(here))
  File "/build/source/python/./build/combine_modules.py", line 127, in check
    subprocess.check_call(args, env=env, cwd=basedir)
  File "/nix/store/04gg5w1s662l329a8kh9xcwyp0k64v5a-python3-3.12.4/lib/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['pylint', '--errors-only', 'gup.whichcraft', 'gup.var', 'gup.log', 'gup.path', 'gup.version', 'gup.error', 'gup.util', 'gup.parallel', 'gup.gupfile', 'gup.state', 'gup.builder', 'gup.task', 'gup.cmd']' returned non-zero exit status 2.
make[1]: *** [Makefile:30: bin/gup] Error 1
make[1]: Leaving directory '/build/source/python'
make: *** [Makefile:20: python/all] Error 2
timbertson commented 1 month ago

Thanks for the report, I assume this was a pylint update that added a new rule. The line in question is for python2/3 compatibility, which is no longer needed. Fix incoming ...

timbertson commented 1 month ago

Fixed in https://github.com/timbertson/gup/commit/570b1ce8f1168601035275bb360a014e64baa584 (version-0.9.2)