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

[Packaging]: Build-from-source fails with setuptools >= 61.0.0 #5291

Closed
drewrisinger opened this issue Apr 26, 2022 · 3 comments · Fixed by #5330
Closed

[Packaging]: Build-from-source fails with setuptools >= 61.0.0 #5291

drewrisinger opened this issue Apr 26, 2022 · 3 comments · Fixed by #5330
Assignees
Labels
area/packages kind/health For CI/testing/release process/refactoring/technical debt items triage/accepted there is consensus amongst maintainers that this is a real bug or a reasonable feature to add

Comments

@drewrisinger
Copy link
Contributor

Description of the issue
Cirq install from source fails with setuptools==61.2.0. It succeeds with setuptools==54.2.0, likely higher versions (based on pypa/setuptools#3197, probably >=61.0.0)

Cirq version
0.14.1

Error Message

error: Multiple top-level packages discovered in a flat-layout: ['check', 'rtd_docs', 'dev_tools'].

To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.

If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:

1. set up custom discovery (`find` directive with `include` or `exclude`)
2. use a `src-layout`
3. explicitly set `py_modules` or `packages` with a list of names

To find more information, look for "package discovery" on setuptools docs.
@drewrisinger drewrisinger added the kind/health For CI/testing/release process/refactoring/technical debt items label Apr 26, 2022
drewrisinger added a commit to drewrisinger/nur-packages that referenced this issue Apr 27, 2022
@MichaelBroughton MichaelBroughton added the triage/discuss Needs decision / discussion, bring these up during Cirq Cynque label Apr 27, 2022
@dabacon dabacon added triage/accepted there is consensus amongst maintainers that this is a real bug or a reasonable feature to add and removed triage/discuss Needs decision / discussion, bring these up during Cirq Cynque labels May 4, 2022
@pavoljuhas
Copy link
Collaborator

I can take care of this one.

@drewrisinger
Copy link
Contributor Author

My patch in drewrisinger/nur-packages@aeac9e1 should fix this, it basically just prevents setup.py from finding any packages to install. I meant to submit that as a patch but forgot.

pavoljuhas added a commit to pavoljuhas/Cirq that referenced this issue May 4, 2022
The top level setup.py is virtual and only declares cirq-core,
cirq-google, and others as its dependencies.
Make sure it does not search for packages,
which would raise setuptools error.

Resolves quantumlib#5291
@pavoljuhas
Copy link
Collaborator

@drewrisinger - thank you for the tip - #5330 should in effect do the same.

CirqBot pushed a commit that referenced this issue May 6, 2022
The top level setup.py is virtual and only declares cirq-core,
cirq-google, and others as its dependencies.
Make sure it does not search for packages,
which would raise setuptools error.

Resolves #5291
drewrisinger added a commit to drewrisinger/nixpkgs that referenced this issue May 13, 2022
Build was failing because it attempted to find top-level packages. See quantumlib/Cirq#5291
rht pushed a commit to rht/Cirq that referenced this issue May 1, 2023
)

The top level setup.py is virtual and only declares cirq-core,
cirq-google, and others as its dependencies.
Make sure it does not search for packages,
which would raise setuptools error.

Resolves quantumlib#5291
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/packages kind/health For CI/testing/release process/refactoring/technical debt items triage/accepted there is consensus amongst maintainers that this is a real bug or a reasonable feature to add
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants