Here I use Cirq 1.4.1 as an example, but the same error arises in 1.5.0.dev.
I installed Cirq 1.4.1 by cloning the main branch of the GitHub repo, then did the following to get the release tagged with 1.4.1 into a local branch:
git checkout v1.4.1 -b testing-1.4.1
Then I followed the instructions in "Setting up an environment", modifying them slightly for my MacOS 13.6.7 environment running Python version 3.10.10. I did the virtualenv installation,
I ran ./check/pytest . to make sure things looked reasonable; this produced an error involving sympy (which I'm currently investigating) but no other errors, and IMHO, nothing that looked relevant to the particular mypy error being reported in this issue. Then did the following, per instructions:
> mypy --config-file=dev_tools/conf/mypy.ini .
cirq-core/setup.py: error: Duplicate module named "setup" (also at "./cirq-aqt/setup.py")
cirq-core/setup.py: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#mapping-file-paths-to-modules for more info
cirq-core/setup.py: note: Common resolutions include: a) using `--exclude` to avoid checking one of them, b) adding `__init__.py` somewhere, c) using `--explicit-package-bases` or adjusting MYPYPATH
Found 1 error in 1 file (errors prevented further checking)
Description of the issue
After a fresh installation of either Cirq 1.4.1 or 1.5.0.dev, running the command
as described in section "Continuous integration and local testing" in the dev docs leads to an error about 'Duplicate module named "setup"'.
How to reproduce the issue
Here I use Cirq 1.4.1 as an example, but the same error arises in 1.5.0.dev.
I installed Cirq 1.4.1 by cloning the main branch of the GitHub repo, then did the following to get the release tagged with 1.4.1 into a local branch:
Then I followed the instructions in "Setting up an environment", modifying them slightly for my MacOS 13.6.7 environment running Python version 3.10.10. I did the virtualenv installation,
I ran
./check/pytest .
to make sure things looked reasonable; this produced an error involving sympy (which I'm currently investigating) but no other errors, and IMHO, nothing that looked relevant to the particular mypy error being reported in this issue. Then did the following, per instructions:Then I tried running the 3 steps in the section "Continuous integration and local testing". The step for mypy produced the following output:
Cirq version