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

python312Packages.distutils: init at 0.70.0 #328379

Merged
merged 7 commits into from
Jul 22, 2024

Conversation

dotlambda
Copy link
Member

@dotlambda dotlambda commented Jul 19, 2024

Description of changes

fixes #328346
fixes #326296
closes #326321
fixes #326920

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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

@emilazy
Copy link
Member

emilazy commented Jul 19, 2024

Would this same issue also be solved by fixing the issue that causes setuptools to not provide distutils for us? I would personally feel more comfortable with that as an interim solution than depending on another random third party. There’s no commit history in this repository either, and the distutils licence mentioning nntplib doesn’t fill me with confidence.

}:

buildPythonPackage rec {
pname = "standard-distutils";
Copy link
Contributor

Choose a reason for hiding this comment

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

I would be more comfortable to use a more official source https://github.com/pypa/distutils, that is the source for the distutils that setuptools offer.

@dotlambda
Copy link
Member Author

Would this same issue also be solved by fixing the issue that causes setuptools to not provide distutils for us?

Yes.

I would personally feel more comfortable with that as an interim solution than depending on another random third party.

Same. But that's a mass rebuild.

@emilazy
Copy link
Member

emilazy commented Jul 19, 2024

What if we add a distutils package that just re‐exports the version from our setuptools package at the right path? That avoids a mass rebuild and offers a simple path towards migrating it back into setuptools package during a staging cycle (but it might actually be valuable for us to know what is using distutils, since ideally nothing should be).

@dotlambda dotlambda force-pushed the python3Packages.standard-distutils branch from 5f439c6 to e7f2aa5 Compare July 19, 2024 11:06
@dotlambda
Copy link
Member Author

dotlambda commented Jul 19, 2024

What if we add a distutils package that just re‐exports the version from our setuptools package at the right path?

It seemed easier to use https://github.com/pypa/distutils because it comes with pyproject.toml. So that's what I did.

@dotlambda dotlambda changed the title python312Packages.standard-distutils: init at 3.9.19 python312Packages.distutils: init at 0-unstable-2024-07-15 Jul 19, 2024
@kfollesdal
Copy link
Contributor

I have made a proposal to fix setuptools support for distutils so it behaves as expected. I prefer to fix setuptools rather than introducing an extra package. #328415

@dotlambda dotlambda force-pushed the python3Packages.standard-distutils branch from e7f2aa5 to 431c24c Compare July 19, 2024 13:21
@dotlambda
Copy link
Member Author

I'm now pulling the code, except for tests, build files, etc., from our setuptools package. So compatibility should be guaranteed.

Take the actual code from setuptools for compatibility.
@dotlambda dotlambda force-pushed the python3Packages.standard-distutils branch from 431c24c to efa00bf Compare July 19, 2024 13:28
@dotlambda dotlambda changed the title python312Packages.distutils: init at 0-unstable-2024-07-15 python312Packages.distutils: init at 0.70.0 Jul 19, 2024
@dotlambda dotlambda force-pushed the python3Packages.standard-distutils branch from e74cac4 to 3dbc32f Compare July 21, 2024 15:18
@dotlambda
Copy link
Member Author

I'll merge this now cause the other option needs a whole staging cycle. If we agree the other solution is better we can revert this on staging.

@dotlambda dotlambda merged commit 79ba441 into NixOS:master Jul 22, 2024
29 of 30 checks passed
@dotlambda dotlambda deleted the python3Packages.standard-distutils branch July 22, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants