hippke / tls

Transit Least Squares: An optimized transit-fitting algorithm to search for periodic transits of small planets
MIT License
48 stars 24 forks source link

Bug: Can't install due to batman-package failure #93

Closed martindevora closed 3 years ago

martindevora commented 3 years ago

Describe the bug Can't even install transitleastsquares because batman-package dependency installation reports an error.

To Reproduce Steps to reproduce the behavior: Please use --no-cache to reproduce because pip will use your previously cached versions. python3.8 -m pip install transitleastsquares --no-cache

Desktop (please complete the following information):

Additional context

python3.8 -m pip install transitleastsquares --no-cache
Collecting transitleastsquares
  Using cached transitleastsquares-1.0.26-py3-none-any.whl (46 kB)
Requirement already satisfied: numpy in ./.local/lib/python3.8/site-packages (from transitleastsquares) (1.20.3)
Collecting batman-package
  Using cached batman-package-2.4.7.tar.gz (394 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3.8 /tmp/tmpddk6p0gl get_requires_for_build_wheel /tmp/tmpcr5s5b6h
       cwd: /tmp/pip-install-bvncjdma/batman-package
  Complete output (38 lines):
  Checking for OpenMP support...
  Compiler supports OpenMP
  running egg_info
  writing batman_package.egg-info/PKG-INFO
  /usr/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'extras_requires'
    warnings.warn(msg)
  Traceback (most recent call last):
    File "/tmp/tmpddk6p0gl", line 280, in <module>
      main()
    File "/tmp/tmpddk6p0gl", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/tmp/tmpddk6p0gl", line 114, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/pip-build-env-n0bxf490/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 154, in get_requires_for_build_wheel
      return self._get_build_requires(
    File "/tmp/pip-build-env-n0bxf490/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 135, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-n0bxf490/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 150, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 79, in <module>
      setup(    name='batman-package',
    File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-n0bxf490/overlay/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 292, in run
      writer(self, ep.name, os.path.join(self.egg_info, ep.name))
    File "/tmp/pip-build-env-n0bxf490/overlay/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 628, in write_pkg_info
      metadata.write_pkg_info(cmd.egg_info)
    File "/usr/lib/python3.8/distutils/dist.py", line 1117, in write_pkg_info
      self.write_pkg_file(pkg_info)
    File "/tmp/pip-build-env-n0bxf490/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 172, in write_pkg_file
      license = rfc822_escape(self.get_license())
    File "/usr/lib/python3.8/distutils/util.py", line 475, in rfc822_escape
      lines = header.split('\n')
  AttributeError: 'list' object has no attribute 'split'
  ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3.8 /tmp/tmpddk6p0gl get_requires_for_build_wheel /tmp/tmpcr5s5b6h Check the logs for full command output.

Is there any workaround to this? Our package depends on TLS and we are blocked now.

Regards.

martindevora commented 3 years ago

I retire this issue because it seems something related to PIP instead of TLS. Sorry.

martindevora commented 3 years ago

Sorry, I closed because upgrading pip the installation worked. However, what it did was installing batman-package 0.9, which is far from the batman-package version required by TLS. Therefore I reopen.

martindevora commented 3 years ago

I reproduced this in a virtualenv, in a co-worker local machine and in a server. Python versions 3.7 and 3.8.

martindevora commented 3 years ago

Well. It seems that the newest versions of setuptools are not supporting the way batman is configured in the setup.py file. Downgrading setuptools to 54.2.0 made it work, despite it only installs the 2.4.6 batman version (newest is 2.4.7). However, I think this should be fixed too because TLS might be stuck in the near future.

hippke commented 3 years ago

Sorry I missed this github issue. I think this is a problem with batman package which is still maintained by Laura Kreidberg. I see that a new version 2.4.8. was released on May 24 to fix installation issues. Can you try again? If it doesn't work, can you open an issue in the batman github and tag us?

martindevora commented 3 years ago

Hi. I already saw it as I opened the issue in the repo. You can close this one too.