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

setup.py itself depends on python-dateutil #9

Closed
Commod0re opened this issue Apr 6, 2022 · 2 comments
Closed

setup.py itself depends on python-dateutil #9

Commod0re opened this issue Apr 6, 2022 · 2 comments

Comments

@Commod0re
Copy link

pip install whoisit in a fresh virtualenv fails:

% pip install whoisit
Collecting whoisit
  Using cached whoisit-2.5.1.tar.gz (31 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [10 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/6y/xrb0tm811kl8v3jt6_7cz0q80000gn/T/pip-install-3p_w5gii/whoisit_1978a29a75af4988a86dd13a17a220a1/setup.py", line 4, in <module>
          from whoisit.version import version
        File "/private/var/folders/6y/xrb0tm811kl8v3jt6_7cz0q80000gn/T/pip-install-3p_w5gii/whoisit_1978a29a75af4988a86dd13a17a220a1/whoisit/__init__.py", line 4, in <module>
          from .parser import parse
        File "/private/var/folders/6y/xrb0tm811kl8v3jt6_7cz0q80000gn/T/pip-install-3p_w5gii/whoisit_1978a29a75af4988a86dd13a17a220a1/whoisit/parser.py", line 3, in <module>
          from dateutil.parser import parse as dateutil_parse
      ModuleNotFoundError: No module named 'dateutil'
      [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.

because setup.py imports code that uses python-dateutil it actually should be either specified in setup_requires in addition to install_requires (see https://setuptools.pypa.io/en/latest/references/keywords.html ) or a pyproject.toml as defined in PEP-518 (https://peps.python.org/pep-0518/ )

@Commod0re Commod0re changed the title setup.py depends on python-dateutil setup.py itself depends on python-dateutil Apr 6, 2022
@meeb
Copy link
Owner

meeb commented Apr 7, 2022

So it does. I'll fix this in the next release. I had dateutil globally installed for some reason so missed this. Thanks for reporting it and the details.

@meeb meeb closed this as completed in 91dc665 Apr 7, 2022
@meeb
Copy link
Owner

meeb commented Apr 7, 2022

This is fixed in the v2.5.2 release pushed up a few minutes ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants