ZeitgeberH / patchview

python toolkits and GUI for multi-patch whole-cell data analysis and visualization
https://patchview.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
14 stars 4 forks source link

Preparing metadata (pyproject.toml) did not run successfully #18

Closed wisstock closed 7 months ago

wisstock commented 7 months ago

Cannot install patchview with pip, preparing metadata (pyproject.toml) did not run successfully.

Following instructions for installation via pip after activation of conda environment and installation of not-PIP dependencies (NeuroM, dictdiffer, pyemf3) the command python -m pip install patchview both for patchview versions 0.3.0 and 0.2.9 returns the next output:

Collecting patchview
  Using cached Patchview-0.3.0.tar.gz (9.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [109 lines of output]
      /tmp/pip-build-env-viv16bcl/overlay/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py:76: _MissingDynamic: `readme` defined outside of `pyproject.toml` is ignored.
      !!

              ********************************************************************************
              The following seems to be defined outside of `pyproject.toml`:

              `readme = "===============\nPatchView\n===============\n.. image:: https://img.shields.io/pypi/v/patchview.svg \n        :target: https://pypi.python.org/pypi/patchview\n      \n.. image:: https://img.shields.io/badge/python-3.8%2B-blue\n        :target: https://www.python.org/downloads/release/python\n        :alt: Python3.8\n\n.. image:: https://readthedocs.org/projects/patchview/badge/?version=latest\n        :target: https://patchview.readthedocs.io/en/latest/?badge=latest\n        :alt: Documentation Status\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :target: https://github.com/psf/black\n\n.. image:: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg\n        :target: https://opensource.org/licenses/BSD-3-Clause\n        :alt: BSD-3-Clause    \n\n.. image:: https://joss.theoj.org/papers/10.21105/joss.04706/status.svg\n   :target: https://doi.org/10.21105/joss.04706\n.. image:: https://img.shields.io/pypi/dm/patchview?label=pypi%20downloads\n           \n\n.. image:: docs/resources/images/patchview_ads.png\n    :width: 800\n\nPatchView perform data analysis and visualization on multi channel whole-cell recording (multi-patch) data, including firing pattern analysis, event analysis,\nsynaptic connection detection, morphological analysis and more.\n\n* Free software: BSD 3-Clause license\n* Documentation: https://patchview.readthedocs.io.\n\n\nFeatures\n--------\nPatchView integrates multiple open-source tools (see credit page) and wrap them using an intuitive graphic user interface (GUI).\nThus users can perform most analysis quickly for the data collected in a typical patch-clamp experiment without installing Python and \nthese tools or writing any Python scripts.\n\n* Importing both Heka data and Axon Instruments data. Exporting to Python pickle file or NWB (Neurodata Without Borders) file format.\n* Visualizing single and multiple traces with zoom, pan operations.\n* Automatically sorting experiments data according to predefined labels.\n* Performing analysis on intrinsic membrane properties, action potential detection, firing pattern analysis.\n* Synaptic connection analysis.\n* Visualizing and quantification of neuron's morphological reconstruction from Neurolucida\n\n\nCitation\n---------\nIf you find our work useful for your research, please cite:\n\n    Hu et al., (2022). PatchView: A Python Package for Patch-clamp Data Analysis and Visualization. Journal of Open Source Software, 7(78), 4706, https://doi.org/10.21105/joss.04706\n"`

              According to the spec (see the link below), however, setuptools CANNOT
              consider this value unless `readme` is listed as `dynamic`.

              https://packaging.python.org/en/latest/specifications/pyproject-toml/#declaring-project-metadata-the-project-table

              To prevent this problem, you can list `readme` under `dynamic` or alternatively
              remove the `[project]` table from your file and rely entirely on other means of
              configuration.
              ********************************************************************************

      !!
        _handle_missing_dynamic(dist, project_table)
      /tmp/pip-build-env-viv16bcl/overlay/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py:76: _MissingDynamic: `license` defined outside of `pyproject.toml` is ignored.
      !!

              ********************************************************************************
              The following seems to be defined outside of `pyproject.toml`:

              `license = 'BSD-3-Clause'`

              According to the spec (see the link below), however, setuptools CANNOT
              consider this value unless `license` is listed as `dynamic`.

              https://packaging.python.org/en/latest/specifications/pyproject-toml/#declaring-project-metadata-the-project-table

              To prevent this problem, you can list `license` under `dynamic` or alternatively
              remove the `[project]` table from your file and rely entirely on other means of
              configuration.
              ********************************************************************************

      !!
        _handle_missing_dynamic(dist, project_table)
      /tmp/pip-build-env-viv16bcl/overlay/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py:76: _MissingDynamic: `dependencies` defined outside of `pyproject.toml` is ignored.
      !!

              ********************************************************************************
              The following seems to be defined outside of `pyproject.toml`:

              `dependencies = ['furo', 'morphopy', 'colorcet', 'appdirs', 'Pillow', 'pynwb', 'tqdm', 'PySide2', 'pyqt5', 'pyqtwebengine', 'pyqt5-sip', 'pyqtgraph==0.13.1', 'PyOpenGL', 'PyOpenGL_accelerate>=3.1.6; sys_platform == "win32"', 'cython', 'neo', 'pylru==1.2.1', 'h5py==3.7.0', 'joblib', 'future>=0.18.3', 'pyYAML', 'python-dateutil', 'seaborn', 'pytz', 'scipy', 'pandas', 'matplotlib', 'pycairo', 'scikit-image', 'morphio', 'scikit-learn', 'numpy<1.24,>=1.22']`

              According to the spec (see the link below), however, setuptools CANNOT
              consider this value unless `dependencies` is listed as `dynamic`.

              https://packaging.python.org/en/latest/specifications/pyproject-toml/#declaring-project-metadata-the-project-table

              To prevent this problem, you can list `dependencies` under `dynamic` or alternatively
              remove the `[project]` table from your file and rely entirely on other means of
              configuration.
              ********************************************************************************

      !!
        _handle_missing_dynamic(dist, project_table)
      /tmp/pip-build-env-viv16bcl/overlay/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py:76: _MissingDynamic: `optional-dependencies` defined outside of `pyproject.toml` is ignored.
      !!

              ********************************************************************************
              The following seems to be defined outside of `pyproject.toml`:

              `optional-dependencies = {'dev': []}`

              According to the spec (see the link below), however, setuptools CANNOT
              consider this value unless `optional-dependencies` is listed as `dynamic`.

              https://packaging.python.org/en/latest/specifications/pyproject-toml/#declaring-project-metadata-the-project-table

              To prevent this problem, you can list `optional-dependencies` under `dynamic` or alternatively
              remove the `[project]` table from your file and rely entirely on other means of
              configuration.
              ********************************************************************************

      !!
        _handle_missing_dynamic(dist, project_table)
      Traceback (most recent call last):
        File "/home/wisstock/anaconda3/envs/patch/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/wisstock/anaconda3/envs/patch/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/wisstock/anaconda3/envs/patch/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "/tmp/pip-build-env-viv16bcl/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 366, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/tmp/pip-build-env-viv16bcl/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 480, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-viv16bcl/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 30, in <module>
        File "/tmp/pip-build-env-viv16bcl/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-viv16bcl/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 159, in setup
          dist.parse_config_files()
        File "/tmp/pip-build-env-viv16bcl/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 627, in parse_config_files
          pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
        File "/tmp/pip-build-env-viv16bcl/overlay/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py", line 68, in apply_configuration
          return _apply(dist, config, filepath)
        File "/tmp/pip-build-env-viv16bcl/overlay/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py", line 57, in apply
          _apply_project_table(dist, config, root_dir)
        File "/tmp/pip-build-env-viv16bcl/overlay/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py", line 83, in _apply_project_table
          corresp(dist, value, root_dir)
        File "/tmp/pip-build-env-viv16bcl/overlay/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py", line 164, in _long_description
          file = val.get("file") or []
      AttributeError: 'NoneType' object has no attribute 'get'
      [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.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
ZeitgeberH commented 7 months ago

Hi @wisstock Thanks for reporting the issue. The problem is the pyproject.toml file (which is not needed any more). Please use the following command to install the patched version. pip install patchview --no-cache-dir

Hope that solves the problem.

wisstock commented 7 months ago

Hi @ZeitgeberH the installation of v0.3.0 was successful and everything is working great.

Thank you!