scikit-hep / pyBumpHunter

Python implementation of the BumpHunter algorithm used by HEP community.
BSD 3-Clause "New" or "Revised" License
17 stars 9 forks source link

Not pip installable? #8

Closed jmduarte closed 1 year ago

jmduarte commented 2 years ago

Thanks for the nice package! I'm having trouble pip installing it locally.

If I try:

git clone https://github.com/scikit-hep/pyBumpHunter
cd pyBumpHunter
pip install -e .

I get some version of the following error:

Obtaining file:///home/jovyan/work/pyBumpHunter
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /opt/conda/bin/python3 /opt/conda/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpjtgtz_tx
       cwd: /home/jovyan/work/pyBumpHunter
  Complete output (16 lines):
  Traceback (most recent call last):
    File "/opt/conda/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 280, in <module>
      main()
    File "/opt/conda/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/opt/conda/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 114, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/pip-build-env-0um86zut/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 154, in get_requires_for_build_wheel
      return self._get_build_requires(
    File "/tmp/pip-build-env-0um86zut/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 135, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-0um86zut/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 150, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 4, in <module>
      import toml  # noqa: F401
  ModuleNotFoundError: No module named 'toml'
  ----------------------------------------
WARNING: Discarding file:///home/jovyan/work/pyBumpHunter. Command errored out with exit status 1: /opt/conda/bin/python3 /opt/conda/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpjtgtz_tx Check the logs for full command output.
ERROR: Command errored out with exit status 1: /opt/conda/bin/python3 /opt/conda/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpjtgtz_tx Check the logs for full command output.

I've tried on Mac OS X, Linux, and python 3.7-3.9. Any ideas as to what might be happening?

Thanks!

henryiii commented 2 years ago

There is an import toml in the setup.py and that is wrong. Setuptools_scm now uses tomli. I'd remove that line from the setup.py.

henryiii commented 2 years ago

The whole setup.py file could be removed, BTW. Not having a setup.py would force the infrastructure to be new enough to handle pyproject requirements, and remove the need for this check.

eduardo-rodrigues commented 1 year ago

Hello @lovaslin, time to check there are still issues with latest releases, update as per https://scikit-hep.org/developer/reporeview, and close :-)?

lovaslin commented 1 year ago

Hello,

I tried to pip install the package from a clean environment. It works without problems.

I also ran the check proposed at https://scikit-hep.org/developer/reporeview. Mostly green in both general and pyproject sections. I think this problem is solved now, I propose to close the issue.