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

pythonPackages.docutils: fix python3 build #50886

Merged
merged 1 commit into from Nov 21, 2018

Conversation

marsam
Copy link
Contributor

@marsam marsam commented Nov 21, 2018

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marsam
It's helpful if you describe what failure you were fixing, the output, and what platform you experienced this.

After digging around at https://hydra.nixos.org to look for the failure, as I couldn't reproduce this on linux, I found that this was only a problem for darwin. See https://hydra.nixos.org/build/84046228.

running install tests
Traceback (most recent call last):
  File "test3/alltests.py", line 80, in <module>
    suite = suite()
  File "test3/alltests.py", line 69, in suite
    'test_', packages=1)
  File "/private/tmp/nix-build-python3.7-docutils-0.14.drv-0/docutils-0.14/test3/package_unittest.py", line 101, in loadTestModules
    module = import_module(mod)
  File "/private/tmp/nix-build-python3.7-docutils-0.14.drv-0/docutils-0.14/test3/package_unittest.py", line 132, in import_module
    mod = __import__(name)
  File "/private/tmp/nix-build-python3.7-docutils-0.14.drv-0/docutils-0.14/test3/test_command_line.py", line 19, in <module>
    locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
  File "/nix/store/ky86n177vy9h4vi62vjzsv96b4pywiwv-python3-3.7.1/lib/python3.7/locale.py", line 587, in getlocale
    return _parse_localename(localename)
  File "/nix/store/ky86n177vy9h4vi62vjzsv96b4pywiwv-python3-3.7.1/lib/python3.7/locale.py", line 495, in _parse_localename
    raise ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: UTF-8

As for the changes, they appear to be usual way to fix this.

Also maybe fix python3 build on darwin would be clearer in the commit msg.

@worldofpeace
Copy link
Contributor

@GrahamcOfBorg build python3Packages.docutils

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python3Packages.docutils

Partial log (click to expand)

OS: Linux 4.14.36 #1-NixOS SMP Tue Apr 24 07:36:40 UTC 2018 (linux, Linux-4.14.36-x86_64-with-glibc2.2.5)
Working directory: /build/docutils-0.14/test3
Docutils package: /build/docutils-0.14/build/lib/docutils
.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 1337 tests in 6.392s

OK
Elapsed time: 6.925 seconds
/nix/store/2b7jjgvabhnpv41gybq0r887595fbwlx-python3.7-docutils-0.14

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python3Packages.docutils

Partial log (click to expand)

OS: Linux 4.18.17 #1-NixOS SMP PREEMPT Sun Nov 4 13:51:56 UTC 2018 (linux, Linux-4.18.17-aarch64-with-glibc2.17)
Working directory: /build/docutils-0.14/test3
Docutils package: /build/docutils-0.14/build/lib/docutils
.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 1337 tests in 11.868s

OK
Elapsed time: 12.770 seconds
/nix/store/dn931zcq65z21lbw6jfq6hgx33rmriza-python3.7-docutils-0.14

${python.interpreter} test3/alltests.py
'' else ''
${python.interpreter} test/alltests.py
checkInputs = [ glibcLocales ];
Copy link
Member

@LnL7 LnL7 Nov 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

glibcLocales is a linux only dependency, just setting LANG should be enough to fix the issue mentioned above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed glibcLocales, and checked if still works 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In some cases you do want it on linux, but then it needs a conditional.

@marsam marsam force-pushed the feature/fix-python3-docutils branch from a996e24 to e8e9fd6 Compare November 21, 2018 21:41
@infinisil
Copy link
Member

@GrahamcOfBorg build python3Packages.docutils

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python3Packages.docutils

Partial log (click to expand)

OS: Linux 4.18.17 #1-NixOS SMP PREEMPT Sun Nov 4 13:51:56 UTC 2018 (linux, Linux-4.18.17-aarch64-with-glibc2.17)
Working directory: /build/docutils-0.14/test3
Docutils package: /build/docutils-0.14/build/lib/docutils
.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 1337 tests in 15.525s

OK
Elapsed time: 16.909 seconds
/nix/store/9gffs1wgh70pykzv28pby369rinavh9g-python3.7-docutils-0.14

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python3Packages.docutils

Partial log (click to expand)

OS: Linux 4.14.36 #1-NixOS SMP Tue Apr 24 07:36:40 UTC 2018 (linux, Linux-4.14.36-x86_64-with-glibc2.2.5)
Working directory: /build/docutils-0.14/test3
Docutils package: /build/docutils-0.14/build/lib/docutils
.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 1337 tests in 6.385s

OK
Elapsed time: 6.889 seconds
/nix/store/hbyp3jfcv0cnlxasg3hr2c5ldxz9b6r4-python3.7-docutils-0.14

@marsam marsam force-pushed the feature/fix-python3-docutils branch from e8e9fd6 to db900da Compare November 21, 2018 22:02
@GrahamcOfBorg
Copy link

Timed out, unknown build status on x86_64-darwin (full log)

Attempted: python3Packages.docutils

Partial log (click to expand)

cannot build derivation '/nix/store/63p45rcx1lrbwnlag15mpkxvs150d7a7-libxml2-2.9.8.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/nvnmlpi78k3f505m5aydk0rhx5m6apii-libxslt-1.1.32.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/nj8hhjh47zqykn9dq4lrwfgx7q69fn9d-ninja-1.8.2.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/9d2bljywa8zr2r7k1lcshvjpi2d938rl-swift-corefoundation.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/g40fd5kc6wyy7lxa4cazppyq4vvdqdgc-python3-3.7.1.drv': 9 dependencies couldn't be built
cannot build derivation '/nix/store/ifz1pzgb9vwb1djs5skxcswf0bw81q1m-hook.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/whk0z66j59g7n192wrf5zqc2g7ix5wcv-python3.7-bootstrapped-pip-18.1.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/9c0i3kacv4xgnj5rcpgpccjyj0zxaisn-python3.7-setuptools-40.4.3.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/1jvync1iq4zra9imsb1cbmy6jfxxrmjz-python3.7-docutils-0.14.drv': 6 dependencies couldn't be built
error: build of '/nix/store/1jvync1iq4zra9imsb1cbmy6jfxxrmjz-python3.7-docutils-0.14.drv' failed

@worldofpeace
Copy link
Contributor

@infinisil It's whatever I guess 🤣

Copy link
Member

@LnL7 LnL7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builds on darwin, ofborg isn't very useful when targeting staging.

@LnL7 LnL7 merged commit 36e4be0 into NixOS:staging Nov 21, 2018
@worldofpeace
Copy link
Contributor

@marsam
Thanks again.

@marsam marsam deleted the feature/fix-python3-docutils branch November 21, 2018 23:41
@nixos-discourse
Copy link

This pull request has been mentioned on Nix community. There might be relevant details there:

https://discourse.nixos.org/t/move-python37packages-docutils-fix-to-master/1622/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants