Skip to content

Python: no separate output for tkinter but build interpreter twice#19594

Merged
copumpkin merged 1 commit intoNixOS:stagingfrom
FRidh:tkinter
Oct 16, 2016
Merged

Python: no separate output for tkinter but build interpreter twice#19594
copumpkin merged 1 commit intoNixOS:stagingfrom
FRidh:tkinter

Conversation

@FRidh
Copy link
Member

@FRidh FRidh commented Oct 16, 2016

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • OS X
    • Linux
  • 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/)
  • Fits CONTRIBUTING.md.

In #19309 a separate output for tkinter was added.

Several dependencies of Python depend indirectly on Python. We have the
following two paths:

‘python-2.7.12’ - ‘tk-8.6.6’ - ‘libXft-2.3.2’ - ‘libXrender-0.9.10’ -
‘libX11-1.6.4’ - ‘libxcb-1.12’ - ‘libxslt-1.1.29’- ‘libxml2-2.9.4’ -
‘python-2.7.12’

‘python-2.7.12’ - ‘tk-8.6.6’ - ‘libXft-2.3.2’ - ‘fontconfig-2.12.1’ -
‘dejavu-fonts-2.37’ - ‘fontforge-20160404’ - ‘python-2.7.12’

Because only tkinter needs this, I added

pythonSmall = python.override {x11Support = false;};

to break the infinite recursion. We also still have the output
tkinter.

However, we might as well build without x11Support by default. Then we build with x11Support as well so we get the tkinter module and put that in a separate package.

@FRidh FRidh added 6.topic: python Python is a high-level, general-purpose programming language. 1.severity: mass-rebuild labels Oct 16, 2016
@mention-bot
Copy link

@FRidh, thanks for your PR! By analyzing the history of the files in this pull request, we identified @vcunat, @kragniz and @domenkozar to be potential reviewers.

In NixOS#19309 a separate output for tkinter was added.

Several dependencies of Python depend indirectly on Python. We have the
following two paths:
```
‘python-2.7.12’ - ‘tk-8.6.6’ - ‘libXft-2.3.2’ - ‘libXrender-0.9.10’ -
‘libX11-1.6.4’ - ‘libxcb-1.12’ - ‘libxslt-1.1.29’- ‘libxml2-2.9.4’ -
‘python-2.7.12’

‘python-2.7.12’ - ‘tk-8.6.6’ - ‘libXft-2.3.2’ - ‘fontconfig-2.12.1’ -
‘dejavu-fonts-2.37’ - ‘fontforge-20160404’ - ‘python-2.7.12’
```
Because only `tkinter` needs this, I added
```
pythonSmall = python.override {x11Support = false;};
```
to break the infinite recursion. We also still have the output
`tkinter`.

However, we might as well build without x11Support by default. Then we build with x11Support as well so we get the tkinter module and put that in a separate package.
@copumpkin
Copy link
Member

I think this is good, assuming I understand the implications properly. I'm going to poke at it on Darwin and see if it makes the bootstrap happy again.

@copumpkin
Copy link
Member

@FRidh just to make sure I understand this properly, the old pythonFull boils down to python.withPackages (p: [ p.tkinter ]) after this, right?

@FRidh
Copy link
Member Author

FRidh commented Oct 16, 2016

Correct

On Oct 16, 2016 11:43 PM, "Daniel Peebles" [email protected] wrote:

@FRidh https://github.com/FRidh just to make sure I understand this
properly, the old pythonFull boils down to python.withPackages (p: [
p.tkinter ]) after this, right?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#19594 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACB87w207AsWrW4LaUbTclDO5Dj0EgTiks5q0ppngaJpZM4KX9ba
.

@copumpkin
Copy link
Member

Okay, this appears to have fixed the Darwin stdenv bootstrap in staging, thanks! I'd probably leave pythonFull = python.withPackages (p: [ p.tkinter ]) definition in here just because it's likely to be in a lot of people's development environment definitions.

I'd also be okay with merging this ASAP because staging is broken right now 😄

@copumpkin
Copy link
Member

Anyone mind if I merge?

@copumpkin copumpkin merged commit 1e916de into NixOS:staging Oct 16, 2016
@copumpkin
Copy link
Member

It was blocking me so I figured I'd just go ahead and merge 😄 thanks again for fixing this!

@FRidh FRidh deleted the tkinter branch October 17, 2016 12:48
@FRidh
Copy link
Member Author

FRidh commented Oct 17, 2016

Okay, this appears to have fixed the Darwin stdenv bootstrap in staging, thanks! I'd probably leave pythonFull = python.withPackages (p: [ p.tkinter ]) definition in here just because it's likely to be in a lot of people's development environment definitions.

Actually, its not exactly the same as the previous pythonFull. If you want what we had before, you need python.override { x11Support = true; };. We could keep this one, but I prefer if we wouldn't use it in Nixpkgs.

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

Labels

6.topic: python Python is a high-level, general-purpose programming language.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants