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

python3Packages.setuptools, thrift: Fix setuptools to give thrift python 3.12 support #328415

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pkgs/development/python-modules/setuptools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ buildPythonPackage rec {
export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0
'';

postInstall = ''
# setuptools provides backward compatibility for distutils with a trick/hack
# that makes it importable/available. However, this does not work in nixpkgs.
# Solve this by symlinking distutils into site-packages to make setuptools
# behave as expected.
ln -s $out/${python.sitePackages}/setuptools/_distutils $out/${python.sitePackages}/distutils
'';

# Requires pytest, causing infinite recursion.
doCheck = false;

Expand Down
3 changes: 1 addition & 2 deletions pkgs/development/python-modules/thrift/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
lib,
buildPythonPackage,
fetchPypi,
pythonAtLeast,
pythonOlder,
setuptools,
six,
Expand All @@ -14,7 +13,7 @@ buildPythonPackage rec {
pyproject = true;

# Still uses distutils
disabled = pythonOlder "3.7" || pythonAtLeast "3.12";
disabled = pythonOlder "3.7";

src = fetchPypi {
inherit pname version;
Expand Down