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

Can not install cf-units 3.0.1.post0 on Python 3.10 #218

Closed
avaldebe opened this issue Feb 28, 2022 · 8 comments
Closed

Can not install cf-units 3.0.1.post0 on Python 3.10 #218

avaldebe opened this issue Feb 28, 2022 · 8 comments
Labels
New: Issue Highlight a new community raised "generic" issue Type: Bug

Comments

@avaldebe
Copy link

🐛 Bug Report

How to Reproduce

Steps to reproduce the behaviour:

  1. create an activate python 3.10 virtual environment
python3.10 -m venv .venv
source .venv/bin/activate
  1. try to install cf-units 3.0.1.post0
pip install "cf-units==3.0.1.post0"

Expected Behaviour

That the package installs without problems.

Environment

  • OS & Version: Ubuntu 18.04 LTS
  • cf-units Version: 3.0.1.post0

Additional Context

  • pip install "cf-units==3.0.1" install without problems (but I have not tested the package)
  • pip install "cf-units==3.0.1.post0" fails with the following traceback
Collecting cf-units==3.0.1.post0
  Using cached cf-units-3.0.1.post0.tar.gz (162 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /home/alvarov/Python/pyaerocom/.tmp/bin/python3.10 /home/alvarov/Python/pyaerocom/.tmp/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp_g2neeee
       cwd: /tmp/pip-install-mx6ln9zx/cf-units_4fcac894db8549308b224e5afadf1096
  Complete output (55 lines):
  Compiling cf_units/_udunits2.pyx because it depends on /tmp/pip-build-env-l2yowbvk/overlay/lib/python3.10/site-packages/Cython/Includes/cpython/type.pxd.
  [1/1] Cythonizing cf_units/_udunits2.pyx
  running egg_info
  writing cf_units.egg-info/PKG-INFO
  writing dependency_links to cf_units.egg-info/dependency_links.txt
  writing requirements to cf_units.egg-info/requires.txt
  writing top-level names to cf_units.egg-info/top_level.txt
  Traceback (most recent call last):
    File "/home/alvarov/Python/pyaerocom/.tmp/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 349, in <module>
      main()
    File "/home/alvarov/Python/pyaerocom/.tmp/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 331, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/alvarov/Python/pyaerocom/.tmp/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 117, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/pip-build-env-l2yowbvk/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 177, in get_requires_for_build_wheel
      return self._get_build_requires(
    File "/tmp/pip-build-env-l2yowbvk/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 159, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-l2yowbvk/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 174, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 155, in <module>
      setup(**kwargs)
    File "/tmp/pip-build-env-l2yowbvk/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 155, in setup
      return distutils.core.setup(**attrs)
    File "/tmp/pip-build-env-l2yowbvk/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 148, in setup
      return run_commands(dist)
    File "/tmp/pip-build-env-l2yowbvk/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
      dist.run_commands()
    File "/tmp/pip-build-env-l2yowbvk/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
      self.run_command(cmd)
    File "/tmp/pip-build-env-l2yowbvk/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-l2yowbvk/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 298, in run
      self.find_sources()
    File "/tmp/pip-build-env-l2yowbvk/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 305, in find_sources
      mm.run()
    File "/tmp/pip-build-env-l2yowbvk/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 540, in run
      self.add_defaults()
    File "/tmp/pip-build-env-l2yowbvk/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 577, in add_defaults
      sdist.add_defaults(self)
    File "/tmp/pip-build-env-l2yowbvk/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 226, in add_defaults
      self._add_defaults_python()
    File "/tmp/pip-build-env-l2yowbvk/overlay/lib/python3.10/site-packages/setuptools/command/sdist.py", line 113, in _add_defaults_python
      self._add_data_files(self._safe_data_files(build_py))
    File "/tmp/pip-build-env-l2yowbvk/overlay/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 621, in _safe_data_files
      return build_py.get_data_files_w3.0.1ithout_manifest()
    File "/tmp/pip-build-env-l2yowbvk/overlay/lib/python3.10/site-packages/setuptools/command/build_py.py", line 78, in get_data_files_without_manifest
      return list(map(self._get_pkg_data_files, self.packages or ()))
    File "/tmp/pip-build-env-l2yowbvk/overlay/lib/python3.10/site-packages/setuptools/command/build_py.py", line 90, in _get_pkg_data_files
      for file in self.find_data_files(package, src_dir)
    File "/tmp/pip-build-env-l2yowbvk/overlay/lib/python3.10/site-packages/setuptools/command/build_py.py", line 96, in find_data_files
      patterns = self._get_platform_patterns(
    File "/tmp/pip-build-env-l2yowbvk/overlay/lib/python3.10/site-packages/setuptools/command/build_py.py", line 214, in _get_platform_patterns
      spec.get('', []),
  AttributeError: 'NoneType' object has no attribute 'get'
@avaldebe avaldebe added New: Issue Highlight a new community raised "generic" issue Type: Bug labels Feb 28, 2022
@trexfeathers
Copy link
Collaborator

Hi @avaldebe, thanks for getting in touch. cf-units currently supports Python 3.7 to 3.9 (see setup.cfg or PyPI), so we wouldn't necessarily expect the following:

Expected Behaviour

That the package installs without problems.

Is the lack of Python v3.10 support a problem for you? Last time we checked, not all our dependencies supported v3.10, but that may have changed since.

avaldebe added a commit to avaldebe/pyaerocom that referenced this issue Feb 28, 2022
@avaldebe
Copy link
Author

Hi @avaldebe, thanks for getting in touch. cf-units currently supports Python 3.7 to 3.9 (see setup.cfg or PyPI), so we wouldn't necessarily expect the following:

Expected Behaviour

That the package installs without problems.

Is the lack of Python v3.10 support a problem for you? Last time we checked, not all our dependencies supported v3.10, but that may have changed since.

This is not a Python 3.10 support issue per se.
As I wrote on the bug report, 3.0.1 installs without problems on Python 3.10.
Since then, I excluded cf-units 3.0.1.post0 from my project requirements and now I can install and run the test suite on Python 3.10 python problems (with cf-units 3.0.1).
Therefore, I view this a bug on the 3.0.1.post0 distribution package configuration (setup.py/setup.cfg).

In any case, I have a work around for now and I would encourage you to look into this before the next release.

@bjlittle
Copy link
Member

bjlittle commented Mar 4, 2022

@trexfeathers @avaldebe This issue would be resolved by PR #214

It just needs reviewed and merged, then we can cut a release and that will unlock cf-units for py310 👍

@SpacemanPaul
Copy link

SpacemanPaul commented May 3, 2022

Does this just need a release cut? The latest Ubuntu LTS (22.04) ships with python3.10, if you need an extra nudge ;)

(I can confirm current main builds and installs fine in Ubuntu 22.04 python3.10 if it helps.)

@trexfeathers
Copy link
Collaborator

Does this just need a release cut? The latest Ubuntu LTS (22.04) ships with python3.10, if you need an extra nudge ;)

(I can confirm current main builds and installs fine in Ubuntu 22.04 python3.10 if it helps.)

Well noticed!

We're hoping to cut a release very soon, but would like to get #235 in at a minimum.

@SpacemanPaul
Copy link

The PR mentioned above has been merged. Any chance we could get a release now? Or at least a pre-release?

@rcomer
Copy link
Member

rcomer commented Jul 1, 2022

Apologies for the delay. cf-units v3.1 is now available on pypi and conda-forge.

@bjlittle
Copy link
Member

bjlittle commented Jul 1, 2022

@bouweandela @SpacemanPaul @avaldebe

We've just released cf-units v3.1.0 which is now available on both conda-forge and PyPI.

On PyPI we have both the sdist, and bdist for py38, py39 and py310.

I'm going to close this issue, but thanks for raising it.

If you have any follow-on issues, please raise a separate issue or re-open this one.

Thanks 👍

@bjlittle bjlittle closed this as completed Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New: Issue Highlight a new community raised "generic" issue Type: Bug
Projects
None yet
Development

No branches or pull requests

5 participants