pymeshfix icon indicating copy to clipboard operation
pymeshfix copied to clipboard

BUG: Release incorrect?

Open larsoner opened this issue 1 year ago • 2 comments

The conda-forge feedstock update is failing:

https://github.com/conda-forge/pymeshfix-feedstock/pull/7

https://github.com/conda-forge/pymeshfix-feedstock/pull/7/checks?check_run_id=10622344654

Processing $SRC_DIR
  Added file://$SRC_DIR to build tracker '/tmp/pip-build-tracker-d8lfz1vk'
  Created temporary directory: /tmp/pip-modern-metadata-hmzxto2b
  Preparing metadata (pyproject.toml): started
  Running command Preparing metadata (pyproject.toml)
  Traceback (most recent call last):
    File "/home/conda/feedstock_root/build_artifacts/pymeshfix_1673585787412/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
      main()
    File "/home/conda/feedstock_root/build_artifacts/pymeshfix_1673585787412/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/conda/feedstock_root/build_artifacts/pymeshfix_1673585787412/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel
      return hook(metadata_directory, config_settings)
    File "/home/conda/feedstock_root/build_artifacts/pymeshfix_1673585787412/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/python3.8/site-packages/setuptools/build_meta.py", line 377, in prepare_metadata_for_build_wheel
      self.run_setup()
    File "/home/conda/feedstock_root/build_artifacts/pymeshfix_1673585787412/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/python3.8/site-packages/setuptools/build_meta.py", line 335, in run_setup
      exec(code, locals())
    File "<string>", line 63, in <module>
    File "/home/conda/feedstock_root/build_artifacts/pymeshfix_1673585787412/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 970, in cythonize
      module_list, module_metadata = create_extension_list(
    File "/home/conda/feedstock_root/build_artifacts/pymeshfix_1673585787412/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 816, in create_extension_list
      for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't match any files" % filepattern):
    File "/home/conda/feedstock_root/build_artifacts/pymeshfix_1673585787412/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 114, in nonempty
      raise ValueError(error_msg)
  ValueError: 'pymeshfix/cython/_meshfix.pyx' doesn't match any files

Looking at the pymeshfix-0.16.2.tar.gz on PyPI, the _meshfix.pyx is indeed missing. @akaszynski did something change in recent PRs with the build infrastructure that would have caused this file to no longer be distributed?

larsoner avatar Jan 13 '23 14:01 larsoner

... It might not usually be required to include this and I might be able to work around it by no longer forcing re-Cythonization, but it's good for forward compat to include the .pyx files so that people can re-run Cython if they want to. At least I think/assume it's best practice...

larsoner avatar Jan 13 '23 14:01 larsoner

Looking deeper, I'm pretty sure the cause is https://github.com/pyvista/pymeshfix/pull/44, because 1) now cythonize is always called, even though it should not be necessary in most cases because the Cythonized code is already in the sdist, but 2) for some reason that PR or a different one made the .pyx no longer be included in the sdist, so re-cythonizing is not actually possible :(

larsoner avatar Jan 13 '23 23:01 larsoner