NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.96k stars 13.98k forks source link

Python ecosystem improvements (placeholder issue) #1819

Open domenkozar opened 10 years ago

domenkozar commented 10 years ago

This is a placeholder for general improvements to Python packaging infrastructure in Nixpkgs.

Documentation

Python modules

Build functions

Packages

Tests

Issues to resolve

domenkozar commented 10 years ago

cc @chaoflow @garbas @cillianderoiste @offlinehacker @matejc (anyone else)?

domenkozar commented 10 years ago

cc @rach

shlevy commented 10 years ago

Do you think it makes sense to make separate issues for more of these?

domenkozar commented 10 years ago

For some todos, if more then one line is needed to describe what's needed to be done (and if some discussion is needed).

kevinburke commented 10 years ago

Readline support would be very nice. Currently arrow keys in the nix python interpreter don't work.

domenkozar commented 10 years ago

@kevinburke could you describe exact steps to reproduce that? Stable or unstable channel?

domenkozar commented 10 years ago

Updated TODOs to match current state in nixpkgs.

domenkozar commented 10 years ago

@kevinburke once #4495 is merged, using pythonFull will mean readline support. For now you can use python and specify python.modules.readline as buildInput for your expressions.

joelmo commented 9 years ago

I think this could be added under issues to resolve: Import test for all derivations that add packages to site-packages folder. It would then be easier to detect if packages propagate all other packages needed for the basic import.

The test itself is very simple (python -c 'import matplotlib, pkg1, pkg2'), but it requires the correct environment to be set up after the build.

domenkozar commented 9 years ago

See #3821

jagajaga commented 8 years ago

P-p-p-ping :)

datakurre commented 8 years ago

I'm in need of "improved" solution for managing a lot of in-house packages in setup, where we have normal python package development and custom nix channel.

I'd prefer to have default.nix in each package repository to easily get development environments for each package. Yet, I would not like to manage duplicate buildPythonPackage-derivation in our in-house channel repository.

Have you ever considered somehow supporting explicit release.nix / default.nix in Python source packages? Could it be any more dangerous than what setup.py already is?

For my own usage, I might simply check if the package has default.nix, expect it to have buildPythonPackage derivation and call that.

FRidh commented 8 years ago

You could keep a default.nix file in the repo, and use src = ./.; , and then fetch the repo and import it or use callPackage. However, you will then import from another derivation, and this is currently not supported on Hydra.

RonnyPfannschmidt commented 8 years ago

@datakurre have you considered always having your custom channel, and each default.nix overriding the src attribute of a derivation with the path ./.

datakurre commented 8 years ago

@FRidh @RonnyPfannschmidt Thanks for those ideas!

I was aware that Hydra-compatibility is an issue (didn't know that limitation of derivation not being able to call derivation though), so I probably should try @RonnyPfannschmidt's approach at first. Adding new packages and adding new dependencies for developed package would be a bit inconvenient, but for existing packages it would make default.nix look less scary (for non-nixers).

I hope to end up with something that I could document as an example workflow with nix.

stale[bot] commented 4 years ago

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[bot] commented 3 years ago

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

OliverEvans96 commented 2 years ago

I think https://github.com/NixOS/nixpkgs/issues/91916 should be added to this list.