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

fix compatibility of jpype with setuptools==72.0.0 #1206

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

alexrashed
Copy link
Contributor

Motivation

With setuptools==72.0.0, the test command was removed after being deprecated for a long time.
This completely breaks the installation of any packages using the test command, including JPype.
See pypa/setuptools#4519 for other issue reports.
This PR fixes JPype to be compatible with setuptools 72+ again.
Fixes #1205.

Changes

  • Removes the test alias and command.
  • Adjusts a line in the docs
  • setup.py test was not used in CI anymore, so in terms of usage, this PR only adjusts one line in the docs.

Testing

Before:

$ pip install --upgrade setuptools
$ pip install -e .
Obtaining file:///home/.../Repos/kyuubi/python
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/home/.../Repos/kyuubi/python/setup.py", line 4, in <module>
          from setuptools.command.test import test as TestCommand
      ModuleNotFoundError: No module named 'setuptools.command.test'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

With the code in this PR:

$ pip install --upgrade setuptools
$ pip install -e .
Obtaining file:///home/.../Repos/jpype
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
Requirement already satisfied: packaging in ./.venv/lib/python3.11/site-packages (from JPype1==1.5.0.dev0) (24.1)
Building wheels for collected packages: JPype1
  Building editable for JPype1 (pyproject.toml) ... done
  Created wheel for JPype1: filename=JPype1-1.5.0.dev0-0.editable-cp311-cp311-linux_x86_64.whl size=9998 sha256=4783526b2a6725dfa504b1d71cdc5feaa4d4256319c001c0a97c0809905d2e98
  Stored in directory: /tmp/pip-ephem-wheel-cache-6fkq_j06/wheels/ca/b9/cd/ed1acf12ba47865d19baa6a7e9f7464d25608d983055f6fbf6
Successfully built JPype1
Installing collected packages: JPype1
Successfully installed JPype1-1.5.0.dev0

Copy link

codecov bot commented Jul 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.44%. Comparing base (653ccff) to head (31339e3).
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1206      +/-   ##
==========================================
+ Coverage   87.42%   87.44%   +0.01%     
==========================================
  Files         113      113              
  Lines       10238    10234       -4     
  Branches     4059     4059              
==========================================
- Hits         8951     8949       -2     
+ Misses        692      691       -1     
+ Partials      595      594       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Thrameos
Copy link
Contributor

@marscher are you around? There have been a number of items requiring update recently. If you aren't available for review I will likely have to self review and get the ball rolling towards a release.

@pelson
Copy link
Contributor

pelson commented Aug 19, 2024

If you aren't available for review I will likely have to self review and get the ball rolling towards a release.

I can step up for some review. Particularly on the Python infra side of things. Feel free to ping me.

@pelson
Copy link
Contributor

pelson commented Aug 19, 2024

FWIW, I think this PR is good to go as it is.

@Thrameos
Copy link
Contributor

Thrameos commented Aug 19, 2024 via email

@marscher
Copy link
Member

Sorry for being not available for so long. Thanks for the patch. I think this is pretty straight forward.

@marscher marscher merged commit a8b33a6 into jpype-project:master Aug 19, 2024
15 of 25 checks passed
@alexrashed alexrashed deleted the fix-jpype-setuptools-72 branch August 20, 2024 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fail to install because of setuptool change
4 participants