Nixpkgs: pythonRecompileBytecodeHook regressions

Created on 15 Jun 2020  路  5Comments  路  Source: NixOS/nixpkgs

Describe the bug

This hook was introduced for reproducibility in #90208.

Issues:

  • some packages don't have a site-packages folder https://github.com/NixOS/nixpkgs/pull/90208#issuecomment-644051108 (gtk-doc)
  • package may install tests that are written for Python 2 (python2.pkgs.linecache2). We should not install tests (https://github.com/NixOS/nixpkgs/issues/12379). A hook is ran that removes tests 3973a3c79c255db358a82f1ffc88dc2cda0f03d6. Maybe order of execution is a problem here?

Work-around for now is to disable the recompilation of reproducible bytecode by setting
```
dontUsePythonRecompileBytecode = true;
````

bug python

All 5 comments

zope-testrunner

pythonRecompileBytecodePhase
*** Error compiling '/nix/store/ggczy6q0ind1wkllzviil5a5n5gb6kgj-python3.8-zope.testrunner-5.1/lib/python3.8/site-packages/zope/testrunner/tests/testrunner-ex/sample2/badsyntax.py'...
  File "/nix/store/ggczy6q0ind1wkllzviil5a5n5gb6kgj-python3.8-zope.testrunner-5.1/lib/python3.8/site-packages/zope/testrunner/tests/testrunner-ex/sample2/badsyntax.py", line 16
    importx unittest
            ^
SyntaxError: invalid syntax

builder for '/nix/store/mndgcl5f2mrfvgzzfvlkk94vi1q80cca-python3.8-zope.testrunner-5.1.drv' failed with exit code 1

Again its the tests that are installed.

(Copying over from the wrong thread for completeness): python3Packages.invoke.

This package includes vendored YAML packages for both Python 2 and 3, and ignores the unwanted one at build time. But pythonRecompileBytecodePhase hits syntax errors for the Python2 code.

Effectively reverted this hook in b7aec77a7ba690dc9643a9989ad4e38b65fee4c6 because of too many regressions. The code is still there, its just turned off.

maybe in a different python-unstable branch, we can apply the changes. There's already a lot going on in this current staging-next. I think the change is fine

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

chris-martin picture chris-martin  路  3Comments

copumpkin picture copumpkin  路  3Comments

domenkozar picture domenkozar  路  3Comments

edolstra picture edolstra  路  3Comments