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

python313Packages.standard-mailcap: init at 3.13.0 #365443

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lucc
Copy link
Contributor

@lucc lucc commented Dec 15, 2024

This is a replacement for the mailcap module from the python standard lib which was removed for python 3.13. This package will be needed for alot to work under python 3.13.

Repo: https://github.com/youknowone/python-deadlib
PyPI: https://pypi.org/project/standard-mailcap/

(There is no proper homepage)

This fixes #362878.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@nix-owners nix-owners bot requested a review from natsukium December 15, 2024 21:47
@lucc lucc force-pushed the add-python-std-mailcap branch from 77744f9 to 9c163c4 Compare December 15, 2024 21:49
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Dec 15, 2024
pkgs/top-level/python-packages.nix Outdated Show resolved Hide resolved
Comment on lines 10 to 12
version = "3.13.0";
disabled = pythonOlder "3.13";
src = fetchPypi {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
version = "3.13.0";
disabled = pythonOlder "3.13";
src = fetchPypi {
version = "3.13.0";
pyproject = true;
disabled = pythonOlder "3.13";
src = fetchPypi {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

pyproject=true is in line 17. Did you miss it or do you want it further at the top?

Copy link
Member

Choose a reason for hiding this comment

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

This is the style we usually follow.

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 reordered the attributes. Is the order/style (also the pipy vs github stuff) documented somewhere? Or is it just something you learn on the way?

Comment on lines 10 to 12
version = "3.13.0";
disabled = pythonOlder "3.13";
src = fetchPypi {
Copy link
Member

Choose a reason for hiding this comment

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

fetchFromGitHub is preferred

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But the github repo has many subfolders with different "dead batteries" in each subfolder. So I would have to pull one subfolder from the github repo. Is that still preferred?

Copy link
Member

Choose a reason for hiding this comment

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

Yes.

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 tried this and it looks much more complicated to me.
With fetchPypi I have

src = fetchPypi {
  pname = "standard_mailcap";
  inherit version;
  hash = "sha256-Ge15VdvqzLNei7BbK1RDzlXB+TKoy+elwT1C+dtPSZo=";
};

whereas with fetchFromGitHub I have

src = fetchFromGitHub {
  owner = "youknowone";
  repo = "python-deadlib";
  tag = "v3.13.0";
  hash = "sha256-9mtQi5ufxP6xRonTrFC3oWFpWLbJraAmdQYozP3evgc=";
  sparseCheckout = [ "mailcap" ];
};
preBuild = "cd mailcap";

Just to be absolutely sure: fetchFromGtHub is still preferred in this situation?

@lucc lucc force-pushed the add-python-std-mailcap branch 2 times, most recently from 3ab632e to 4cb1686 Compare December 16, 2024 07:40
@lucc lucc force-pushed the add-python-std-mailcap branch from 4cb1686 to 98032d8 Compare December 16, 2024 07:45
@lucc
Copy link
Contributor Author

lucc commented Dec 21, 2024

@dotlambda I tried to address your comments. Do you mind having another look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: python 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package request: python3Packages.standard-mailcap
2 participants