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

Upgrade astLib for Python>=3.12. #48

Merged
merged 17 commits into from
Nov 29, 2024
Merged

Upgrade astLib for Python>=3.12. #48

merged 17 commits into from
Nov 29, 2024

Conversation

JSKenyon
Copy link
Contributor

This tiny PR should make tigger-lsm compatible with Python3.12.

@ratt-priv-ci
Copy link

Can one of the admins verify this patch?

@bennahugo
Copy link
Contributor

ok to test

@bennahugo
Copy link
Contributor

bennahugo commented Nov 28, 2024

Thanks fo this. I do think we should keep the minimum version compatible with our current 20.04 (3.8) LTS versions for Tigger and MeqTrees, so maybe just undo the ^3.10 requirement

@JSKenyon JSKenyon changed the title Upgrade astLib for Python>-3.12. Upgrade astLib for Python>=3.12. Nov 28, 2024
@JSKenyon
Copy link
Contributor Author

Ok @bennahugo - the tests seem to be passing. Could you review when you have a moment?

@bennahugo
Copy link
Contributor

Getting the following from the build system now:

Step 9/17 : RUN pip install ./tigger-lsm
 ---> Running in 87329fb79b14
Processing ./tigger-lsm
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting astlib<=0.11.10 (from astro-tigger-lsm==1.7.4)
  Downloading astLib-0.11.10.tar.gz (10.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.0/10.0 MB 85.9 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting astro-kittens<2.0.0,>=1.4.6 (from astro-tigger-lsm==1.7.4)
  Downloading astro-kittens-1.4.6.tar.gz (37 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
�[91m  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [42 lines of output]
      running egg_info
      creating /tmp/pip-pip-egg-info-uhh1f6cp/astro_kittens.egg-info
      writing /tmp/pip-pip-egg-info-uhh1f6cp/astro_kittens.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-pip-egg-info-uhh1f6cp/astro_kittens.egg-info/dependency_links.txt
      writing requirements to /tmp/pip-pip-egg-info-uhh1f6cp/astro_kittens.egg-info/requires.txt
      writing top-level names to /tmp/pip-pip-egg-info-uhh1f6cp/astro_kittens.egg-info/top_level.txt
      writing manifest file '/tmp/pip-pip-egg-info-uhh1f6cp/astro_kittens.egg-info/SOURCES.txt'
      reading manifest file '/tmp/pip-pip-egg-info-uhh1f6cp/astro_kittens.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE'
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-jy6mpn6w/astro-kittens_5e21b14822d34f0ba779965e6467f648/setup.py", line 7, in <module>
          setup(name='astro-kittens',
        File "/usr/local/lib/python3.10/dist-packages/setuptools/__init__.py", line 117, in setup
          return distutils.core.setup(**attrs)
        File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/core.py", line 183, in setup
          return run_commands(dist)
        File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/core.py", line 199, in run_commands
          dist.run_commands()
        File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py", line 954, in run_commands
          self.run_command(cmd)
        File "/usr/local/lib/python3.10/dist-packages/setuptools/dist.py", line 995, in run_command
          super().run_command(command)
        File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py", line 973, in run_command
          cmd_obj.run()
        File "/usr/local/lib/python3.10/dist-packages/setuptools/command/egg_info.py", line 313, in run
          self.find_sources()
        File "/usr/local/lib/python3.10/dist-packages/setuptools/command/egg_info.py", line 321, in find_sources
          mm.run()
        File "/usr/local/lib/python3.10/dist-packages/setuptools/command/egg_info.py", line 549, in run
          self.prune_file_list()
        File "/usr/local/lib/python3.10/dist-packages/setuptools/command/sdist.py", line 162, in prune_file_list
          super().prune_file_list()
        File "/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/command/sdist.py", line 380, in prune_file_list
          base_dir = self.distribution.get_fullname()
        File "/usr/local/lib/python3.10/dist-packages/setuptools/_core_metadata.py", line 267, in get_fullname
          return _distribution_fullname(self.get_name(), self.get_version())
        File "/usr/local/lib/python3.10/dist-packages/setuptools/_core_metadata.py", line 285, in _distribution_fullname
          canonicalize_version(version, strip_trailing_zero=False),
      TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero'

@bennahugo
Copy link
Contributor

Proposed fix is to downgrade setuptools to 70.x Perhaps we need to pin this as a requirement in the toml file per pypa/setuptools#4483

@bennahugo
Copy link
Contributor

Ok I can at least confirm it is an upstream regression in pypa/setuptools#4483 since the last PR to move the build system to poetry.

@bennahugo
Copy link
Contributor

So pip -U setuptools wheel pip no longer works and pip does not specify the core dependencies on specific versions of setuptools correctly per pypa/setuptools#4483. The solution is to do pip -U setuptools[core] wheel pip which is a bit arcane bekludgery to get the build system installer to meet its own dependencies. Hopefully pypa will fix this at some point

@bennahugo bennahugo merged commit b946e1d into ratt-ru:master Nov 29, 2024
11 checks passed
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.

3 participants