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

Fails to read packages using setupext #61

Open
amyreese opened this issue Mar 25, 2022 · 0 comments
Open

Fails to read packages using setupext #61

amyreese opened this issue Mar 25, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@amyreese
Copy link
Member

amyreese commented Mar 25, 2022

mplcursors imports setup() from setupext rather than from setuptools directly, and this breaks dowsing's ability to interpret the setup.py:

(venv39) jreese@butterfree ~/scratch/mplcursors-0.5.1 » python -m dowsing.pep517 .
/Users/jreese/.pyenv/versions/3.9.3/lib/python3.9/runpy.py:127: RuntimeWarning: 'dowsing.pep517' found in sys.modules after import of package 'dowsing', but prior to execution of 'dowsing.pep517'; this may result in unpredictable behaviour
  warn(RuntimeWarning(msg))
/Users/jreese/scratch/venv39/lib/python3.9/site-packages/setuptools/distutils_patch.py:25: UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first.
  warnings.warn(
Traceback (most recent call last):
  File "/Users/jreese/.pyenv/versions/3.9.3/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/jreese/.pyenv/versions/3.9.3/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/jreese/scratch/venv39/lib/python3.9/site-packages/dowsing/pep517.py", line 88, in <module>
    main(Path(sys.argv[1]))
  File "/Users/jreese/scratch/venv39/lib/python3.9/site-packages/dowsing/pep517.py", line 77, in main
    metadata = get_metadata(path)
  File "/Users/jreese/scratch/venv39/lib/python3.9/site-packages/dowsing/pep517.py", line 67, in get_metadata
    return backend.get_metadata()
  File "/Users/jreese/scratch/venv39/lib/python3.9/site-packages/dowsing/setuptools/__init__.py", line 41, in get_metadata
    d2 = from_setup_py(self.path, {})
  File "/Users/jreese/scratch/venv39/lib/python3.9/site-packages/dowsing/setuptools/setup_py_parsing.py", line 48, in from_setup_py
    raise SyntaxError("No simple setup call found")
SyntaxError: No simple setup call found
@amyreese amyreese added the bug Something isn't working label Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant