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

gnuradio: PYTHONPATH and wrapper updates #47188

Closed
wants to merge 1 commit into from

Conversation

tomberek
Copy link
Contributor

@tomberek tomberek commented Sep 22, 2018

Motivation for this change

This change is in preparation for upcoming changes to gnuradio. The gnuradio python library must be present after other paths when there is a namespace conflict.

I will soon add a "master" or "unstable" version for the 3.8 tech-preview soon (https://github.com/gnuradio/gnuradio/releases/tag/3.8tech-preview).

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.

@tomberek tomberek changed the title gnuradio: reverse PYTHONPATH order gnuradio: PYTHONPATH and wrapper updates Sep 23, 2018

with { inherit (stdenv.lib) appendToName makeSearchPath; };

stdenv.mkDerivation {
stdenv.mkDerivation rec {
Copy link
Member

Choose a reason for hiding this comment

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

I think we should replace this whole derivation with python.buildEnv. We can improve that function by having a makeWrapperArgs parameter, which is a list of arguments passed along to makeWrapper.

Copy link
Member

Choose a reason for hiding this comment

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

Is it possible (does it make sense) to use toPythonModule on the gnuradio modules?

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 agree that using python.buildEnv would be better, but I don't offhand know if the C++ side would be handled well. There is more work that needs to be done, but I wanted to go in smaller steps and prevent breaking the reverse dependencies.

Yes, toPythonModule builds the proper PYTHONPATH and also allows anyone loading this in nix-shell to use those modules.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@FRidh do you suggest modifying python.buildEnv?

What is next?

We should also bump versions to v3.7.13.4 ( #47491 )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

version bump merged. @FRidh what's next? This shouldn't be critical, just helps us with modules like gr-iio which abuse the gnuradio python namespace.

Copy link
Member

Choose a reason for hiding this comment

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

do you suggest modifying python.buildEnv?

Yes. Let me do this tonight if I don't forget, or open a PR.

@FRidh
Copy link
Member

FRidh commented Oct 13, 2018

See #48310 for buildEnv change.

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

3 participants