Skip to content

Python: check if multiple versions of a package in a closure #25506

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

Closed
wants to merge 1 commit into from

Conversation

FRidh
Copy link
Member

@FRidh FRidh commented May 4, 2017

While we try to prevent having multiple versions of Python packages it
still sometimes happens we need them. It also occasionally happens that
we end up with multiple versions of the same package in one closure, and
that is something Python cannot handle.

Currently we check for this after building the package. In most cases we
might be able to catch this already during evaluation time, by asserting
we do not have any duplicate name parts of Python derivations.

Motivation for this change
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
    • macOS
    • 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.

Sorry, something went wrong.

While we try to prevent having multiple versions of Python packages it
still sometimes happens we need them. It also occasionally happens that
we end up with multiple versions of the same package in one closure, and
that is something Python cannot handle.

Currently we check for this after building the package. In most cases we
might be able to catch this already during evaluation time, by asserting
we do not have any duplicate name parts of Python derivations.
@mention-bot
Copy link

@FRidh, thanks for your PR! By analyzing the history of the files in this pull request, we identified @FRidh to be a potential reviewer.

@FRidh FRidh mentioned this pull request May 4, 2017
7 tasks
@FRidh
Copy link
Member Author

FRidh commented May 4, 2017

To do:

  • implement in python.pkgs.buildPythonPackage
  • implement in python.buildEnv

Sorry, something went wrong.

@@ -88,6 +123,9 @@ in {

vowpalwabbit = callPackage ../development/python-modules/vowpalwabbit { pythonPackages = self; };

# unique = assertUniqueNames [ self.django_1_6.name self.django_1_8.name self.numpy.name ];
unique = assertUniquePythonPackages [ self.django_1_6 self.django_1_8 self.numpy ];

Copy link
Member Author

Choose a reason for hiding this comment

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

@garbas this is what you meant, right? This we could now implement in the builder.

Copy link
Member

Choose a reason for hiding this comment

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

@FRidh 👍 looks like a good start

I suppose this should be done automatically by buildPythonPackage

and sorry for the delay .. i'm slowly getting back to online life 😄

@matthiasbeyer
Copy link
Contributor

This is stalled and should probably be closed. @FRidh

@stale
Copy link

stale bot commented Jun 2, 2020

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 2, 2020
@FRidh FRidh added this to the 20.09 milestone Jun 2, 2020
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 2, 2020
@FRidh FRidh marked this pull request as draft June 2, 2020 08:50
@ryantm ryantm added 2.status: merge conflict This PR has merge conflicts with the target branch and removed 2.status: merge conflict This PR has merge conflicts with the target branch labels Oct 3, 2020
@FRidh FRidh modified the milestones: 20.09, 21.03 Dec 20, 2020
@stale
Copy link

stale bot commented Jun 18, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 18, 2021
@Artturin Artturin modified the milestones: 21.05, 23.05 Dec 31, 2022
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Dec 31, 2022
@Artturin Artturin removed this from the 23.05 milestone Jan 8, 2023
@AndersonTorres
Copy link
Member

This is stalled and should probably be closed. @FRidh

Thy will be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: enhancement Add something new 2.status: merge conflict This PR has merge conflicts with the target branch 2.status: work-in-progress This PR isn't done 6.topic: python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants